@browserless.io/browserless 2.2.0-beta-6 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1313) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/bin/browserless.js +1 -1
  3. package/bin/scaffold/README.md +8 -7
  4. package/build/browserless.js +7 -6
  5. package/build/browsers/chrome.cdp.d.ts +6 -0
  6. package/build/browsers/chrome.cdp.js +6 -0
  7. package/build/browsers/chrome.playwright.d.ts +6 -0
  8. package/build/browsers/chrome.playwright.js +6 -0
  9. package/build/browsers/{cdp-chromium.d.ts → chromium.cdp.d.ts} +3 -2
  10. package/build/browsers/{cdp-chromium.js → chromium.cdp.js} +16 -10
  11. package/build/browsers/{playwright-chromium.d.ts → chromium.playwright.d.ts} +3 -2
  12. package/build/browsers/{playwright-chromium.js → chromium.playwright.js} +6 -5
  13. package/build/browsers/{playwright-firefox.d.ts → firefox.playwright.d.ts} +2 -2
  14. package/build/browsers/{playwright-firefox.js → firefox.playwright.js} +4 -4
  15. package/build/browsers/index.d.ts +20 -10
  16. package/build/browsers/index.js +110 -11
  17. package/build/browsers/{playwright-webkit.d.ts → webkit.playwright.d.ts} +2 -2
  18. package/build/browsers/{playwright-webkit.js → webkit.playwright.js} +4 -4
  19. package/build/data/selectors.json +1 -1
  20. package/build/exports.d.ts +6 -4
  21. package/build/exports.js +6 -4
  22. package/build/http.d.ts +22 -1
  23. package/build/http.js +21 -0
  24. package/build/router.js +19 -3
  25. package/build/routes/{chromium/http/content-post.body.json → chrome/http/content.post.body.json} +8 -8
  26. package/build/routes/chrome/http/content.post.d.ts +7 -0
  27. package/build/routes/chrome/http/content.post.js +6 -0
  28. package/build/routes/chrome/http/download.post.d.ts +7 -0
  29. package/build/routes/chrome/http/download.post.js +6 -0
  30. package/build/routes/chrome/http/function.post.d.ts +7 -0
  31. package/build/routes/chrome/http/function.post.js +6 -0
  32. package/build/routes/chrome/http/json-list.get.d.ts +1 -0
  33. package/build/routes/chrome/http/json-list.get.js +1 -0
  34. package/build/routes/chrome/http/json-new.put.d.ts +1 -0
  35. package/build/routes/chrome/http/json-new.put.js +1 -0
  36. package/build/routes/chrome/http/json-protocol.get.d.ts +1 -0
  37. package/build/routes/chrome/http/json-protocol.get.js +1 -0
  38. package/build/routes/chrome/http/json-version.get.d.ts +1 -0
  39. package/build/routes/chrome/http/json-version.get.js +1 -0
  40. package/build/routes/chrome/http/json-version.get.response.json +44 -0
  41. package/build/routes/{chromium/http/pdf-post.body.json → chrome/http/pdf.post.body.json} +8 -8
  42. package/build/routes/chrome/http/pdf.post.d.ts +7 -0
  43. package/build/routes/chrome/http/pdf.post.js +6 -0
  44. package/build/routes/chrome/http/performance.post.d.ts +7 -0
  45. package/build/routes/chrome/http/performance.post.js +6 -0
  46. package/build/routes/{chromium/http/scrape-post.body.json → chrome/http/scrape.post.body.json} +8 -8
  47. package/build/routes/chrome/http/scrape.post.d.ts +7 -0
  48. package/build/routes/chrome/http/scrape.post.js +6 -0
  49. package/build/routes/{chromium/http/screenshot-post.body.json → chrome/http/screenshot.post.body.json} +8 -8
  50. package/build/routes/chrome/http/screenshot.post.d.ts +7 -0
  51. package/build/routes/chrome/http/screenshot.post.js +6 -0
  52. package/build/routes/chrome/tests/content.spec.js +311 -0
  53. package/build/routes/chrome/tests/download.spec.js +67 -0
  54. package/build/routes/chrome/tests/function.spec.d.ts +1 -0
  55. package/build/routes/chrome/tests/function.spec.js +245 -0
  56. package/build/routes/chrome/tests/json-version.spec.d.ts +1 -0
  57. package/build/routes/chrome/tests/json-version.spec.js +37 -0
  58. package/build/routes/chrome/tests/page-websocket.spec.d.ts +1 -0
  59. package/build/routes/chrome/tests/page-websocket.spec.js +97 -0
  60. package/build/routes/chrome/tests/pdf.spec.d.ts +1 -0
  61. package/build/routes/chrome/tests/pdf.spec.js +333 -0
  62. package/build/routes/chrome/tests/performance.spec.d.ts +1 -0
  63. package/build/routes/chrome/tests/performance.spec.js +124 -0
  64. package/build/routes/chrome/tests/scrape.spec.d.ts +1 -0
  65. package/build/routes/chrome/tests/scrape.spec.js +354 -0
  66. package/build/routes/chrome/tests/screenshot.spec.d.ts +1 -0
  67. package/build/routes/chrome/tests/screenshot.spec.js +339 -0
  68. package/build/routes/chrome/tests/websocket.spec.d.ts +1 -0
  69. package/build/routes/chrome/tests/websocket.spec.js +371 -0
  70. package/build/routes/chrome/ws/browser.d.ts +6 -0
  71. package/build/routes/chrome/ws/browser.js +5 -0
  72. package/build/routes/chrome/ws/cdp.d.ts +7 -0
  73. package/build/routes/chrome/ws/cdp.js +6 -0
  74. package/build/routes/chrome/ws/cdp.query.json +120 -0
  75. package/build/routes/chrome/ws/page.d.ts +6 -0
  76. package/build/routes/chrome/ws/page.js +5 -0
  77. package/build/routes/chrome/ws/page.query.json +120 -0
  78. package/build/routes/chrome/ws/playwright.d.ts +7 -0
  79. package/build/routes/chrome/ws/playwright.js +6 -0
  80. package/build/routes/chromium/http/content.post.body.json +510 -0
  81. package/build/routes/chromium/http/content.post.d.ts +1 -0
  82. package/build/routes/chromium/http/content.post.js +1 -0
  83. package/build/routes/chromium/http/content.post.query.json +183 -0
  84. package/build/routes/chromium/http/content.post.response.json +5 -0
  85. package/build/routes/chromium/http/download.post.body.json +32 -0
  86. package/build/routes/chromium/http/download.post.d.ts +1 -0
  87. package/build/routes/chromium/http/download.post.js +1 -0
  88. package/build/routes/chromium/http/download.post.query.json +120 -0
  89. package/build/routes/chromium/http/download.post.response.json +4 -0
  90. package/build/routes/chromium/http/function.post.body.json +32 -0
  91. package/build/routes/chromium/http/function.post.d.ts +1 -0
  92. package/build/routes/chromium/http/function.post.js +1 -0
  93. package/build/routes/chromium/http/function.post.query.json +120 -0
  94. package/build/routes/chromium/http/function.post.response.json +4 -0
  95. package/build/routes/chromium/http/json-list.get.d.ts +1 -0
  96. package/build/routes/chromium/http/json-list.get.js +1 -0
  97. package/build/routes/chromium/http/json-list.get.response.json +52 -0
  98. package/build/routes/chromium/http/json-new.put.d.ts +1 -0
  99. package/build/routes/chromium/http/json-new.put.js +1 -0
  100. package/build/routes/chromium/http/json-new.put.response.json +44 -0
  101. package/build/routes/chromium/http/json-protocol.get.d.ts +1 -0
  102. package/build/routes/chromium/http/json-protocol.get.js +1 -0
  103. package/build/routes/chromium/http/json-protocol.get.response.json +6 -0
  104. package/build/routes/chromium/http/json-version.get.d.ts +1 -0
  105. package/build/routes/chromium/http/json-version.get.js +1 -0
  106. package/build/routes/chromium/http/json-version.get.response.json +44 -0
  107. package/build/routes/chromium/http/pdf.post.body.json +654 -0
  108. package/build/routes/chromium/http/pdf.post.d.ts +1 -0
  109. package/build/routes/chromium/http/pdf.post.js +1 -0
  110. package/build/routes/chromium/http/pdf.post.query.json +120 -0
  111. package/build/routes/chromium/http/pdf.post.response.json +5 -0
  112. package/build/routes/chromium/http/performance.post.body.json +26 -0
  113. package/build/routes/chromium/http/performance.post.d.ts +1 -0
  114. package/build/routes/chromium/http/performance.post.js +1 -0
  115. package/build/routes/chromium/http/performance.post.query.json +120 -0
  116. package/build/routes/chromium/http/performance.post.response.json +7 -0
  117. package/build/routes/chromium/http/scrape.post.body.json +557 -0
  118. package/build/routes/chromium/http/scrape.post.d.ts +1 -0
  119. package/build/routes/chromium/http/scrape.post.js +1 -0
  120. package/build/routes/chromium/http/scrape.post.query.json +183 -0
  121. package/build/routes/chromium/http/scrape.post.response.json +309 -0
  122. package/build/routes/chromium/http/screenshot.post.body.json +600 -0
  123. package/build/routes/chromium/http/screenshot.post.d.ts +1 -0
  124. package/build/routes/chromium/http/screenshot.post.js +1 -0
  125. package/build/routes/chromium/http/screenshot.post.query.json +120 -0
  126. package/build/routes/chromium/http/screenshot.post.response.json +5 -0
  127. package/build/routes/chromium/tests/content.spec.js +16 -16
  128. package/build/routes/chromium/tests/download.spec.js +3 -3
  129. package/build/routes/chromium/tests/function.spec.js +10 -10
  130. package/build/routes/chromium/tests/page-websocket.spec.d.ts +1 -0
  131. package/build/routes/chromium/tests/page-websocket.spec.js +97 -0
  132. package/build/routes/chromium/tests/pdf.spec.js +16 -16
  133. package/build/routes/chromium/tests/performance.spec.js +7 -7
  134. package/build/routes/chromium/tests/scrape.spec.js +15 -15
  135. package/build/routes/chromium/tests/screenshot.spec.js +17 -17
  136. package/build/routes/chromium/tests/websocket.spec.js +31 -37
  137. package/build/routes/chromium/ws/browser.d.ts +1 -16
  138. package/build/routes/chromium/ws/browser.js +1 -10
  139. package/build/routes/chromium/ws/cdp.d.ts +1 -0
  140. package/build/routes/chromium/ws/cdp.js +1 -0
  141. package/build/routes/chromium/ws/cdp.query.json +120 -0
  142. package/build/routes/chromium/ws/page.d.ts +1 -16
  143. package/build/routes/chromium/ws/page.js +1 -10
  144. package/build/routes/chromium/ws/playwright.d.ts +1 -0
  145. package/build/routes/chromium/ws/playwright.js +1 -0
  146. package/build/routes/firefox/ws/{playwright-firefox.d.ts → playwright.d.ts} +5 -5
  147. package/build/routes/firefox/ws/{playwright-firefox.js → playwright.js} +4 -4
  148. package/build/routes/management/http/{sessions-get.response.json → sessions.get.response.json} +11 -1
  149. package/build/routes/management/http/{static-get.js → static.get.js} +2 -2
  150. package/build/routes/webkit/ws/{playwright-webkit.d.ts → playwright.d.ts} +5 -5
  151. package/build/routes/webkit/ws/{playwright-webkit.js → playwright.js} +4 -4
  152. package/build/routes/webkit/ws/playwright.query.json +100 -0
  153. package/build/{routes/chromium/ws/cdp-chromium.d.ts → shared/browser.ws.d.ts} +4 -4
  154. package/build/shared/browser.ws.js +12 -0
  155. package/build/{routes/chromium/ws/playwright-chromium.d.ts → shared/chromium.playwright.ws.d.ts} +4 -4
  156. package/build/{routes/chromium/ws/playwright-chromium.js → shared/chromium.playwright.ws.js} +6 -3
  157. package/build/shared/chromium.ws.d.ts +16 -0
  158. package/build/shared/chromium.ws.js +10 -0
  159. package/build/{routes/chromium/http/content-post.d.ts → shared/content.http.d.ts} +3 -3
  160. package/build/{routes/chromium/http/content-post.js → shared/content.http.js} +3 -3
  161. package/build/{routes/chromium/http/download-post.d.ts → shared/download.http.d.ts} +3 -3
  162. package/build/{routes/chromium/http/download-post.js → shared/download.http.js} +4 -4
  163. package/build/{routes/chromium/http/function-post.d.ts → shared/function.http.d.ts} +3 -3
  164. package/build/{routes/chromium/http/function-post.js → shared/function.http.js} +4 -4
  165. package/build/{routes/chromium/http/json-new.d.ts → shared/json-list.http.d.ts} +2 -3
  166. package/build/{routes/chromium/http/json-list.js → shared/json-list.http.js} +5 -8
  167. package/build/{routes/chromium/http/json-list.d.ts → shared/json-new.http.d.ts} +2 -3
  168. package/build/shared/json-new.http.js +34 -0
  169. package/build/{routes/chromium/http/json-protocol-get.js → shared/json-protocol.http.js} +2 -2
  170. package/build/{routes/chromium/http/json-version-get.js → shared/json-version.http.js} +3 -3
  171. package/build/shared/page.ws.d.ts +16 -0
  172. package/build/shared/page.ws.js +13 -0
  173. package/build/{routes/chromium/http/pdf-post.d.ts → shared/pdf.http.d.ts} +3 -3
  174. package/build/{routes/chromium/http/pdf-post.js → shared/pdf.http.js} +3 -3
  175. package/build/{routes/chromium/http/performance.d.ts → shared/performance.http.d.ts} +3 -3
  176. package/build/{routes/chromium/http/performance.js → shared/performance.http.js} +4 -4
  177. package/build/{routes/chromium/http/scrape-post.d.ts → shared/scrape.http.d.ts} +3 -3
  178. package/build/{routes/chromium/http/scrape-post.js → shared/scrape.http.js} +3 -3
  179. package/build/{routes/chromium/http/screenshot-post.d.ts → shared/screenshot.http.d.ts} +3 -3
  180. package/build/{routes/chromium/http/screenshot-post.js → shared/screenshot.http.js} +3 -3
  181. package/build/shared/utils/performance/child.d.ts +1 -0
  182. package/build/{routes/chromium → shared}/utils/performance/main.js +1 -1
  183. package/build/shared/utils/performance/types.js +1 -0
  184. package/build/shim.js +2 -1
  185. package/build/types.d.ts +10 -8
  186. package/build/utils.d.ts +8 -3
  187. package/build/utils.js +24 -11
  188. package/docker/base/Dockerfile +1 -1
  189. package/docker/chrome/Dockerfile +4 -4
  190. package/docker/chromium/.dockerignore +16 -0
  191. package/docker/chromium/Dockerfile +40 -0
  192. package/docker/firefox/Dockerfile +1 -1
  193. package/docker/multi/Dockerfile +13 -1
  194. package/docker/webkit/Dockerfile +1 -1
  195. package/extensions/ublock/3p-filters.html +1 -1
  196. package/extensions/ublock/_locales/ar/messages.json +4 -0
  197. package/extensions/ublock/_locales/az/messages.json +4 -0
  198. package/extensions/ublock/_locales/be/messages.json +4 -0
  199. package/extensions/ublock/_locales/bg/messages.json +5 -1
  200. package/extensions/ublock/_locales/bn/messages.json +4 -0
  201. package/extensions/ublock/_locales/br_FR/messages.json +6 -2
  202. package/extensions/ublock/_locales/bs/messages.json +4 -0
  203. package/extensions/ublock/_locales/ca/messages.json +4 -0
  204. package/extensions/ublock/_locales/cs/messages.json +4 -0
  205. package/extensions/ublock/_locales/cv/messages.json +4 -0
  206. package/extensions/ublock/_locales/cy/messages.json +1294 -0
  207. package/extensions/ublock/_locales/da/messages.json +4 -0
  208. package/extensions/ublock/_locales/de/messages.json +5 -1
  209. package/extensions/ublock/_locales/el/messages.json +4 -0
  210. package/extensions/ublock/_locales/en/messages.json +4 -0
  211. package/extensions/ublock/_locales/en_GB/messages.json +4 -0
  212. package/extensions/ublock/_locales/eo/messages.json +9 -5
  213. package/extensions/ublock/_locales/es/messages.json +4 -0
  214. package/extensions/ublock/_locales/et/messages.json +4 -0
  215. package/extensions/ublock/_locales/eu/messages.json +8 -4
  216. package/extensions/ublock/_locales/fa/messages.json +4 -0
  217. package/extensions/ublock/_locales/fi/messages.json +4 -0
  218. package/extensions/ublock/_locales/fil/messages.json +4 -0
  219. package/extensions/ublock/_locales/fr/messages.json +4 -0
  220. package/extensions/ublock/_locales/fy/messages.json +4 -0
  221. package/extensions/ublock/_locales/gl/messages.json +4 -0
  222. package/extensions/ublock/_locales/gu/messages.json +4 -0
  223. package/extensions/ublock/_locales/he/messages.json +4 -0
  224. package/extensions/ublock/_locales/hi/messages.json +4 -0
  225. package/extensions/ublock/_locales/hr/messages.json +4 -0
  226. package/extensions/ublock/_locales/hu/messages.json +4 -0
  227. package/extensions/ublock/_locales/hy/messages.json +4 -0
  228. package/extensions/ublock/_locales/id/messages.json +5 -1
  229. package/extensions/ublock/_locales/it/messages.json +4 -0
  230. package/extensions/ublock/_locales/ja/messages.json +4 -0
  231. package/extensions/ublock/_locales/ka/messages.json +34 -30
  232. package/extensions/ublock/_locales/kk/messages.json +4 -0
  233. package/extensions/ublock/_locales/kn/messages.json +4 -0
  234. package/extensions/ublock/_locales/ko/messages.json +4 -0
  235. package/extensions/ublock/_locales/ku/messages.json +4 -0
  236. package/extensions/ublock/_locales/lt/messages.json +4 -0
  237. package/extensions/ublock/_locales/lv/messages.json +4 -0
  238. package/extensions/ublock/_locales/mk/messages.json +4 -0
  239. package/extensions/ublock/_locales/ml/messages.json +4 -0
  240. package/extensions/ublock/_locales/mr/messages.json +4 -0
  241. package/extensions/ublock/_locales/ms/messages.json +13 -9
  242. package/extensions/ublock/_locales/nb/messages.json +4 -0
  243. package/extensions/ublock/_locales/nl/messages.json +4 -0
  244. package/extensions/ublock/_locales/no/messages.json +4 -0
  245. package/extensions/ublock/_locales/oc/messages.json +4 -0
  246. package/extensions/ublock/_locales/pa/messages.json +4 -0
  247. package/extensions/ublock/_locales/pl/messages.json +5 -1
  248. package/extensions/ublock/_locales/pt_BR/messages.json +4 -0
  249. package/extensions/ublock/_locales/pt_PT/messages.json +4 -0
  250. package/extensions/ublock/_locales/ro/messages.json +5 -1
  251. package/extensions/ublock/_locales/ru/messages.json +4 -0
  252. package/extensions/ublock/_locales/si/messages.json +4 -0
  253. package/extensions/ublock/_locales/sk/messages.json +4 -0
  254. package/extensions/ublock/_locales/sl/messages.json +4 -0
  255. package/extensions/ublock/_locales/so/messages.json +4 -0
  256. package/extensions/ublock/_locales/sq/messages.json +4 -0
  257. package/extensions/ublock/_locales/sr/messages.json +4 -0
  258. package/extensions/ublock/_locales/sv/messages.json +4 -0
  259. package/extensions/ublock/_locales/sw/messages.json +4 -0
  260. package/extensions/ublock/_locales/ta/messages.json +4 -0
  261. package/extensions/ublock/_locales/te/messages.json +4 -0
  262. package/extensions/ublock/_locales/th/messages.json +12 -8
  263. package/extensions/ublock/_locales/tr/messages.json +4 -0
  264. package/extensions/ublock/_locales/uk/messages.json +4 -0
  265. package/extensions/ublock/_locales/ur/messages.json +4 -0
  266. package/extensions/ublock/_locales/vi/messages.json +4 -0
  267. package/extensions/ublock/_locales/zh_CN/messages.json +6 -2
  268. package/extensions/ublock/_locales/zh_TW/messages.json +6 -2
  269. package/extensions/ublock/assets/assets.json +11 -11
  270. package/extensions/ublock/assets/resources/scriptlets.js +660 -378
  271. package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +7173 -3455
  272. package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +18829 -1918
  273. package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +21 -26
  274. package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +118 -46
  275. package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +710 -1117
  276. package/extensions/ublock/assets/ublock/badlists.txt +0 -4
  277. package/extensions/ublock/assets/ublock/badware.min.txt +116 -105
  278. package/extensions/ublock/assets/ublock/filters.min.txt +1443 -1097
  279. package/extensions/ublock/assets/ublock/privacy.min.txt +50 -31
  280. package/extensions/ublock/assets/ublock/quick-fixes.min.txt +97 -108
  281. package/extensions/ublock/assets/ublock/unbreak.min.txt +64 -21
  282. package/extensions/ublock/css/1p-filters.css +4 -0
  283. package/extensions/ublock/css/3p-filters.css +6 -4
  284. package/extensions/ublock/css/common.css +1 -1
  285. package/extensions/ublock/css/fa-icons.css +1 -0
  286. package/extensions/ublock/css/logger-ui.css +72 -52
  287. package/extensions/ublock/css/popup-fenix.css +1 -1
  288. package/extensions/ublock/img/fontawesome/fontawesome-defs.svg +1 -0
  289. package/extensions/ublock/js/3p-filters.js +3 -3
  290. package/extensions/ublock/js/assets.js +7 -4
  291. package/extensions/ublock/js/background.js +1 -3
  292. package/extensions/ublock/js/benchmarks.js +1 -0
  293. package/extensions/ublock/js/broadcast.js +12 -0
  294. package/extensions/ublock/js/click2load.js +2 -3
  295. package/extensions/ublock/js/codemirror/ubo-static-filtering.js +1 -0
  296. package/extensions/ublock/js/commands.js +10 -0
  297. package/extensions/ublock/js/contentscript-extra.js +13 -11
  298. package/extensions/ublock/js/contentscript.js +0 -31
  299. package/extensions/ublock/js/contextmenu.js +5 -1
  300. package/extensions/ublock/js/dyna-rules.js +83 -52
  301. package/extensions/ublock/js/fa-icons.js +1 -0
  302. package/extensions/ublock/js/filtering-context.js +0 -2
  303. package/extensions/ublock/js/i18n.js +1 -5
  304. package/extensions/ublock/js/logger-ui.js +71 -38
  305. package/extensions/ublock/js/logger.js +18 -14
  306. package/extensions/ublock/js/messaging.js +17 -5
  307. package/extensions/ublock/js/popup-fenix.js +6 -6
  308. package/extensions/ublock/js/scriptlet-filtering-core.js +14 -12
  309. package/extensions/ublock/js/scriptlet-filtering.js +149 -53
  310. package/extensions/ublock/js/scriptlets/scriptlet-loglevel-1.js +49 -0
  311. package/extensions/ublock/js/scriptlets/scriptlet-loglevel-2.js +49 -0
  312. package/extensions/ublock/js/scriptlets/should-inject-contentscript.js +1 -1
  313. package/extensions/ublock/js/static-dnr-filtering.js +4 -2
  314. package/extensions/ublock/js/static-filtering-parser.js +14 -8
  315. package/extensions/ublock/js/static-net-filtering.js +32 -30
  316. package/extensions/ublock/js/storage.js +18 -4
  317. package/extensions/ublock/js/traffic.js +3 -3
  318. package/extensions/ublock/js/ublock.js +1 -1
  319. package/extensions/ublock/js/vapi-background.js +15 -7
  320. package/extensions/ublock/logger-ui.html +18 -10
  321. package/extensions/ublock/manifest.json +4 -1
  322. package/extensions/ublock/web_accessible_resources/chartbeat.js +3 -0
  323. package/package.json +12 -11
  324. package/scripts/build-function.js +1 -1
  325. package/scripts/build-open-api.js +3 -2
  326. package/scripts/clean.js +6 -1
  327. package/scripts/install-debugger.js +20 -0
  328. package/scripts/install-devtools.js +40 -0
  329. package/src/browserless.ts +11 -9
  330. package/src/browsers/chrome.cdp.ts +10 -0
  331. package/src/browsers/chrome.playwright.ts +10 -0
  332. package/src/browsers/{cdp-chromium.ts → chromium.cdp.ts} +20 -13
  333. package/src/browsers/{playwright-chromium.ts → chromium.playwright.ts} +7 -6
  334. package/src/browsers/{playwright-firefox.ts → firefox.playwright.ts} +5 -5
  335. package/src/browsers/index.ts +160 -23
  336. package/src/browsers/{playwright-webkit.ts → webkit.playwright.ts} +5 -5
  337. package/src/exports.ts +6 -4
  338. package/src/http.ts +21 -0
  339. package/src/router.ts +21 -5
  340. package/src/routes/chrome/http/content.post.ts +14 -0
  341. package/src/routes/chrome/http/download.post.ts +14 -0
  342. package/src/routes/chrome/http/function.post.ts +14 -0
  343. package/src/routes/chrome/http/json-list.get.ts +1 -0
  344. package/src/routes/chrome/http/json-new.put.ts +1 -0
  345. package/src/routes/chrome/http/json-protocol.get.ts +1 -0
  346. package/src/routes/chrome/http/json-version.get.ts +1 -0
  347. package/src/routes/chrome/http/pdf.post.ts +14 -0
  348. package/src/routes/chrome/http/performance.post.ts +14 -0
  349. package/src/routes/chrome/http/scrape.post.ts +14 -0
  350. package/src/routes/chrome/http/screenshot.post.ts +14 -0
  351. package/src/routes/chrome/tests/content.spec.ts +375 -0
  352. package/src/routes/chrome/tests/download.spec.ts +77 -0
  353. package/src/routes/chrome/tests/function.spec.ts +282 -0
  354. package/src/routes/chrome/tests/json-version.spec.ts +52 -0
  355. package/src/routes/chrome/tests/page-websocket.spec.ts +129 -0
  356. package/src/routes/chrome/tests/pdf.spec.ts +380 -0
  357. package/src/routes/chrome/tests/performance.spec.ts +155 -0
  358. package/src/routes/chrome/tests/scrape.spec.ts +417 -0
  359. package/src/routes/chrome/tests/screenshot.spec.ts +387 -0
  360. package/src/routes/chrome/tests/websocket.spec.ts +491 -0
  361. package/src/routes/chrome/ws/browser.ts +8 -0
  362. package/src/routes/chrome/ws/cdp.ts +12 -0
  363. package/src/routes/chrome/ws/page.ts +8 -0
  364. package/src/routes/chrome/ws/playwright.ts +12 -0
  365. package/src/routes/chromium/http/content.post.ts +6 -0
  366. package/src/routes/chromium/http/download.post.ts +6 -0
  367. package/src/routes/chromium/http/function.post.ts +6 -0
  368. package/src/routes/chromium/http/json-list.get.ts +1 -0
  369. package/src/routes/chromium/http/json-new.put.ts +1 -0
  370. package/src/routes/chromium/http/json-protocol.get.ts +1 -0
  371. package/src/routes/chromium/http/json-version.get.ts +1 -0
  372. package/src/routes/chromium/http/pdf.post.ts +6 -0
  373. package/src/routes/chromium/http/performance.post.ts +6 -0
  374. package/src/routes/chromium/http/scrape.post.ts +6 -0
  375. package/src/routes/chromium/http/screenshot.post.ts +6 -0
  376. package/src/routes/chromium/tests/content.spec.ts +36 -28
  377. package/src/routes/chromium/tests/download.spec.ts +3 -3
  378. package/src/routes/chromium/tests/function.spec.ts +18 -15
  379. package/src/routes/chromium/tests/page-websocket.spec.ts +129 -0
  380. package/src/routes/chromium/tests/pdf.spec.ts +31 -26
  381. package/src/routes/chromium/tests/performance.spec.ts +46 -34
  382. package/src/routes/chromium/tests/scrape.spec.ts +23 -20
  383. package/src/routes/chromium/tests/screenshot.spec.ts +24 -24
  384. package/src/routes/chromium/tests/websocket.spec.ts +31 -40
  385. package/src/routes/chromium/ws/browser.ts +1 -29
  386. package/src/routes/chromium/ws/cdp.ts +1 -0
  387. package/src/routes/chromium/ws/page.ts +1 -29
  388. package/src/routes/chromium/ws/playwright.ts +4 -0
  389. package/src/routes/firefox/ws/{playwright-firefox.ts → playwright.ts} +5 -5
  390. package/src/routes/management/http/{static-get.ts → static.get.ts} +2 -2
  391. package/src/routes/webkit/ws/{playwright-webkit.ts → playwright.ts} +5 -5
  392. package/src/shared/browser.ws.ts +34 -0
  393. package/src/{routes/chromium/ws/playwright-chromium.ts → shared/chromium.playwright.ws.ts} +7 -4
  394. package/src/{routes/chromium/ws/cdp-chromium.ts → shared/chromium.ws.ts} +6 -6
  395. package/src/{routes/chromium/http/content-post.ts → shared/content.http.ts} +4 -4
  396. package/src/{routes/chromium/http/download-post.ts → shared/download.http.ts} +4 -4
  397. package/src/{routes/chromium/http/function-post.ts → shared/function.http.ts} +4 -4
  398. package/src/shared/json-list.http.ts +35 -0
  399. package/src/{routes/chromium/http/json-new.ts → shared/json-new.http.ts} +23 -7
  400. package/src/{routes/chromium/http/json-protocol-get.ts → shared/json-protocol.http.ts} +3 -5
  401. package/src/{routes/chromium/http/json-version-get.ts → shared/json-version.http.ts} +4 -5
  402. package/src/shared/page.ws.ts +35 -0
  403. package/src/{routes/chromium/http/pdf-post.ts → shared/pdf.http.ts} +4 -4
  404. package/src/{routes/chromium/http/performance.ts → shared/performance.http.ts} +4 -4
  405. package/src/{routes/chromium/http/scrape-post.ts → shared/scrape.http.ts} +4 -4
  406. package/src/{routes/chromium/http/screenshot-post.ts → shared/screenshot.http.ts} +4 -4
  407. package/src/{routes/chromium → shared}/utils/function/handler.ts +2 -2
  408. package/src/{routes/chromium → shared}/utils/performance/main.ts +1 -2
  409. package/src/shim.ts +2 -1
  410. package/src/types.ts +27 -20
  411. package/src/utils.ts +32 -14
  412. package/static/devtools/Images/accelerometer-back.svg +1 -0
  413. package/static/devtools/Images/accelerometer-bottom.png +0 -0
  414. package/static/devtools/Images/accelerometer-front.svg +1 -0
  415. package/static/devtools/Images/accelerometer-left.png +0 -0
  416. package/static/devtools/Images/accelerometer-right.png +0 -0
  417. package/static/devtools/Images/accelerometer-top.png +0 -0
  418. package/static/devtools/Images/baseline-icon.svg +1 -0
  419. package/static/devtools/Images/breaking_change_icon.svg +1 -0
  420. package/static/devtools/Images/checkboxCheckmark.svg +1 -0
  421. package/static/devtools/Images/checker.png +0 -0
  422. package/static/devtools/Images/chevrons.svg +1 -0
  423. package/static/devtools/Images/chromeDisabledSelect.png +0 -0
  424. package/static/devtools/Images/chromeDisabledSelect_2x.png +0 -0
  425. package/static/devtools/Images/chromeLeft.avif +0 -0
  426. package/static/devtools/Images/chromeMiddle.avif +0 -0
  427. package/static/devtools/Images/chromeRight.avif +0 -0
  428. package/static/devtools/Images/chromeSelect.svg +1 -0
  429. package/static/devtools/Images/chromeSelectDark.svg +1 -0
  430. package/static/devtools/Images/cssoverview_icons_2x.avif +0 -0
  431. package/static/devtools/Images/dropdown_7x6_icon.svg +1 -0
  432. package/static/devtools/Images/elements_panel_icon.svg +1 -0
  433. package/static/devtools/Images/errorWave.svg +1 -0
  434. package/static/devtools/Images/error_icon.svg +1 -0
  435. package/static/devtools/Images/feedback_thin_16x16_icon.svg +1 -0
  436. package/static/devtools/Images/flex-align-content-center-icon.svg +1 -0
  437. package/static/devtools/Images/flex-align-content-end-icon.svg +1 -0
  438. package/static/devtools/Images/flex-align-content-space-around-icon.svg +1 -0
  439. package/static/devtools/Images/flex-align-content-space-between-icon.svg +1 -0
  440. package/static/devtools/Images/flex-align-content-space-evenly-icon.svg +1 -0
  441. package/static/devtools/Images/flex-align-content-start-icon.svg +1 -0
  442. package/static/devtools/Images/flex-align-content-stretch-icon.svg +1 -0
  443. package/static/devtools/Images/flex-align-items-center-icon.svg +1 -0
  444. package/static/devtools/Images/flex-align-items-flex-end-icon.svg +1 -0
  445. package/static/devtools/Images/flex-align-items-flex-start-icon.svg +1 -0
  446. package/static/devtools/Images/flex-align-items-stretch-icon.svg +1 -0
  447. package/static/devtools/Images/flex-align-self-center-icon.svg +1 -0
  448. package/static/devtools/Images/flex-align-self-flex-end-icon.svg +1 -0
  449. package/static/devtools/Images/flex-align-self-flex-start-icon.svg +1 -0
  450. package/static/devtools/Images/flex-align-self-stretch-icon.svg +1 -0
  451. package/static/devtools/Images/flex-direction-icon.svg +1 -0
  452. package/static/devtools/Images/flex-justify-content-center-icon.svg +1 -0
  453. package/static/devtools/Images/flex-justify-content-flex-end-icon.svg +1 -0
  454. package/static/devtools/Images/flex-justify-content-flex-start-icon.svg +1 -0
  455. package/static/devtools/Images/flex-justify-content-space-around-icon.svg +1 -0
  456. package/static/devtools/Images/flex-justify-content-space-between-icon.svg +1 -0
  457. package/static/devtools/Images/flex-justify-content-space-evenly-icon.svg +1 -0
  458. package/static/devtools/Images/ic_checkmark_16x16.svg +3 -0
  459. package/static/devtools/Images/ic_delete_filter.svg +1 -0
  460. package/static/devtools/Images/ic_delete_list.svg +1 -0
  461. package/static/devtools/Images/ic_info_black_18dp.svg +1 -0
  462. package/static/devtools/Images/ic_page_next_16x16_icon.svg +1 -0
  463. package/static/devtools/Images/ic_page_prev_16x16_icon.svg +1 -0
  464. package/static/devtools/Images/ic_redo_16x16_icon.svg +1 -0
  465. package/static/devtools/Images/ic_show_node_16x16.svg +4 -0
  466. package/static/devtools/Images/ic_suggest_color.svg +6 -0
  467. package/static/devtools/Images/ic_undo_16x16_icon.svg +1 -0
  468. package/static/devtools/Images/ic_warning_black_18dp.svg +1 -0
  469. package/static/devtools/Images/issue-text-icon.svg +1 -0
  470. package/static/devtools/Images/largeIcons.svg +1 -0
  471. package/static/devtools/Images/lighthouse_logo.svg +1 -0
  472. package/static/devtools/Images/link_icon.svg +1 -0
  473. package/static/devtools/Images/mediumIcons.svg +1 -0
  474. package/static/devtools/Images/navigationControls.png +0 -0
  475. package/static/devtools/Images/navigationControls_2x.png +0 -0
  476. package/static/devtools/Images/network_panel_icon.svg +1 -0
  477. package/static/devtools/Images/nodeIcon.avif +0 -0
  478. package/static/devtools/Images/node_search_icon.svg +1 -0
  479. package/static/devtools/Images/popoverArrows.png +0 -0
  480. package/static/devtools/Images/profileGroupIcon.png +0 -0
  481. package/static/devtools/Images/profileIcon.png +0 -0
  482. package/static/devtools/Images/profileSmallIcon.png +0 -0
  483. package/static/devtools/Images/radioDot-dark-theme.png +0 -0
  484. package/static/devtools/Images/radioDot.png +0 -0
  485. package/static/devtools/Images/refresh_12x12_icon.svg +1 -0
  486. package/static/devtools/Images/resizeDiagonal.svg +1 -0
  487. package/static/devtools/Images/resizeHorizontal.svg +1 -0
  488. package/static/devtools/Images/resizeVertical.svg +1 -0
  489. package/static/devtools/Images/resourceCSSIcon.png +0 -0
  490. package/static/devtools/Images/resourceDocumentIcon.png +0 -0
  491. package/static/devtools/Images/resourceDocumentIconSmall.png +0 -0
  492. package/static/devtools/Images/resourceJSIcon.png +0 -0
  493. package/static/devtools/Images/resourcePlainIcon.png +0 -0
  494. package/static/devtools/Images/resourcePlainIconSmall.png +0 -0
  495. package/static/devtools/Images/resourcesTimeGraphIcon.avif +0 -0
  496. package/static/devtools/Images/searchNext.png +0 -0
  497. package/static/devtools/Images/searchPrev.png +0 -0
  498. package/static/devtools/Images/securityIcons.svg +1 -0
  499. package/static/devtools/Images/settings_14x14_icon.svg +1 -0
  500. package/static/devtools/Images/smallIcons.svg +1 -0
  501. package/static/devtools/Images/sources_panel_icon.svg +1 -0
  502. package/static/devtools/Images/speech.png +0 -0
  503. package/static/devtools/Images/toolbarResizerVertical.png +0 -0
  504. package/static/devtools/Images/touchCursor.png +0 -0
  505. package/static/devtools/Images/touchCursor_2x.png +0 -0
  506. package/static/devtools/Images/treeoutlineTriangles.svg +1 -0
  507. package/static/devtools/Images/warning_icon.svg +1 -0
  508. package/static/devtools/Images/whatsnew.avif +0 -0
  509. package/static/devtools/Tests.js +1654 -0
  510. package/static/devtools/accessibility/accessibility-legacy.js +1 -0
  511. package/static/devtools/accessibility/accessibility-meta.js +1 -0
  512. package/static/devtools/accessibility/accessibility.js +1 -0
  513. package/static/devtools/accessibility/accessibility_module.js +1 -0
  514. package/static/devtools/accessibility_test_runner/accessibility_test_runner.js +77 -0
  515. package/static/devtools/accessibility_test_runner/accessibility_test_runner_module.js +0 -0
  516. package/static/devtools/animation/animation-legacy.js +1 -0
  517. package/static/devtools/animation/animation-meta.js +1 -0
  518. package/static/devtools/animation/animation.js +1 -0
  519. package/static/devtools/animation/animation_module.js +1 -0
  520. package/static/devtools/application_test_runner/AppcacheTestRunner.js +220 -0
  521. package/static/devtools/application_test_runner/CacheStorageTestRunner.js +286 -0
  522. package/static/devtools/application_test_runner/IndexedDBTestRunner.js +476 -0
  523. package/static/devtools/application_test_runner/ResourceTreeTestRunner.js +99 -0
  524. package/static/devtools/application_test_runner/ResourcesTestRunner.js +167 -0
  525. package/static/devtools/application_test_runner/ServiceWorkersTestRunner.js +131 -0
  526. package/static/devtools/application_test_runner/application_test_runner.js +10 -0
  527. package/static/devtools/application_test_runner/application_test_runner_module.js +0 -0
  528. package/static/devtools/axe_core_test_runner/axe_core_test_runner.js +174 -0
  529. package/static/devtools/axe_core_test_runner/axe_core_test_runner_module.js +0 -0
  530. package/static/devtools/bindings/bindings-legacy.js +1 -0
  531. package/static/devtools/bindings/bindings.js +1 -0
  532. package/static/devtools/bindings_test_runner/AutomappingTestRunner.js +130 -0
  533. package/static/devtools/bindings_test_runner/BindingsTestRunner.js +238 -0
  534. package/static/devtools/bindings_test_runner/IsolatedFilesystemTestRunner.js +287 -0
  535. package/static/devtools/bindings_test_runner/OverridesTestRunner.js +26 -0
  536. package/static/devtools/bindings_test_runner/PersistenceTestRunner.js +109 -0
  537. package/static/devtools/bindings_test_runner/bindings_test_runner.js +9 -0
  538. package/static/devtools/bindings_test_runner/bindings_test_runner_module.js +0 -0
  539. package/static/devtools/browser_debugger/browser_debugger-legacy.js +1 -0
  540. package/static/devtools/browser_debugger/browser_debugger-meta.js +1 -0
  541. package/static/devtools/browser_debugger/browser_debugger.js +1 -0
  542. package/static/devtools/browser_debugger/browser_debugger_module.js +1 -0
  543. package/static/devtools/browser_sdk/browser_sdk-meta.js +1 -0
  544. package/static/devtools/browser_sdk/browser_sdk.js +1 -0
  545. package/static/devtools/changes/changes-legacy.js +1 -0
  546. package/static/devtools/changes/changes-meta.js +1 -0
  547. package/static/devtools/changes/changes.js +1 -0
  548. package/static/devtools/changes/changes_module.js +1 -0
  549. package/static/devtools/client_variations/client_variations.js +1 -0
  550. package/static/devtools/client_variations/client_variations_module.js +0 -0
  551. package/static/devtools/cm/cm.js +1 -0
  552. package/static/devtools/cm/cm_module.js +1 -0
  553. package/static/devtools/cm_headless/cm_headless.js +1 -0
  554. package/static/devtools/color_picker/color_picker-legacy.js +1 -0
  555. package/static/devtools/color_picker/color_picker.js +1 -0
  556. package/static/devtools/color_picker/color_picker_module.js +1 -0
  557. package/static/devtools/common/common-legacy.js +1 -0
  558. package/static/devtools/common/common.js +1 -0
  559. package/static/devtools/component_helpers/component_helpers.js +1 -0
  560. package/static/devtools/components/components-legacy.js +1 -0
  561. package/static/devtools/components/components.js +1 -0
  562. package/static/devtools/console/console-legacy.js +1 -0
  563. package/static/devtools/console/console-meta.js +1 -0
  564. package/static/devtools/console/console.js +6 -0
  565. package/static/devtools/console/console_module.js +1 -0
  566. package/static/devtools/console_counters/console_counters-legacy.js +1 -0
  567. package/static/devtools/console_counters/console_counters.js +1 -0
  568. package/static/devtools/console_test_runner/console_test_runner.js +696 -0
  569. package/static/devtools/console_test_runner/console_test_runner_module.js +0 -0
  570. package/static/devtools/cookie_table/cookie_table-legacy.js +1 -0
  571. package/static/devtools/cookie_table/cookie_table.js +1 -0
  572. package/static/devtools/cookie_table/cookie_table_module.js +1 -0
  573. package/static/devtools/coverage/coverage-legacy.js +1 -0
  574. package/static/devtools/coverage/coverage-meta.js +1 -0
  575. package/static/devtools/coverage/coverage.js +1 -0
  576. package/static/devtools/coverage/coverage_module.js +1 -0
  577. package/static/devtools/coverage_test_runner/coverage_test_runner.js +151 -0
  578. package/static/devtools/coverage_test_runner/coverage_test_runner_module.js +0 -0
  579. package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner.js +72 -0
  580. package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner_module.js +0 -0
  581. package/static/devtools/css_overview/css_overview-meta.js +1 -0
  582. package/static/devtools/css_overview/css_overview.js +146 -0
  583. package/static/devtools/css_overview/css_overview_module.js +1 -0
  584. package/static/devtools/data_grid/data_grid-legacy.js +1 -0
  585. package/static/devtools/data_grid/data_grid.js +1 -0
  586. package/static/devtools/data_grid/data_grid_module.js +1 -0
  587. package/static/devtools/data_grid_test_runner/data_grid_test_runner.js +78 -0
  588. package/static/devtools/data_grid_test_runner/data_grid_test_runner_module.js +0 -0
  589. package/static/devtools/developer_resources/developer_resources-legacy.js +1 -0
  590. package/static/devtools/developer_resources/developer_resources-meta.js +1 -0
  591. package/static/devtools/developer_resources/developer_resources.js +1 -0
  592. package/static/devtools/developer_resources/developer_resources_module.js +1 -0
  593. package/static/devtools/device_mode_test_runner/device_mode_test_runner.js +45 -0
  594. package/static/devtools/device_mode_test_runner/device_mode_test_runner_module.js +0 -0
  595. package/static/devtools/devtools_app.html +20 -0
  596. package/static/devtools/devtools_app.js +1 -0
  597. package/static/devtools/devtools_compatibility.js +1546 -0
  598. package/static/devtools/diff/diff-legacy.js +1 -0
  599. package/static/devtools/diff/diff.js +1 -0
  600. package/static/devtools/diff/diff_module.js +0 -0
  601. package/static/devtools/dom_extension/dom_extension.js +1 -0
  602. package/static/devtools/elements/elements-legacy.js +1 -0
  603. package/static/devtools/elements/elements-meta.js +1 -0
  604. package/static/devtools/elements/elements.js +469 -0
  605. package/static/devtools/elements/elements_module.js +1 -0
  606. package/static/devtools/elements_test_runner/EditDOMTestRunner.js +78 -0
  607. package/static/devtools/elements_test_runner/ElementsPanelShadowSelectionOnRefreshTestRunner.js +39 -0
  608. package/static/devtools/elements_test_runner/ElementsTestRunner.js +1280 -0
  609. package/static/devtools/elements_test_runner/SetOuterHTMLTestRunner.js +115 -0
  610. package/static/devtools/elements_test_runner/StylesUpdateLinksTestRunner.js +134 -0
  611. package/static/devtools/elements_test_runner/elements_test_runner.js +9 -0
  612. package/static/devtools/elements_test_runner/elements_test_runner_module.js +0 -0
  613. package/static/devtools/emulated_devices/emulated_devices_module.js +0 -0
  614. package/static/devtools/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  615. package/static/devtools/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  616. package/static/devtools/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  617. package/static/devtools/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  618. package/static/devtools/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  619. package/static/devtools/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  620. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  621. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  622. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  623. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  624. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  625. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  626. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  627. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  628. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  629. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  630. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  631. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  632. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  633. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  634. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  635. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  636. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  637. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  638. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  639. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  640. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  641. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  642. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  643. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  644. package/static/devtools/emulated_devices/optimized/iPad-landscape.avif +0 -0
  645. package/static/devtools/emulated_devices/optimized/iPad-portrait.avif +0 -0
  646. package/static/devtools/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  647. package/static/devtools/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  648. package/static/devtools/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  649. package/static/devtools/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  650. package/static/devtools/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  651. package/static/devtools/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  652. package/static/devtools/emulation/emulation-legacy.js +1 -0
  653. package/static/devtools/emulation/emulation-meta.js +1 -0
  654. package/static/devtools/emulation/emulation.js +1 -0
  655. package/static/devtools/event_listeners/event_listeners-legacy.js +1 -0
  656. package/static/devtools/event_listeners/event_listeners.js +1 -0
  657. package/static/devtools/event_listeners/event_listeners_module.js +1 -0
  658. package/static/devtools/extensions/extensions-legacy.js +1 -0
  659. package/static/devtools/extensions/extensions.js +1 -0
  660. package/static/devtools/extensions_test_runner/ExtensionsNetworkTestRunner.js +27 -0
  661. package/static/devtools/extensions_test_runner/ExtensionsTestRunner.js +68 -0
  662. package/static/devtools/extensions_test_runner/extensions_test_runner.js +6 -0
  663. package/static/devtools/extensions_test_runner/extensions_test_runner_module.js +0 -0
  664. package/static/devtools/formatter/formatter-legacy.js +1 -0
  665. package/static/devtools/formatter/formatter.js +1 -0
  666. package/static/devtools/formatter/formatter_module.js +0 -0
  667. package/static/devtools/formatter_worker/FormatterActions.js +1 -0
  668. package/static/devtools/formatter_worker/formatter_worker-entrypoint.js +1 -0
  669. package/static/devtools/formatter_worker/formatter_worker.js +1 -0
  670. package/static/devtools/har_importer/har_importer-legacy.js +1 -0
  671. package/static/devtools/har_importer/har_importer.js +1 -0
  672. package/static/devtools/har_importer/har_importer_module.js +0 -0
  673. package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner.js +740 -0
  674. package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner_module.js +0 -0
  675. package/static/devtools/heap_snapshot_model/heap_snapshot_model-legacy.js +1 -0
  676. package/static/devtools/heap_snapshot_model/heap_snapshot_model.js +1 -0
  677. package/static/devtools/heap_snapshot_model/heap_snapshot_model_module.js +0 -0
  678. package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
  679. package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-legacy.js +1 -0
  680. package/static/devtools/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
  681. package/static/devtools/heap_snapshot_worker/heap_snapshot_worker_module.js +0 -0
  682. package/static/devtools/help/help-legacy.js +1 -0
  683. package/static/devtools/help/help-meta.js +1 -0
  684. package/static/devtools/help/help.js +1 -0
  685. package/static/devtools/help/help_module.js +1 -0
  686. package/static/devtools/host/host-legacy.js +1 -0
  687. package/static/devtools/host/host.js +1 -0
  688. package/static/devtools/i18n/i18n.js +1 -0
  689. package/static/devtools/i18n/i18n_locales-tsconfig.json +8 -0
  690. package/static/devtools/i18n/locales/en-US.json +3566 -0
  691. package/static/devtools/inline_editor/inline_editor-legacy.js +1 -0
  692. package/static/devtools/inline_editor/inline_editor.js +203 -0
  693. package/static/devtools/inline_editor/inline_editor_module.js +1 -0
  694. package/static/devtools/input/input-legacy.js +1 -0
  695. package/static/devtools/input/input-meta.js +1 -0
  696. package/static/devtools/input/input.js +1 -0
  697. package/static/devtools/input/input_module.js +1 -0
  698. package/static/devtools/inspector.html +20 -0
  699. package/static/devtools/inspector.js +1 -0
  700. package/static/devtools/inspector_main/inspector_main-legacy.js +1 -0
  701. package/static/devtools/inspector_main/inspector_main-meta.js +1 -0
  702. package/static/devtools/inspector_main/inspector_main.js +1 -0
  703. package/static/devtools/integration_test_runner.html +14 -0
  704. package/static/devtools/integration_test_runner.js +2 -0
  705. package/static/devtools/issues/issues-legacy.js +1 -0
  706. package/static/devtools/issues/issues-meta.js +1 -0
  707. package/static/devtools/issues/issues.js +67 -0
  708. package/static/devtools/issues/issues_module.js +1 -0
  709. package/static/devtools/javascript_metadata/javascript_metadata-legacy.js +1 -0
  710. package/static/devtools/javascript_metadata/javascript_metadata.js +1 -0
  711. package/static/devtools/javascript_metadata/javascript_metadata_module.js +0 -0
  712. package/static/devtools/js_app.html +20 -0
  713. package/static/devtools/js_app.js +1 -0
  714. package/static/devtools/js_main/js_main-legacy.js +1 -0
  715. package/static/devtools/js_main/js_main.js +1 -0
  716. package/static/devtools/js_profiler/js_profiler-meta.js +1 -0
  717. package/static/devtools/js_profiler/js_profiler.js +1 -0
  718. package/static/devtools/js_profiler/js_profiler_module.js +0 -0
  719. package/static/devtools/layer_viewer/layer_viewer-legacy.js +1 -0
  720. package/static/devtools/layer_viewer/layer_viewer.js +1 -0
  721. package/static/devtools/layer_viewer/layer_viewer_module.js +1 -0
  722. package/static/devtools/layers/layers-legacy.js +1 -0
  723. package/static/devtools/layers/layers-meta.js +1 -0
  724. package/static/devtools/layers/layers.js +1 -0
  725. package/static/devtools/layers/layers_module.js +0 -0
  726. package/static/devtools/layers_test_runner/layers_test_runner.js +156 -0
  727. package/static/devtools/layers_test_runner/layers_test_runner_module.js +0 -0
  728. package/static/devtools/lighthouse/lighthouse-legacy.js +1 -0
  729. package/static/devtools/lighthouse/lighthouse-meta.js +1 -0
  730. package/static/devtools/lighthouse/lighthouse.js +70 -0
  731. package/static/devtools/lighthouse/lighthouse_module.js +1 -0
  732. package/static/devtools/lighthouse_test_runner/lighthouse_test_runner.js +136 -0
  733. package/static/devtools/lighthouse_test_runner/lighthouse_test_runner_module.js +0 -0
  734. package/static/devtools/lighthouse_worker/LighthouseService.js +195 -0
  735. package/static/devtools/lighthouse_worker/lighthouse_worker.js +6 -0
  736. package/static/devtools/lighthouse_worker.js +1 -0
  737. package/static/devtools/linear_memory_inspector/linear_memory_inspector-legacy.js +1 -0
  738. package/static/devtools/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
  739. package/static/devtools/linear_memory_inspector/linear_memory_inspector.js +399 -0
  740. package/static/devtools/linear_memory_inspector/linear_memory_inspector_module.js +0 -0
  741. package/static/devtools/main/main-legacy.js +1 -0
  742. package/static/devtools/main/main.js +1 -0
  743. package/static/devtools/media/media-legacy.js +1 -0
  744. package/static/devtools/media/media-meta.js +1 -0
  745. package/static/devtools/media/media.js +1 -0
  746. package/static/devtools/media/media_module.js +1 -0
  747. package/static/devtools/mobile_throttling/mobile_throttling-legacy.js +1 -0
  748. package/static/devtools/mobile_throttling/mobile_throttling-meta.js +1 -0
  749. package/static/devtools/mobile_throttling/mobile_throttling.js +1 -0
  750. package/static/devtools/ndb_app.html +20 -0
  751. package/static/devtools/ndb_app.js +1 -0
  752. package/static/devtools/network/network-legacy.js +1 -0
  753. package/static/devtools/network/network-meta.js +1 -0
  754. package/static/devtools/network/network.js +72 -0
  755. package/static/devtools/network/network_module.js +1 -0
  756. package/static/devtools/network_test_runner/network_test_runner.js +280 -0
  757. package/static/devtools/network_test_runner/network_test_runner_module.js +0 -0
  758. package/static/devtools/node_app.html +20 -0
  759. package/static/devtools/node_app.js +1 -0
  760. package/static/devtools/node_debugger/node_debugger-meta.js +1 -0
  761. package/static/devtools/node_debugger/node_debugger.js +1 -0
  762. package/static/devtools/node_debugger/node_debugger_module.js +0 -0
  763. package/static/devtools/node_main/node_main-legacy.js +1 -0
  764. package/static/devtools/node_main/node_main-meta.js +1 -0
  765. package/static/devtools/node_main/node_main.js +1 -0
  766. package/static/devtools/object_ui/object_ui-legacy.js +1 -0
  767. package/static/devtools/object_ui/object_ui.js +3 -0
  768. package/static/devtools/object_ui/object_ui_module.js +1 -0
  769. package/static/devtools/perf_ui/perf_ui-legacy.js +1 -0
  770. package/static/devtools/perf_ui/perf_ui.js +152 -0
  771. package/static/devtools/perf_ui/perf_ui_module.js +1 -0
  772. package/static/devtools/performance_monitor/performance_monitor-legacy.js +1 -0
  773. package/static/devtools/performance_monitor/performance_monitor-meta.js +1 -0
  774. package/static/devtools/performance_monitor/performance_monitor.js +1 -0
  775. package/static/devtools/performance_monitor/performance_monitor_module.js +1 -0
  776. package/static/devtools/performance_test_runner/TimelineDataTestRunner.js +5375 -0
  777. package/static/devtools/performance_test_runner/TimelineTestRunner.js +446 -0
  778. package/static/devtools/performance_test_runner/performance_test_runner.js +6 -0
  779. package/static/devtools/performance_test_runner/performance_test_runner_module.js +0 -0
  780. package/static/devtools/persistence/persistence-legacy.js +1 -0
  781. package/static/devtools/persistence/persistence-meta.js +1 -0
  782. package/static/devtools/persistence/persistence.js +1 -0
  783. package/static/devtools/platform/platform.js +1 -0
  784. package/static/devtools/profiler/profiler-legacy.js +1 -0
  785. package/static/devtools/profiler/profiler-meta.js +1 -0
  786. package/static/devtools/profiler/profiler.js +8 -0
  787. package/static/devtools/profiler/profiler_module.js +1 -0
  788. package/static/devtools/protocol_client/protocol_client-legacy.js +1 -0
  789. package/static/devtools/protocol_client/protocol_client.js +1 -0
  790. package/static/devtools/protocol_monitor/protocol_monitor-legacy.js +1 -0
  791. package/static/devtools/protocol_monitor/protocol_monitor-meta.js +1 -0
  792. package/static/devtools/protocol_monitor/protocol_monitor.js +1 -0
  793. package/static/devtools/protocol_monitor/protocol_monitor_module.js +1 -0
  794. package/static/devtools/quick_open/quick_open-legacy.js +1 -0
  795. package/static/devtools/quick_open/quick_open.js +1 -0
  796. package/static/devtools/quick_open/quick_open_module.js +1 -0
  797. package/static/devtools/recorder/recorder.js +1 -0
  798. package/static/devtools/resources/resources-legacy.js +1 -0
  799. package/static/devtools/resources/resources-meta.js +1 -0
  800. package/static/devtools/resources/resources.js +28 -0
  801. package/static/devtools/resources/resources_module.js +1 -0
  802. package/static/devtools/root/root-legacy.js +1 -0
  803. package/static/devtools/root/root.js +1 -0
  804. package/static/devtools/screencast/screencast-legacy.js +1 -0
  805. package/static/devtools/screencast/screencast.js +1 -0
  806. package/static/devtools/sdk/sdk-legacy.js +1 -0
  807. package/static/devtools/sdk/sdk.js +2 -0
  808. package/static/devtools/sdk_test_runner/sdk_test_runner.js +297 -0
  809. package/static/devtools/sdk_test_runner/sdk_test_runner_module.js +0 -0
  810. package/static/devtools/search/search-legacy.js +1 -0
  811. package/static/devtools/search/search.js +1 -0
  812. package/static/devtools/search/search_module.js +1 -0
  813. package/static/devtools/security/security-legacy.js +1 -0
  814. package/static/devtools/security/security-meta.js +1 -0
  815. package/static/devtools/security/security.js +1 -0
  816. package/static/devtools/security/security_module.js +1 -0
  817. package/static/devtools/security_test_runner/security_test_runner.js +32 -0
  818. package/static/devtools/security_test_runner/security_test_runner_module.js +0 -0
  819. package/static/devtools/services/services-legacy.js +1 -0
  820. package/static/devtools/services/services.js +1 -0
  821. package/static/devtools/settings/settings-legacy.js +1 -0
  822. package/static/devtools/settings/settings-meta.js +1 -0
  823. package/static/devtools/settings/settings.js +1 -0
  824. package/static/devtools/settings/settings_module.js +1 -0
  825. package/static/devtools/shell.js +1 -0
  826. package/static/devtools/snippets/snippets-legacy.js +1 -0
  827. package/static/devtools/snippets/snippets.js +1 -0
  828. package/static/devtools/snippets/snippets_module.js +0 -0
  829. package/static/devtools/source_frame/source_frame-legacy.js +1 -0
  830. package/static/devtools/source_frame/source_frame.js +1 -0
  831. package/static/devtools/source_frame/source_frame_module.js +1 -0
  832. package/static/devtools/sources/sources-legacy.js +1 -0
  833. package/static/devtools/sources/sources-meta.js +1 -0
  834. package/static/devtools/sources/sources.js +13 -0
  835. package/static/devtools/sources/sources_module.js +1 -0
  836. package/static/devtools/sources_test_runner/AutocompleteTestRunner.js +46 -0
  837. package/static/devtools/sources_test_runner/DebuggerTestRunner.js +895 -0
  838. package/static/devtools/sources_test_runner/EditorTestRunner.js +237 -0
  839. package/static/devtools/sources_test_runner/LiveEditTestRunner.js +33 -0
  840. package/static/devtools/sources_test_runner/SearchTestRunner.js +158 -0
  841. package/static/devtools/sources_test_runner/SourcesTestRunner.js +173 -0
  842. package/static/devtools/sources_test_runner/sources_test_runner.js +10 -0
  843. package/static/devtools/sources_test_runner/sources_test_runner_module.js +0 -0
  844. package/static/devtools/startup/startup.js +1 -0
  845. package/static/devtools/test_runner/test_runner.js +1 -0
  846. package/static/devtools/text_editor/text_editor-legacy.js +1 -0
  847. package/static/devtools/text_editor/text_editor.js +1 -0
  848. package/static/devtools/text_editor/text_editor_module.js +1 -0
  849. package/static/devtools/text_utils/text_utils-legacy.js +1 -0
  850. package/static/devtools/text_utils/text_utils.js +1 -0
  851. package/static/devtools/theme_support/theme_support.js +1 -0
  852. package/static/devtools/third_party/acorn/acorn-tsconfig.json +8 -0
  853. package/static/devtools/third_party/acorn/acorn.js +1 -0
  854. package/static/devtools/third_party/acorn/package/dist/acorn.d.ts +209 -0
  855. package/static/devtools/third_party/acorn/package/dist/acorn.mjs +5261 -0
  856. package/static/devtools/third_party/acorn/package/dist/acorn.mjs.d.ts +2 -0
  857. package/static/devtools/third_party/acorn/package/dist/acorn.mjs.map +1 -0
  858. package/static/devtools/third_party/acorn-loose/acorn-loose-tsconfig.json +8 -0
  859. package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.d.ts +16 -0
  860. package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.mjs +1418 -0
  861. package/static/devtools/third_party/axe-core/axe.js +16423 -0
  862. package/static/devtools/third_party/chromium/chromium-tsconfig.json +8 -0
  863. package/static/devtools/third_party/chromium/client-variations/ClientVariations.d.ts +13 -0
  864. package/static/devtools/third_party/chromium/client-variations/ClientVariations.js +27 -0
  865. package/static/devtools/third_party/codemirror/codemirror-tsconfig.json +72 -0
  866. package/static/devtools/third_party/codemirror/package/addon/comment/comment.d.ts +4 -0
  867. package/static/devtools/third_party/codemirror/package/addon/comment/comment.js +211 -0
  868. package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.d.ts +1 -0
  869. package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.js +201 -0
  870. package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.d.ts +1 -0
  871. package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.js +158 -0
  872. package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.d.ts +1 -0
  873. package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.js +105 -0
  874. package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.d.ts +1 -0
  875. package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.js +157 -0
  876. package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.d.ts +1 -0
  877. package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.js +163 -0
  878. package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.d.ts +1 -0
  879. package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.js +131 -0
  880. package/static/devtools/third_party/codemirror/package/addon/mode/overlay.d.ts +1 -0
  881. package/static/devtools/third_party/codemirror/package/addon/mode/overlay.js +90 -0
  882. package/static/devtools/third_party/codemirror/package/addon/mode/simple.d.ts +1 -0
  883. package/static/devtools/third_party/codemirror/package/addon/mode/simple.js +216 -0
  884. package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.d.ts +1 -0
  885. package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.js +333 -0
  886. package/static/devtools/third_party/codemirror/package/addon/selection/active-line.d.ts +1 -0
  887. package/static/devtools/third_party/codemirror/package/addon/selection/active-line.js +72 -0
  888. package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.d.ts +1 -0
  889. package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.js +119 -0
  890. package/static/devtools/third_party/codemirror/package/lib/codemirror.d.ts +1 -0
  891. package/static/devtools/third_party/codemirror/package/lib/codemirror.js +9800 -0
  892. package/static/devtools/third_party/codemirror/package/mode/clike/clike.d.ts +4 -0
  893. package/static/devtools/third_party/codemirror/package/mode/clike/clike.js +935 -0
  894. package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.d.ts +4 -0
  895. package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.js +292 -0
  896. package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.d.ts +4 -0
  897. package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.js +359 -0
  898. package/static/devtools/third_party/codemirror/package/mode/css/css.d.ts +1 -0
  899. package/static/devtools/third_party/codemirror/package/mode/css/css.js +864 -0
  900. package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.d.ts +1 -0
  901. package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.js +37 -0
  902. package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.d.ts +1 -0
  903. package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.js +153 -0
  904. package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.d.ts +1 -0
  905. package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.js +942 -0
  906. package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.d.ts +4 -0
  907. package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.js +148 -0
  908. package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.d.ts +4 -0
  909. package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.js +280 -0
  910. package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.d.ts +1 -0
  911. package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.js +886 -0
  912. package/static/devtools/third_party/codemirror/package/mode/php/php.d.ts +1 -0
  913. package/static/devtools/third_party/codemirror/package/mode/php/php.js +234 -0
  914. package/static/devtools/third_party/codemirror/package/mode/python/python.d.ts +1 -0
  915. package/static/devtools/third_party/codemirror/package/mode/python/python.js +399 -0
  916. package/static/devtools/third_party/codemirror/package/mode/shell/shell.d.ts +1 -0
  917. package/static/devtools/third_party/codemirror/package/mode/shell/shell.js +168 -0
  918. package/static/devtools/third_party/codemirror/package/mode/wast/wast.d.ts +1 -0
  919. package/static/devtools/third_party/codemirror/package/mode/wast/wast.js +41 -0
  920. package/static/devtools/third_party/codemirror/package/mode/xml/xml.d.ts +1 -0
  921. package/static/devtools/third_party/codemirror/package/mode/xml/xml.js +413 -0
  922. package/static/devtools/third_party/i18n/bundle-tsconfig.json +8 -0
  923. package/static/devtools/third_party/i18n/i18n.d.ts +108 -0
  924. package/static/devtools/third_party/i18n/i18n.js +4336 -0
  925. package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.d.ts +1 -0
  926. package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.js +1140 -0
  927. package/static/devtools/third_party/lighthouse/lighthouse-tsconfig.json +10 -0
  928. package/static/devtools/third_party/lighthouse/locales/ar-XB.json +2066 -0
  929. package/static/devtools/third_party/lighthouse/locales/ar.json +2066 -0
  930. package/static/devtools/third_party/lighthouse/locales/bg.json +2066 -0
  931. package/static/devtools/third_party/lighthouse/locales/ca.json +2066 -0
  932. package/static/devtools/third_party/lighthouse/locales/cs.json +2066 -0
  933. package/static/devtools/third_party/lighthouse/locales/da.json +2066 -0
  934. package/static/devtools/third_party/lighthouse/locales/de.json +2066 -0
  935. package/static/devtools/third_party/lighthouse/locales/el.json +2066 -0
  936. package/static/devtools/third_party/lighthouse/locales/en-GB.json +2066 -0
  937. package/static/devtools/third_party/lighthouse/locales/en-US.json +2297 -0
  938. package/static/devtools/third_party/lighthouse/locales/en-XA.json +2066 -0
  939. package/static/devtools/third_party/lighthouse/locales/en-XL.json +2297 -0
  940. package/static/devtools/third_party/lighthouse/locales/es-419.json +2066 -0
  941. package/static/devtools/third_party/lighthouse/locales/es.json +2066 -0
  942. package/static/devtools/third_party/lighthouse/locales/fi.json +2066 -0
  943. package/static/devtools/third_party/lighthouse/locales/fil.json +2066 -0
  944. package/static/devtools/third_party/lighthouse/locales/fr.json +2066 -0
  945. package/static/devtools/third_party/lighthouse/locales/he.json +2066 -0
  946. package/static/devtools/third_party/lighthouse/locales/hi.json +2066 -0
  947. package/static/devtools/third_party/lighthouse/locales/hr.json +2066 -0
  948. package/static/devtools/third_party/lighthouse/locales/hu.json +2066 -0
  949. package/static/devtools/third_party/lighthouse/locales/id.json +2066 -0
  950. package/static/devtools/third_party/lighthouse/locales/it.json +2066 -0
  951. package/static/devtools/third_party/lighthouse/locales/ja.json +2066 -0
  952. package/static/devtools/third_party/lighthouse/locales/ko.json +2066 -0
  953. package/static/devtools/third_party/lighthouse/locales/lt.json +2066 -0
  954. package/static/devtools/third_party/lighthouse/locales/lv.json +2066 -0
  955. package/static/devtools/third_party/lighthouse/locales/nl.json +2066 -0
  956. package/static/devtools/third_party/lighthouse/locales/no.json +2066 -0
  957. package/static/devtools/third_party/lighthouse/locales/pl.json +2066 -0
  958. package/static/devtools/third_party/lighthouse/locales/pt-PT.json +2066 -0
  959. package/static/devtools/third_party/lighthouse/locales/pt.json +2066 -0
  960. package/static/devtools/third_party/lighthouse/locales/ro.json +2066 -0
  961. package/static/devtools/third_party/lighthouse/locales/ru.json +2066 -0
  962. package/static/devtools/third_party/lighthouse/locales/sk.json +2066 -0
  963. package/static/devtools/third_party/lighthouse/locales/sl.json +2066 -0
  964. package/static/devtools/third_party/lighthouse/locales/sr-Latn.json +2066 -0
  965. package/static/devtools/third_party/lighthouse/locales/sr.json +2066 -0
  966. package/static/devtools/third_party/lighthouse/locales/sv.json +2066 -0
  967. package/static/devtools/third_party/lighthouse/locales/ta.json +2066 -0
  968. package/static/devtools/third_party/lighthouse/locales/te.json +2066 -0
  969. package/static/devtools/third_party/lighthouse/locales/th.json +2066 -0
  970. package/static/devtools/third_party/lighthouse/locales/tr.json +2066 -0
  971. package/static/devtools/third_party/lighthouse/locales/uk.json +2066 -0
  972. package/static/devtools/third_party/lighthouse/locales/vi.json +2066 -0
  973. package/static/devtools/third_party/lighthouse/locales/zh-HK.json +2066 -0
  974. package/static/devtools/third_party/lighthouse/locales/zh-TW.json +2066 -0
  975. package/static/devtools/third_party/lighthouse/locales/zh.json +2066 -0
  976. package/static/devtools/third_party/lighthouse/report-assets/report-generator.d.ts +1 -0
  977. package/static/devtools/third_party/lighthouse/report-assets/report-generator.js +167 -0
  978. package/static/devtools/third_party/lighthouse/report-assets/report.d.ts +1 -0
  979. package/static/devtools/third_party/lighthouse/report-assets/report.js +5032 -0
  980. package/static/devtools/third_party/lit-html/lit-html-tsconfig.json +22 -0
  981. package/static/devtools/third_party/lit-html/lit-html.js +120 -0
  982. package/static/devtools/third_party/lit-html/package/directives/class-map.d.ts +28 -0
  983. package/static/devtools/third_party/lit-html/package/directives/class-map.js +101 -0
  984. package/static/devtools/third_party/lit-html/package/directives/class-map.js.map +1 -0
  985. package/static/devtools/third_party/lit-html/package/directives/if-defined.d.ts +22 -0
  986. package/static/devtools/third_party/lit-html/package/directives/if-defined.js +37 -0
  987. package/static/devtools/third_party/lit-html/package/directives/if-defined.js.map +1 -0
  988. package/static/devtools/third_party/lit-html/package/directives/live.d.ts +38 -0
  989. package/static/devtools/third_party/lit-html/package/directives/live.js +73 -0
  990. package/static/devtools/third_party/lit-html/package/directives/live.js.map +1 -0
  991. package/static/devtools/third_party/lit-html/package/directives/repeat.d.ts +37 -0
  992. package/static/devtools/third_party/lit-html/package/directives/repeat.js +415 -0
  993. package/static/devtools/third_party/lit-html/package/directives/repeat.js.map +1 -0
  994. package/static/devtools/third_party/lit-html/package/directives/style-map.d.ts +36 -0
  995. package/static/devtools/third_party/lit-html/package/directives/style-map.js +78 -0
  996. package/static/devtools/third_party/lit-html/package/directives/style-map.js.map +1 -0
  997. package/static/devtools/third_party/lit-html/package/lib/default-template-processor.d.ts +39 -0
  998. package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js +52 -0
  999. package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js.map +1 -0
  1000. package/static/devtools/third_party/lit-html/package/lib/directive.d.ts +59 -0
  1001. package/static/devtools/third_party/lit-html/package/lib/directive.js +63 -0
  1002. package/static/devtools/third_party/lit-html/package/lib/directive.js.map +1 -0
  1003. package/static/devtools/third_party/lit-html/package/lib/dom.d.ts +29 -0
  1004. package/static/devtools/third_party/lit-html/package/lib/dom.js +44 -0
  1005. package/static/devtools/third_party/lit-html/package/lib/dom.js.map +1 -0
  1006. package/static/devtools/third_party/lit-html/package/lib/part.d.ts +46 -0
  1007. package/static/devtools/third_party/lit-html/package/lib/part.js +23 -0
  1008. package/static/devtools/third_party/lit-html/package/lib/part.js.map +1 -0
  1009. package/static/devtools/third_party/lit-html/package/lib/parts.d.ts +148 -0
  1010. package/static/devtools/third_party/lit-html/package/lib/parts.js +476 -0
  1011. package/static/devtools/third_party/lit-html/package/lib/parts.js.map +1 -0
  1012. package/static/devtools/third_party/lit-html/package/lib/render.d.ts +33 -0
  1013. package/static/devtools/third_party/lit-html/package/lib/render.js +43 -0
  1014. package/static/devtools/third_party/lit-html/package/lib/render.js.map +1 -0
  1015. package/static/devtools/third_party/lit-html/package/lib/template-factory.d.ts +57 -0
  1016. package/static/devtools/third_party/lit-html/package/lib/template-factory.js +48 -0
  1017. package/static/devtools/third_party/lit-html/package/lib/template-factory.js.map +1 -0
  1018. package/static/devtools/third_party/lit-html/package/lib/template-instance.d.ts +30 -0
  1019. package/static/devtools/third_party/lit-html/package/lib/template-instance.js +134 -0
  1020. package/static/devtools/third_party/lit-html/package/lib/template-instance.js.map +1 -0
  1021. package/static/devtools/third_party/lit-html/package/lib/template-result.d.ts +42 -0
  1022. package/static/devtools/third_party/lit-html/package/lib/template-result.js +131 -0
  1023. package/static/devtools/third_party/lit-html/package/lib/template-result.js.map +1 -0
  1024. package/static/devtools/third_party/lit-html/package/lib/template.d.ts +92 -0
  1025. package/static/devtools/third_party/lit-html/package/lib/template.js +215 -0
  1026. package/static/devtools/third_party/lit-html/package/lib/template.js.map +1 -0
  1027. package/static/devtools/third_party/lit-html/package/lit-html.d.ts +42 -0
  1028. package/static/devtools/third_party/lit-html/package/lit-html.js +59 -0
  1029. package/static/devtools/third_party/lit-html/package/lit-html.js.map +1 -0
  1030. package/static/devtools/third_party/marked/marked-tsconfig.json +8 -0
  1031. package/static/devtools/third_party/marked/marked.js +1 -0
  1032. package/static/devtools/third_party/marked/package/lib/marked.esm.d.ts +1 -0
  1033. package/static/devtools/third_party/marked/package/lib/marked.esm.js +2584 -0
  1034. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +53 -0
  1035. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts.map +1 -0
  1036. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.js +64 -0
  1037. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts +176 -0
  1038. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts.map +1 -0
  1039. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js +356 -0
  1040. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts +21 -0
  1041. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -0
  1042. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +81 -0
  1043. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +423 -0
  1044. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -0
  1045. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +516 -0
  1046. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +39 -0
  1047. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -0
  1048. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +76 -0
  1049. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts +26 -0
  1050. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -0
  1051. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.js +30 -0
  1052. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +120 -0
  1053. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -0
  1054. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +266 -0
  1055. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts +22 -0
  1056. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map +1 -0
  1057. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.js +15 -0
  1058. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +72 -0
  1059. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -0
  1060. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +60 -0
  1061. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +181 -0
  1062. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -0
  1063. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +316 -0
  1064. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +174 -0
  1065. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -0
  1066. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +647 -0
  1067. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +53 -0
  1068. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -0
  1069. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +77 -0
  1070. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +33 -0
  1071. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -0
  1072. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +873 -0
  1073. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +76 -0
  1074. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -0
  1075. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js +92 -0
  1076. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts +25 -0
  1077. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts.map +1 -0
  1078. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.js +33 -0
  1079. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +34 -0
  1080. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -0
  1081. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +37 -0
  1082. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +59 -0
  1083. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts.map +1 -0
  1084. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.js +15 -0
  1085. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +89 -0
  1086. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -0
  1087. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +109 -0
  1088. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts +82 -0
  1089. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts.map +1 -0
  1090. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.js +83 -0
  1091. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +189 -0
  1092. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -0
  1093. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +313 -0
  1094. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +60 -0
  1095. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -0
  1096. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +66 -0
  1097. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +735 -0
  1098. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -0
  1099. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +962 -0
  1100. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +276 -0
  1101. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -0
  1102. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +421 -0
  1103. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +128 -0
  1104. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -0
  1105. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +150 -0
  1106. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +322 -0
  1107. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -0
  1108. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +463 -0
  1109. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +439 -0
  1110. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -0
  1111. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +724 -0
  1112. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +62 -0
  1113. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -0
  1114. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +145 -0
  1115. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +80 -0
  1116. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -0
  1117. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +262 -0
  1118. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +152 -0
  1119. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -0
  1120. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js +31 -0
  1121. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +910 -0
  1122. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -0
  1123. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +1343 -0
  1124. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts +21 -0
  1125. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts.map +1 -0
  1126. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.js +15 -0
  1127. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +135 -0
  1128. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -0
  1129. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +133 -0
  1130. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts +24 -0
  1131. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts.map +1 -0
  1132. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.js +0 -0
  1133. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +66 -0
  1134. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -0
  1135. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +157 -0
  1136. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts +61 -0
  1137. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts.map +1 -0
  1138. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.js +72 -0
  1139. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +98 -0
  1140. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -0
  1141. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +137 -0
  1142. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts +28 -0
  1143. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts.map +1 -0
  1144. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.js +43 -0
  1145. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts +47 -0
  1146. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -0
  1147. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +94 -0
  1148. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts +40 -0
  1149. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts.map +1 -0
  1150. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.js +403 -0
  1151. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +102 -0
  1152. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -0
  1153. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +109 -0
  1154. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts +22 -0
  1155. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +1 -0
  1156. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js +24 -0
  1157. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts +17 -0
  1158. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts.map +1 -0
  1159. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js +20 -0
  1160. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +66 -0
  1161. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -0
  1162. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +288 -0
  1163. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +17 -0
  1164. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -0
  1165. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +16 -0
  1166. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts +18 -0
  1167. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts.map +1 -0
  1168. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +39 -0
  1169. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts +18 -0
  1170. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts.map +1 -0
  1171. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.js +22 -0
  1172. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +132 -0
  1173. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -0
  1174. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +468 -0
  1175. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +40 -0
  1176. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -0
  1177. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +197 -0
  1178. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +42 -0
  1179. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -0
  1180. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js +0 -0
  1181. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +16 -0
  1182. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -0
  1183. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +469 -0
  1184. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +29 -0
  1185. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -0
  1186. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +34 -0
  1187. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +31 -0
  1188. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -0
  1189. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +61 -0
  1190. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +156 -0
  1191. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -0
  1192. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +183 -0
  1193. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts +18 -0
  1194. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -0
  1195. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +151 -0
  1196. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts +18 -0
  1197. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts.map +1 -0
  1198. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +23 -0
  1199. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts +18 -0
  1200. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts.map +1 -0
  1201. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.js +22 -0
  1202. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +22 -0
  1203. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts.map +1 -0
  1204. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +19 -0
  1205. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts +18 -0
  1206. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts.map +1 -0
  1207. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.js +22 -0
  1208. package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts +22 -0
  1209. package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts.map +1 -0
  1210. package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js +53 -0
  1211. package/static/devtools/third_party/puppeteer/puppeteer-tsconfig.json +58 -0
  1212. package/static/devtools/third_party/puppeteer/puppeteer.js +1 -0
  1213. package/static/devtools/third_party/wasmparser/package/dist/esm/WasmDis.js +1595 -0
  1214. package/static/devtools/third_party/wasmparser/package/dist/esm/WasmParser.js +3120 -0
  1215. package/static/devtools/third_party/wasmparser/wasmparser-tsconfig.json +9 -0
  1216. package/static/devtools/timeline/timeline-legacy.js +1 -0
  1217. package/static/devtools/timeline/timeline-meta.js +1 -0
  1218. package/static/devtools/timeline/timeline.js +1 -0
  1219. package/static/devtools/timeline/timeline_module.js +1 -0
  1220. package/static/devtools/timeline_model/timeline_model-legacy.js +1 -0
  1221. package/static/devtools/timeline_model/timeline_model.js +1 -0
  1222. package/static/devtools/timeline_model/timeline_model_module.js +0 -0
  1223. package/static/devtools/toolbox.html +20 -0
  1224. package/static/devtools/toolbox.js +1 -0
  1225. package/static/devtools/toolbox_bootstrap/toolbox_bootstrap.js +1 -0
  1226. package/static/devtools/ui/components/components.js +378 -0
  1227. package/static/devtools/ui/ui-legacy.js +1 -0
  1228. package/static/devtools/ui/ui.js +3 -0
  1229. package/static/devtools/ui/utils/utils.js +1 -0
  1230. package/static/devtools/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
  1231. package/static/devtools/wasmparser_worker/wasmparser_worker.js +1 -0
  1232. package/static/devtools/web_audio/graph_visualizer/graph_visualizer.js +1 -0
  1233. package/static/devtools/web_audio/web_audio-legacy.js +1 -0
  1234. package/static/devtools/web_audio/web_audio-meta.js +1 -0
  1235. package/static/devtools/web_audio/web_audio.js +23 -0
  1236. package/static/devtools/web_audio/web_audio_module.js +1 -0
  1237. package/static/devtools/webauthn/webauthn-legacy.js +1 -0
  1238. package/static/devtools/webauthn/webauthn-meta.js +1 -0
  1239. package/static/devtools/webauthn/webauthn.js +6 -0
  1240. package/static/devtools/webauthn/webauthn_module.js +1 -0
  1241. package/static/devtools/worker_app.html +20 -0
  1242. package/static/devtools/worker_app.js +1 -0
  1243. package/static/devtools/worker_main/worker_main-legacy.js +1 -0
  1244. package/static/devtools/worker_main/worker_main.js +1 -0
  1245. package/static/devtools/worker_service/worker_service.js +1 -0
  1246. package/static/devtools/workspace/workspace-legacy.js +1 -0
  1247. package/static/devtools/workspace/workspace.js +1 -0
  1248. package/static/devtools/workspace_diff/workspace_diff-legacy.js +1 -0
  1249. package/static/devtools/workspace_diff/workspace_diff.js +1 -0
  1250. package/static/devtools/workspace_diff/workspace_diff_module.js +0 -0
  1251. package/static/docs/swagger.json +2337 -279
  1252. package/static/function/client.js +1037 -992
  1253. package/build/routes/chromium/http/json-new.js +0 -23
  1254. package/build/routes/chromium/http/json-version-get.response.json +0 -37
  1255. package/build/routes/chromium/utils/cdp.d.ts +0 -2
  1256. package/build/routes/chromium/utils/cdp.js +0 -14
  1257. package/build/routes/chromium/ws/cdp-chromium.js +0 -10
  1258. package/src/routes/chromium/http/json-list.ts +0 -50
  1259. package/src/routes/chromium/utils/cdp.ts +0 -19
  1260. package/build/routes/{chromium/http/content-post.query.json → chrome/http/content.post.query.json} +0 -0
  1261. package/build/routes/{chromium/http/content-post.response.json → chrome/http/content.post.response.json} +0 -0
  1262. package/build/routes/{chromium/http/download-post.body.json → chrome/http/download.post.body.json} +0 -0
  1263. package/build/routes/{chromium/http/download-post.query.json → chrome/http/download.post.query.json} +0 -0
  1264. package/build/routes/{chromium/http/download-post.response.json → chrome/http/download.post.response.json} +0 -0
  1265. package/build/routes/{chromium/http/function-post.body.json → chrome/http/function.post.body.json} +0 -0
  1266. package/build/routes/{chromium/http/function-post.query.json → chrome/http/function.post.query.json} +0 -0
  1267. package/build/routes/{chromium/http/function-post.response.json → chrome/http/function.post.response.json} +0 -0
  1268. package/build/routes/{chromium/http/json-list.response.json → chrome/http/json-list.get.response.json} +0 -0
  1269. package/build/routes/{chromium/http/json-new.response.json → chrome/http/json-new.put.response.json} +0 -0
  1270. package/build/routes/{chromium/http/json-protocol-get.response.json → chrome/http/json-protocol.get.response.json} +0 -0
  1271. package/build/routes/{chromium/http/pdf-post.query.json → chrome/http/pdf.post.query.json} +0 -0
  1272. package/build/routes/{chromium/http/pdf-post.response.json → chrome/http/pdf.post.response.json} +0 -0
  1273. package/build/routes/{chromium/http/performance.body.json → chrome/http/performance.post.body.json} +0 -0
  1274. package/build/routes/{chromium/http/performance.query.json → chrome/http/performance.post.query.json} +0 -0
  1275. package/build/routes/{chromium/http/performance.response.json → chrome/http/performance.post.response.json} +0 -0
  1276. package/build/routes/{chromium/http/scrape-post.query.json → chrome/http/scrape.post.query.json} +0 -0
  1277. package/build/routes/{chromium/http/scrape-post.response.json → chrome/http/scrape.post.response.json} +0 -0
  1278. package/build/routes/{chromium/http/screenshot-post.query.json → chrome/http/screenshot.post.query.json} +0 -0
  1279. package/build/routes/{chromium/http/screenshot-post.response.json → chrome/http/screenshot.post.response.json} +0 -0
  1280. package/build/routes/{chromium/utils/performance/child.d.ts → chrome/tests/content.spec.d.ts} +0 -0
  1281. package/build/routes/{chromium/utils/performance/types.js → chrome/tests/download.spec.d.ts} +0 -0
  1282. package/build/routes/{chromium/ws/cdp-chromium.query.json → chrome/ws/browser.query.json} +0 -0
  1283. package/build/routes/{chromium/ws/playwright-chromium.query.json → chrome/ws/playwright.query.json} +0 -0
  1284. package/build/routes/{firefox/ws/playwright-firefox.query.json → chromium/ws/playwright.query.json} +0 -0
  1285. package/build/routes/{webkit/ws/playwright-webkit.query.json → firefox/ws/playwright.query.json} +0 -0
  1286. package/build/routes/management/http/{config-get.d.ts → config.get.d.ts} +0 -0
  1287. package/build/routes/management/http/{config-get.js → config.get.js} +0 -0
  1288. package/build/routes/management/http/{config-get.response.json → config.get.response.json} +0 -0
  1289. package/build/routes/management/http/{metrics-total-get.d.ts → metrics-total.get.d.ts} +0 -0
  1290. package/build/routes/management/http/{metrics-total-get.js → metrics-total.get.js} +0 -0
  1291. package/build/routes/management/http/{metrics-total-get.response.json → metrics-total.get.response.json} +0 -0
  1292. package/build/routes/management/http/{metrics-get.d.ts → metrics.get.d.ts} +0 -0
  1293. package/build/routes/management/http/{metrics-get.js → metrics.get.js} +0 -0
  1294. package/build/routes/management/http/{metrics-get.response.json → metrics.get.response.json} +0 -0
  1295. package/build/routes/management/http/{sessions-get.d.ts → sessions.get.d.ts} +0 -0
  1296. package/build/routes/management/http/{sessions-get.js → sessions.get.js} +0 -0
  1297. package/build/routes/management/http/{static-get.d.ts → static.get.d.ts} +0 -0
  1298. package/build/{routes/chromium/http/json-protocol-get.d.ts → shared/json-protocol.http.d.ts} +1 -1
  1299. package/build/{routes/chromium/http/json-version-get.d.ts → shared/json-version.http.d.ts} +1 -1
  1300. /package/build/{routes/chromium → shared}/utils/function/client.d.ts +0 -0
  1301. /package/build/{routes/chromium → shared}/utils/function/client.js +0 -0
  1302. /package/build/{routes/chromium → shared}/utils/function/handler.d.ts +0 -0
  1303. /package/build/{routes/chromium → shared}/utils/function/handler.js +0 -0
  1304. /package/build/{routes/chromium → shared}/utils/performance/child.js +0 -0
  1305. /package/build/{routes/chromium → shared}/utils/performance/main.d.ts +0 -0
  1306. /package/build/{routes/chromium → shared}/utils/performance/types.d.ts +0 -0
  1307. /package/src/routes/management/http/{config-get.ts → config.get.ts} +0 -0
  1308. /package/src/routes/management/http/{metrics-total-get.ts → metrics-total.get.ts} +0 -0
  1309. /package/src/routes/management/http/{metrics-get.ts → metrics.get.ts} +0 -0
  1310. /package/src/routes/management/http/{sessions-get.ts → sessions.get.ts} +0 -0
  1311. /package/src/{routes/chromium → shared}/utils/function/client.ts +0 -0
  1312. /package/src/{routes/chromium → shared}/utils/performance/child.ts +0 -0
  1313. /package/src/{routes/chromium → shared}/utils/performance/types.ts +0 -0
@@ -0,0 +1,297 @@
1
+ // Copyright 2017 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as Platform from '../platform/platform.js';
6
+
7
+ /**
8
+ * @fileoverview using private properties isn't a Closure violation in tests.
9
+ */
10
+ self.SDKTestRunner = self.SDKTestRunner || {};
11
+
12
+ let id = 0;
13
+
14
+ function nextId(prefix) {
15
+ return (prefix || '') + ++id;
16
+ }
17
+
18
+ SDKTestRunner.PageMock = class {
19
+ constructor(url) {
20
+ this._url = url;
21
+ this._type = SDK.Target.Type.Frame;
22
+ this._enabledDomains = new Set();
23
+ this._children = new Map();
24
+
25
+ this._mainFrame =
26
+ {id: nextId(), loaderId: nextId(), mimeType: 'text/html', securityOrigin: this._url, url: this._url};
27
+
28
+ this._executionContexts = [];
29
+ this._executionContexts.push(this._createExecutionContext(this._mainFrame, false));
30
+ this._scripts = [];
31
+ this._scriptContents = new Map();
32
+
33
+ this._dispatchMap = {
34
+ 'Debugger.enable': this._debuggerEnable,
35
+ 'Debugger.getScriptSource': this._debuggerGetScriptSource,
36
+ 'Debugger.setBlackboxPatterns': (id, params) => this._sendResponse(id, {}),
37
+ 'Runtime.enable': this._runtimeEnable,
38
+ 'Page.enable': this._pageEnable,
39
+ 'Page.getResourceTree': this._pageGetResourceTree
40
+ };
41
+ }
42
+
43
+ turnIntoWorker() {
44
+ this._type = SDK.Target.Type.Worker;
45
+ }
46
+
47
+ connectAsMainTarget(targetName) {
48
+ self.Bindings.debuggerWorkspaceBinding._resetForTest(TestRunner.mainTarget);
49
+ self.Bindings.resourceMapping._resetForTest(TestRunner.mainTarget);
50
+ this._enabledDomains.clear();
51
+ self.SDK.targetManager._targets.clear();
52
+
53
+ const oldFactory = ProtocolClient.Connection.getFactory();
54
+ ProtocolClient.Connection.setFactory(() => {
55
+ this._connection = new MockPageConnection(this);
56
+ return this._connection;
57
+ });
58
+ const target = self.SDK.targetManager.createTarget(nextId('mock-target-'), targetName, this._type, null);
59
+ ProtocolClient.Connection.setFactory(oldFactory);
60
+
61
+ this._target = target;
62
+ return target;
63
+ }
64
+
65
+ connectAsChildTarget(targetName, parentMock) {
66
+ this._enabledDomains.clear();
67
+ this._sessionId = nextId('mock-target-');
68
+ this._root = parentMock._root || parentMock;
69
+ this._root._children.set(this._sessionId, this);
70
+ const target = self.SDK.targetManager.createTarget(
71
+ this._sessionId, targetName, this._type, parentMock._target, this._sessionId);
72
+ this._target = target;
73
+ return target;
74
+ }
75
+
76
+ disconnect() {
77
+ if (this._root) {
78
+ this._root._children.delete(this._sessionId);
79
+ this._target.dispose();
80
+ this._root = null;
81
+ this._sessionId = null;
82
+ } else {
83
+ this._connection.disconnect();
84
+ this._connection = null;
85
+ }
86
+ this._target = null;
87
+ }
88
+
89
+ evalScript(url, content, isContentScript) {
90
+ const id = nextId();
91
+ content += '\n//# sourceURL=' + url;
92
+ this._scriptContents.set(id, content);
93
+ let context = this._executionContexts.find(context => context.auxData.isDefault !== isContentScript);
94
+
95
+ if (!context) {
96
+ context = this._createExecutionContext(this._mainFrame, isContentScript);
97
+ this._executionContexts.push(context);
98
+
99
+ this._fireEvent('Runtime.executionContextCreated', {context: context});
100
+ }
101
+
102
+ const text = new TextUtils.Text(content);
103
+
104
+ const script = {
105
+ scriptId: id,
106
+ url: url,
107
+ startLine: 0,
108
+ startColumn: 0,
109
+ endLine: text.lineCount(),
110
+ endColumn: text.lineAt(text.lineCount()).length - 1,
111
+ executionContextId: context.id,
112
+ hash: Platform.StringUtilities.hashCode(content),
113
+ executionContextAuxData: context.auxData,
114
+ sourceMapURL: '',
115
+ hasSourceURL: true,
116
+ isLiveEdit: false,
117
+ isModule: false,
118
+ length: content.length
119
+ };
120
+
121
+ this._scripts.push(script);
122
+ this._fireEvent('Debugger.scriptParsed', script);
123
+ }
124
+
125
+ removeContentScripts() {
126
+ const index = this._executionContexts.findIndex(context => !context.auxData.isDefault);
127
+ if (index !== -1) {
128
+ this._fireEvent('Runtime.executionContextDestroyed', {executionContextId: this._executionContexts[index].id});
129
+ this._executionContexts.splice(index, 1);
130
+ }
131
+ }
132
+
133
+ reload() {
134
+ this._fireEvent('Page.frameStartedLoading', {frameId: this._mainFrame.id});
135
+
136
+ for (const context of this._executionContexts) {
137
+ this._fireEvent('Runtime.executionContextDestroyed', {executionContextId: context.id});
138
+ }
139
+
140
+
141
+ this._scripts = [];
142
+ this._scriptContents.clear();
143
+ this._executionContexts = [];
144
+ this._fireEvent('Runtime.executionContextsCleared', {});
145
+ this._executionContexts.push(this._createExecutionContext(this._mainFrame, false));
146
+
147
+ for (const context of this._executionContexts) {
148
+ this._fireEvent('Runtime.executionContextCreated', {context: context});
149
+ }
150
+
151
+
152
+ this._fireEvent('Page.frameNavigated', {frame: this._mainFrame});
153
+
154
+ this._fireEvent('Page.loadEventFired', {timestamp: Date.now() / 1000});
155
+
156
+ this._fireEvent('Page.frameStoppedLoading', {frameId: this._mainFrame.id});
157
+
158
+ this._fireEvent('Page.domContentEventFired', {timestamp: Date.now() / 1000});
159
+ }
160
+
161
+ _createExecutionContext(frame, isContentScript) {
162
+ return {
163
+ id: nextId(),
164
+
165
+ auxData: {isDefault: !isContentScript, frameId: frame.id},
166
+
167
+ origin: frame.securityOrigin,
168
+ name: isContentScript ? 'content-script-context' : ''
169
+ };
170
+ }
171
+
172
+ _debuggerEnable(id, params) {
173
+ this._enabledDomains.add('Debugger');
174
+ this._sendResponse(id, {});
175
+
176
+ for (const script of this._scripts) {
177
+ this._fireEvent('Debugger.scriptParsed', script);
178
+ }
179
+ }
180
+
181
+ _debuggerGetScriptSource(id, params) {
182
+ if (!this._scriptContents.has(params.scriptId)) {
183
+ this._sendResponse(id, undefined, {message: 'Can\'t get script content for id ' + params.scriptId, code: 1});
184
+
185
+ return;
186
+ }
187
+
188
+ const result = {scriptSource: this._scriptContents.get(params.scriptId)};
189
+
190
+ this._sendResponse(id, result);
191
+ }
192
+
193
+ _runtimeEnable(id, params) {
194
+ this._enabledDomains.add('Runtime');
195
+ this._sendResponse(id, {});
196
+
197
+ for (const context of this._executionContexts) {
198
+ this._fireEvent('Runtime.executionContextCreated', {context: context});
199
+ }
200
+ }
201
+
202
+ _pageEnable(id, params) {
203
+ this._enabledDomains.add('Page');
204
+ this._sendResponse(id, {});
205
+ }
206
+
207
+ _pageGetResourceTree(id, params) {
208
+ const result = {frameTree: {frame: this._mainFrame, resources: []}};
209
+
210
+ this._sendResponse(id, result);
211
+ }
212
+
213
+ _isSupportedDomain(methodName) {
214
+ const domain = methodName.split('.')[0];
215
+
216
+ if (domain === 'Page') {
217
+ return this._type === SDK.Target.Type.Frame;
218
+ }
219
+
220
+ return true;
221
+ }
222
+
223
+ _dispatch(sessionId, id, methodName, params) {
224
+ if (sessionId) {
225
+ const child = this._children.get(sessionId);
226
+ if (child) {
227
+ child._dispatch('', id, methodName, params);
228
+ }
229
+ return;
230
+ }
231
+
232
+ const handler = (this._isSupportedDomain(methodName) ? this._dispatchMap[methodName] : null);
233
+
234
+ if (handler) {
235
+ return handler.call(this, id, params);
236
+ }
237
+
238
+ this._sendResponse(
239
+ id, undefined, {message: 'Can\'t handle command ' + methodName, code: ProtocolClient.DevToolsStubErrorCode});
240
+ }
241
+
242
+ _sendResponse(id, result, error) {
243
+ const message = {id: id, result: result, error: error};
244
+ if (this._root) {
245
+ message.sessionId = this._sessionId;
246
+ this._root._connection.sendMessageToDevTools(message);
247
+ } else {
248
+ this._connection.sendMessageToDevTools(message);
249
+ }
250
+ }
251
+
252
+ _fireEvent(methodName, params) {
253
+ const domain = methodName.split('.')[0];
254
+
255
+ if (!this._enabledDomains.has(domain)) {
256
+ return;
257
+ }
258
+
259
+ const message = {method: methodName, params: params};
260
+ if (this._root) {
261
+ message.sessionId = this._sessionId;
262
+ this._root._connection.sendMessageToDevTools(message);
263
+ } else {
264
+ this._connection.sendMessageToDevTools(message);
265
+ }
266
+ }
267
+ };
268
+
269
+ class MockPageConnection {
270
+ constructor(page) {
271
+ this._page = page;
272
+ }
273
+
274
+ setOnMessage(onMessage) {
275
+ this._onMessage = onMessage;
276
+ }
277
+
278
+ setOnDisconnect(onDisconnect) {
279
+ this._onDisconnect = onDisconnect;
280
+ }
281
+
282
+ sendMessageToDevTools(message) {
283
+ setTimeout(() => this._onMessage.call(null, JSON.stringify(message)), 0);
284
+ }
285
+
286
+ sendRawMessage(messageString) {
287
+ const message = JSON.parse(messageString);
288
+ this._page._dispatch(message.sessionId, message.id, message.method, message.params || {});
289
+ }
290
+
291
+ disconnect() {
292
+ this._onDisconnect.call(null, 'force disconnect');
293
+ this._onDisconnect = null;
294
+ this._onMessage = null;
295
+ return Promise.resolve();
296
+ }
297
+ }
@@ -0,0 +1 @@
1
+ import{SearchConfig as e,SearchResultsPane as a,SearchView as c}from"./search.js";self.Search=self.Search||{},Search=Search||{},Search.SearchConfig=e.SearchConfig,Search.SearchResult=e.SearchResult,Search.SearchScope=e.SearchScope,Search.SearchResultsPane=a.SearchResultsPane,Search.SearchView=c.SearchView;
@@ -0,0 +1 @@
1
+ import{StringUtilities as e}from"../platform/platform.js";import{Revealer as t,Settings as s,Progress as n}from"../common/common.js";import{Linkifier as i}from"../components/components.js";import{i18n as h}from"../i18n/i18n.js";import{TextRange as r}from"../text_utils/text_utils.js";import{Widget as a,TreeOutline as c,ARIAUtils as o,UIUtils as l,HistoryInput as u,Toolbar as _,ProgressIndicator as d,EmptyWidget as g,KeyboardShortcut as p}from"../ui/ui.js";class m{constructor(e,t,s){this._query=e,this._ignoreCase=t,this._isRegex=s,this._parse()}static fromPlainObject(e){return new m(e.query,e.ignoreCase,e.isRegex)}query(){return this._query}ignoreCase(){return this._ignoreCase}isRegex(){return this._isRegex}toPlainObject(){return{query:this.query(),ignoreCase:this.ignoreCase(),isRegex:this.isRegex()}}_parse(){const e=/(\s*(?!-?f(ile)?:)[^\\ ]|\\.)+/,t=e.source+"(\\s+"+e.source+")*",s=["(\\s*"+C.source+"\\s*)","("+/"([^\\"]|\\.)+"/.source+")","("+t+")"].join("|"),n=new RegExp(s,"g"),i=this._query.match(n)||[];this._fileQueries=[],this._queries=[];for(let e=0;e<i.length;++e){const t=i[e];if(!t)continue;const s=this._parseFileQuery(t);if(s)this._fileQueries.push(s),this._fileRegexQueries=this._fileRegexQueries||[],this._fileRegexQueries.push({regex:new RegExp(s.text,this.ignoreCase()?"i":""),isNegative:s.isNegative});else if(this._isRegex)this._queries.push(t);else if(t.startsWith('"')){if(!t.endsWith('"'))continue;this._queries.push(this._parseQuotedQuery(t))}else this._queries.push(this._parseUnquotedQuery(t))}}filePathMatchesFileQuery(e){if(!this._fileRegexQueries)return!0;for(let t=0;t<this._fileRegexQueries.length;++t)if(Boolean(e.match(this._fileRegexQueries[t].regex))===this._fileRegexQueries[t].isNegative)return!1;return!0}queries(){return this._queries||[]}_parseUnquotedQuery(e){return e.replace(/\\(.)/g,"$1")}_parseQuotedQuery(e){return e.substring(1,e.length-1).replace(/\\(.)/g,"$1")}_parseFileQuery(t){const s=t.match(C);if(!s)return null;const n=Boolean(s[1]);t=s[3];let i="";for(let s=0;s<t.length;++s){const n=t[s];if("*"===n)i+=".*";else if("\\"===n){++s;" "===t[s]&&(i+=" ")}else-1!==e.regexSpecialCharacters().indexOf(t.charAt(s))&&(i+="\\"),i+=t.charAt(s)}return new S(i,n)}}const C=/(-)?f(ile)?:((?:[^\\ ]|\\.)+)/;class S{constructor(e,t){this.text=e,this.isNegative=t}}var f=Object.freeze({__proto__:null,SearchConfig:m,FilePatternRegex:C,QueryTerm:S,SearchResult:class{label(){throw new Error("not implemented here")}description(){throw new Error("not implemented here")}matchesCount(){throw new Error("not implemented here")}matchLabel(e){throw new Error("not implemented here")}matchLineContent(e){throw new Error("not implemented here")}matchRevealable(e){throw new Error("not implemented here")}},SearchScope:class{performSearch(e,t,s,n){}performIndexing(e){}stopSearch(){}},RegexQuery:undefined});const x={matchesCountS:"Matches Count {PH1}",lineS:"Line {PH1}",showDMore:"Show {PH1} more"},R=h.registerUIStrings("search/SearchResultsPane.js",x),E=h.getLocalizedString.bind(void 0,R);class w extends a.VBox{constructor(e){super(!0),this._searchConfig=e,this._searchResults=[],this._treeOutline=new c.TreeOutlineInShadow,this._treeOutline.hideOverflow(),this._treeOutline.registerRequiredCSS("search/searchResultsPane.css",{enableLegacyPatching:!0}),this.contentElement.appendChild(this._treeOutline.element),this._matchesExpandedCount=0}addSearchResult(e){this._searchResults.push(e),this._addTreeElement(e)}_addTreeElement(e){const t=new M(this._searchConfig,e);this._treeOutline.appendChild(t),this._treeOutline.selectedTreeElement||t.select(!0,!0),this._matchesExpandedCount<I&&t.expand(),this._matchesExpandedCount+=e.matchesCount()}}const I=20;class M extends c.TreeElement{constructor(e,t){super("",!0),this._searchConfig=e,this._searchResult=t,this._initialized=!1,this.toggleOnClick=!0}onexpand(){this._initialized||(this._updateMatchesUI(),this._initialized=!0)}_updateMatchesUI(){this.removeChildren();const e=Math.min(this._searchResult.matchesCount(),20);e<this._searchResult.matchesCount()?(this._appendSearchMatches(0,e-1),this._appendShowMoreMatchesElement(e-1)):this._appendSearchMatches(0,e)}onattach(){this._updateSearchMatches()}_updateSearchMatches(){this.listItemElement.classList.add("search-result");const e=s(this._searchResult.label(),"search-result-file-name");e.appendChild(s("—","search-result-dash")),e.appendChild(s(this._searchResult.description(),"search-result-qualifier")),this.tooltip=this._searchResult.description(),this.listItemElement.appendChild(e);const t=document.createElement("span");function s(e,t){const s=document.createElement("span");return s.className=t,s.textContent=e,s}t.className="search-result-matches-count",t.textContent=""+this._searchResult.matchesCount(),o.setAccessibleName(t,E(x.matchesCountS,{PH1:this._searchResult.matchesCount()})),this.listItemElement.appendChild(t),this.expanded&&this._updateMatchesUI()}_appendSearchMatches(s,n){const h=this._searchResult,r=this._searchConfig.queries(),a=[];for(let t=0;t<r.length;++t)a.push(e.createSearchRegex(r[t],!this._searchConfig.ignoreCase(),this._searchConfig.isRegex()));for(let e=s;e<n;++e){const s=h.matchLineContent(e).trim();let n=[];for(let e=0;e<a.length;++e)n=n.concat(this._regexMatchRanges(s,a[e]));const r=i.Linkifier.linkifyRevealable(h.matchRevealable(e),"");r.classList.add("search-match-link");const l=document.createElement("span");l.classList.add("search-match-line-number");const u=h.matchLabel(e);l.textContent=u,"number"!=typeof u||isNaN(u)?o.setAccessibleName(l,u):o.setAccessibleName(l,E(x.lineS,{PH1:u})),r.appendChild(l);const _=this._createContentSpan(s,n);r.appendChild(_);const d=new c.TreeElement;this.appendChild(d),d.listItemElement.className="search-match",d.listItemElement.appendChild(r),d.listItemElement.addEventListener("keydown",(s=>{"Enter"===s.key&&(s.consume(!0),t.reveal(h.matchRevealable(e)))})),d.tooltip=s}}_appendShowMoreMatchesElement(e){const t=this._searchResult.matchesCount()-e,s=E(x.showDMore,{PH1:t}),n=new c.TreeElement(s);this.appendChild(n),n.listItemElement.classList.add("show-more-matches"),n.onselect=this._showMoreMatchesElementSelected.bind(this,n,e)}_createContentSpan(e,t){let s=0;t.length>0&&t[0].offset>20&&(s=15),e=e.substring(s,1e3+s),s&&(t=t.map((e=>new r.SourceRange(e.offset-s+1,e.length))),e="…"+e);const n=document.createElement("span");return n.className="search-match-content",n.textContent=e,o.setAccessibleName(n,e+" line"),l.highlightRangesWithStyleClass(n,t,"highlighted-match"),n}_regexMatchRanges(e,t){let s;t.lastIndex=0;const n=[];for(;t.lastIndex<e.length&&(s=t.exec(e));)n.push(new r.SourceRange(s.index,s[0].length));return n}_showMoreMatchesElementSelected(e,t){return this.removeChild(e),this._appendSearchMatches(t,this._searchResult.matchesCount()),!1}}var b=Object.freeze({__proto__:null,UIStrings:x,SearchResultsPane:w,matchesExpandedByDefault:I,matchesShownAtOnce:20,SearchResultsTreeElement:M});const y={search:"Search",searchQuery:"Search Query",matchCase:"Match Case",useRegularExpression:"Use Regular Expression",refresh:"Refresh",clear:"Clear",indexing:"Indexing…",searching:"Searching…",indexingInterrupted:"Indexing interrupted.",foundMatchingLineInFile:"Found 1 matching line in 1 file.",foundDMatchingLinesInFile:"Found {PH1} matching lines in 1 file.",foundDMatchingLinesInDFiles:"Found {PH1} matching lines in {PH2} files.",noMatchesFound:"No matches found.",searchFinished:"Search finished.",searchInterrupted:"Search interrupted."},P=h.registerUIStrings("search/SearchView.js",y),v=h.getLocalizedString.bind(void 0,P);class F extends a.VBox{constructor(e){super(!0),this.setMinimumSize(0,40),this.registerRequiredCSS("search/searchView.css",{enableLegacyPatching:!0}),this._focusOnShow=!1,this._isIndexing=!1,this._searchId=1,this._searchMatchesCount=0,this._searchResultsCount=0,this._nonEmptySearchResultsCount=0,this._searchingView=null,this._notFoundView=null,this._searchConfig=null,this._pendingSearchConfig=null,this._searchResultsPane=null,this._progressIndicator=null,this._visiblePane=null,this.contentElement.classList.add("search-view"),this._searchPanelElement=this.contentElement.createChild("div","search-drawer-header"),this._searchResultsElement=this.contentElement.createChild("div"),this._searchResultsElement.className="search-results";const t=document.createElement("div");t.style.flex="auto",t.style.justifyContent="start",t.style.maxWidth="300px",this._search=u.HistoryInput.create(),this._search.addEventListener("keydown",(e=>{this._onKeyDown(e)})),t.appendChild(this._search),this._search.placeholder=v(y.search),this._search.setAttribute("type","text"),this._search.setAttribute("results","0"),this._search.setAttribute("size","42"),o.setAccessibleName(this._search,v(y.searchQuery));const n=new _.ToolbarItem(t),i=new _.Toolbar("search-toolbar",this._searchPanelElement);this._matchCaseButton=F._appendToolbarToggle(i,"Aa",v(y.matchCase)),this._regexButton=F._appendToolbarToggle(i,".*",v(y.useRegularExpression)),i.appendToolbarItem(n);const h=new _.ToolbarButton(v(y.refresh),"largeicon-refresh"),r=new _.ToolbarButton(v(y.clear),"largeicon-clear");i.appendToolbarItem(h),i.appendToolbarItem(r),h.addEventListener(_.ToolbarButton.Events.Click,(()=>this._onAction())),r.addEventListener(_.ToolbarButton.Events.Click,(()=>{this._resetSearch(),this._onSearchInputClear()}));const a=this.contentElement.createChild("div","search-toolbar-summary");this._searchMessageElement=a.createChild("div","search-message"),this._searchProgressPlaceholderElement=a.createChild("div","flex-centered"),this._searchResultsMessageElement=a.createChild("div","search-message"),this._advancedSearchConfig=s.Settings.instance().createLocalSetting(e+"SearchConfig",new m("",!0,!1).toPlainObject()),this._load(),this._searchScope=null}static _appendToolbarToggle(e,t,s){const n=new _.ToolbarToggle(s);return n.setText(t),n.addEventListener(_.ToolbarButton.Events.Click,(()=>n.setToggled(!n.toggled()))),e.appendToolbarItem(n),n}_buildSearchConfig(){return new m(this._search.value,!this._matchCaseButton.toggled(),this._regexButton.toggled())}async toggle(e,t){e&&(this._search.value=e),this.isShowing()?this.focus():this._focusOnShow=!0,this._initScope(),t?this._onAction():this._startIndexing()}createScope(){throw new Error("Not implemented")}_initScope(){this._searchScope=this.createScope()}wasShown(){this._focusOnShow&&(this.focus(),this._focusOnShow=!1)}_onIndexingFinished(){if(!this._progressIndicator)return;const e=!this._progressIndicator.isCanceled();if(this._progressIndicator.done(),this._progressIndicator=null,this._isIndexing=!1,this._indexingFinished(e),e||(this._pendingSearchConfig=null),!this._pendingSearchConfig)return;const t=this._pendingSearchConfig;this._pendingSearchConfig=null,this._innerStartSearch(t)}_startIndexing(){this._isIndexing=!0,this._progressIndicator&&this._progressIndicator.done(),this._progressIndicator=new d.ProgressIndicator,this._searchMessageElement.textContent=v(y.indexing),this._progressIndicator.show(this._searchProgressPlaceholderElement),this._searchScope&&this._searchScope.performIndexing(new n.ProgressProxy(this._progressIndicator,this._onIndexingFinished.bind(this)))}_onSearchInputClear(){this._search.value="",this._save(),this.focus()}_onSearchResult(e,t){e===this._searchId&&this._progressIndicator&&(this._progressIndicator&&this._progressIndicator.isCanceled()?this._onIndexingFinished():(this._addSearchResult(t),t.matchesCount()&&(this._searchResultsPane||(this._searchResultsPane=new w(this._searchConfig),this._showPane(this._searchResultsPane)),this._searchResultsPane.addSearchResult(t))))}_onSearchFinished(e,t){e===this._searchId&&this._progressIndicator&&(this._searchResultsPane||this._nothingFound(),this._searchFinished(t),this._searchConfig=null,o.alert(this._searchMessageElement.textContent+" "+this._searchResultsMessageElement.textContent,this._searchMessageElement))}async _startSearch(e){this._resetSearch(),++this._searchId,this._initScope(),this._isIndexing||this._startIndexing(),this._pendingSearchConfig=e}_innerStartSearch(e){this._searchConfig=e,this._progressIndicator&&this._progressIndicator.done(),this._progressIndicator=new d.ProgressIndicator,this._searchStarted(this._progressIndicator),this._searchScope&&this._searchScope.performSearch(e,this._progressIndicator,this._onSearchResult.bind(this,this._searchId),this._onSearchFinished.bind(this,this._searchId))}_resetSearch(){this._stopSearch(),this._showPane(null),this._searchResultsPane=null,this._clearSearchMessage()}_clearSearchMessage(){this._searchMessageElement.textContent="",this._searchResultsMessageElement.textContent=""}_stopSearch(){this._progressIndicator&&!this._isIndexing&&this._progressIndicator.cancel(),this._searchScope&&this._searchScope.stopSearch(),this._searchConfig=null}_searchStarted(e){this._resetCounters(),this._searchingView||(this._searchingView=new g.EmptyWidget(v(y.searching))),this._showPane(this._searchingView),this._searchMessageElement.textContent=v(y.searching),e.show(this._searchProgressPlaceholderElement),this._updateSearchResultsMessage()}_indexingFinished(e){this._searchMessageElement.textContent=e?"":v(y.indexingInterrupted)}_updateSearchResultsMessage(){this._searchMatchesCount&&this._searchResultsCount?1===this._searchMatchesCount&&1===this._nonEmptySearchResultsCount?this._searchResultsMessageElement.textContent=v(y.foundMatchingLineInFile):this._searchMatchesCount>1&&1===this._nonEmptySearchResultsCount?this._searchResultsMessageElement.textContent=v(y.foundDMatchingLinesInFile,{PH1:this._searchMatchesCount}):this._searchResultsMessageElement.textContent=v(y.foundDMatchingLinesInDFiles,{PH1:this._searchMatchesCount,PH2:this._nonEmptySearchResultsCount}):this._searchResultsMessageElement.textContent=""}_showPane(e){this._visiblePane&&this._visiblePane.detach(),e&&e.show(this._searchResultsElement),this._visiblePane=e}_resetCounters(){this._searchMatchesCount=0,this._searchResultsCount=0,this._nonEmptySearchResultsCount=0}_nothingFound(){this._notFoundView||(this._notFoundView=new g.EmptyWidget(v(y.noMatchesFound))),this._showPane(this._notFoundView),this._searchResultsMessageElement.textContent=v(y.noMatchesFound)}_addSearchResult(e){const t=e.matchesCount();this._searchMatchesCount+=t,this._searchResultsCount++,t&&this._nonEmptySearchResultsCount++,this._updateSearchResultsMessage()}_searchFinished(e){this._searchMessageElement.textContent=v(e?y.searchFinished:y.searchInterrupted)}focus(){this._search.focus(),this._search.select()}willHide(){this._stopSearch()}_onKeyDown(e){switch(this._save(),e.keyCode){case p.Keys.Enter.code:this._onAction()}}_save(){this._advancedSearchConfig.set(this._buildSearchConfig().toPlainObject())}_load(){const e=m.fromPlainObject(this._advancedSearchConfig.get());this._search.value=e.query(),this._matchCaseButton.setToggled(!e.ignoreCase()),this._regexButton.setToggled(e.isRegex())}_onAction(){o.alert(" ",this._searchMessageElement);const e=this._buildSearchConfig();e.query()&&e.query().length&&this._startSearch(e)}}var T=Object.freeze({__proto__:null,UIStrings:y,SearchView:F});export{f as SearchConfig,b as SearchResultsPane,T as SearchView};
@@ -0,0 +1 @@
1
+ import*as RootModule from'../root/root.js';RootModule.Runtime.cachedResources.set("search/searchResultsPane.css","/*\n * Copyright 2016 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n:host {\n padding: 0;\n margin: 0;\n overflow-y: auto;\n}\n\n.tree-outline {\n padding: 0;\n}\n\n.tree-outline ol {\n padding: 0;\n}\n\n.tree-outline li {\n height: 16px;\n}\n\nli.search-result {\n cursor: pointer;\n font-size: 12px;\n margin-top: 8px;\n padding: 2px 0 2px 4px;\n word-wrap: normal;\n white-space: pre;\n}\n\nli.search-result:hover {\n background-color: rgb(121 121 121 / 10%);\n}\n\nli.search-result .search-result-file-name {\n color: #222;\n flex: 1 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\nli.search-result .search-result-matches-count {\n color: #888;\n margin: 0 8px;\n}\n\nli.search-result.expanded .search-result-matches-count {\n display: none;\n}\n\nli.show-more-matches {\n color: #222;\n cursor: pointer;\n margin: 8px 0 0 -4px;\n}\n\nli.show-more-matches:hover {\n text-decoration: underline;\n}\n\nli.search-match {\n margin: 2px 0;\n word-wrap: normal;\n white-space: pre;\n}\n\nli.search-match::before {\n display: none;\n}\n\nli.search-match .search-match-line-number {\n color: rgb(128 128 128);\n text-align: right;\n vertical-align: top;\n word-break: normal;\n padding: 2px 4px 2px 6px;\n margin-right: 5px;\n}\n\nli.search-match:hover {\n background-color: var(--item-hover-color);\n}\n\nli.search-match .highlighted-match {\n background-color: #f1ea00;\n}\n\n:host-context(.-theme-with-dark-background) li.search-match .highlighted-match {\n background-color: hsl(133deg 100% 30%) !important;\n}\n\n.tree-outline .devtools-link {\n text-decoration: none;\n display: block;\n flex: auto;\n}\n\nli.search-match .search-match-content {\n color: #000;\n}\n\nol.children.expanded {\n padding-bottom: 4px;\n}\n\n.search-match-link {\n overflow: hidden;\n text-overflow: ellipsis;\n margin-left: 9px;\n}\n\n.search-result-qualifier {\n color: #aaa;\n}\n\n.search-result-dash {\n color: #aaa;\n margin: 0 4px;\n}\n\n/*# sourceURL=search/searchResultsPane.css */");RootModule.Runtime.cachedResources.set("search/searchView.css","/*\n * Copyright 2014 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.search-drawer-header {\n align-items: center;\n flex-shrink: 0;\n overflow: hidden;\n}\n\n.search-toolbar {\n background-color: var(--toolbar-bg-color);\n border-bottom: var(--divider-border);\n}\n\n.search-toolbar-summary {\n background-color: #eee;\n border-top: 1px solid #ccc;\n padding-left: 5px;\n flex: 0 0 19px;\n display: flex;\n padding-right: 5px;\n}\n\n.search-toolbar-summary .search-message {\n padding-top: 2px;\n padding-left: 1ex;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.search-view .search-results {\n overflow-y: auto;\n display: flex;\n flex: auto;\n}\n\n.search-view .search-results > div {\n flex: auto;\n}\n\n/*# sourceURL=search/searchView.css */");
@@ -0,0 +1 @@
1
+ import{SecurityModel as e,SecurityPanel as i}from"./security.js";self.Security=self.Security||{},Security=Security||{},Security.SecurityModel=e.SecurityModel,Security.SecurityModel.Events=e.Events,Security.PageVisibleSecurityState=e.PageVisibleSecurityState,Security.CertificateSecurityState=e.CertificateSecurityState,Security.SecurityStyleExplanation=e.SecurityStyleExplanation,Security.SecurityPanel=i.SecurityPanel,Security.SecurityPanelSidebarTree=i.SecurityPanelSidebarTree,Security.SecurityPanelSidebarTree.OriginGroup=i.OriginGroup,Security.SecurityPanelSidebarTreeElement=i.SecurityPanelSidebarTreeElement,Security.SecurityOriginView=i.SecurityOriginView;
@@ -0,0 +1 @@
1
+ import{ls as t}from"../platform/platform.js";import{Runtime as e}from"../root/root.js";import{ViewManager as i}from"../ui/ui.js";let r;i.registerViewExtension({location:"panel",id:"security",title:()=>t`Security`,commandPrompt:()=>t`Show Security`,order:80,persistence:"closeable",loadView:async()=>(await async function(){return r||(await e.Runtime.instance().loadModulePromise("security"),r=await import("./security.js")),r}()).SecurityPanel.SecurityPanel.instance()});
@@ -0,0 +1 @@
1
+ import{i18n as e}from"../i18n/i18n.js";import{SDKModel as t,ResourceTreeModel as i,NetworkManager as s}from"../sdk/sdk.js";import{ResourceType as r,ParsedURL as n,EventTarget as o}from"../common/common.js";import{InspectorFrontendHost as c}from"../host/host.js";import{NetworkLogView as a,NetworkPanel as l}from"../network/network.js";import{Panel as u,UIUtils as h,ARIAUtils as d,TreeOutline as S,Widget as y,Tooltip as g}from"../ui/ui.js";const p={theSecurityOfThisPageIsUnknown:"The security of this page is unknown.",thisPageIsNotSecure:"This page is not secure.",thisPageIsSecureValidHttps:"This page is secure (valid HTTPS).",thisPageIsNotSecureBrokenHttps:"This page is not secure (broken HTTPS).",cipherWithMAC:"{PH1} with {PH2}",keyExchangeWithGroup:"{PH1} with {PH2}"},m=e.registerUIStrings("security/SecurityModel.ts",p),C=e.getLocalizedString.bind(void 0,m);class w extends t.SDKModel{constructor(e){super(e),this._dispatcher=new E(this),this._securityAgent=e.securityAgent(),e.registerSecurityDispatcher(this._dispatcher),this._securityAgent.invoke_enable()}resourceTreeModel(){return this.target().model(i.ResourceTreeModel)}networkManager(){return this.target().model(s.NetworkManager)}static SecurityStateComparator(e,t){const i=v();return(e&&i.get(e)||0)-(t&&i.get(t)||0)}}let f=null;const v=()=>{if(!f){f=new Map;const e=[Protocol.Security.SecurityState.Info,Protocol.Security.SecurityState.InsecureBroken,Protocol.Security.SecurityState.Insecure,Protocol.Security.SecurityState.Neutral,Protocol.Security.SecurityState.Secure,Protocol.Security.SecurityState.Unknown];for(let t=0;t<e.length;t++)f.set(e[t],t+1)}return f};var P;t.SDKModel.register(w,t.Capability.Security,!1),function(e){e.SecurityStateChanged="SecurityStateChanged",e.VisibleSecurityStateChanged="VisibleSecurityStateChanged"}(P||(P={}));const x={[Protocol.Security.SecurityState.Unknown]:C(p.theSecurityOfThisPageIsUnknown),[Protocol.Security.SecurityState.Insecure]:C(p.thisPageIsNotSecure),[Protocol.Security.SecurityState.Neutral]:C(p.thisPageIsNotSecure),[Protocol.Security.SecurityState.Secure]:C(p.thisPageIsSecureValidHttps),[Protocol.Security.SecurityState.InsecureBroken]:C(p.thisPageIsNotSecureBrokenHttps)};class _{constructor(e,t,i){this.securityState=e,this.explanations=t,this.summary=i}}class T{constructor(e,t,i,s){this.securityState=e,this.certificateSecurityState=t?new k(t):null,this.safetyTipInfo=i?new b(i):null,this.securityStateIssueIds=s}}class k{constructor(e){this.protocol=e.protocol,this.keyExchange=e.keyExchange,this.keyExchangeGroup=e.keyExchangeGroup||null,this.cipher=e.cipher,this.mac=e.mac||null,this.certificate=e.certificate,this.subjectName=e.subjectName,this.issuer=e.issuer,this.validFrom=e.validFrom,this.validTo=e.validTo,this.certificateNetworkError=e.certificateNetworkError||null,this.certificateHasWeakSignature=e.certificateHasWeakSignature,this.certificateHasSha1Signature=e.certificateHasSha1Signature,this.modernSSL=e.modernSSL,this.obsoleteSslProtocol=e.obsoleteSslProtocol,this.obsoleteSslKeyExchange=e.obsoleteSslKeyExchange,this.obsoleteSslCipher=e.obsoleteSslCipher,this.obsoleteSslSignature=e.obsoleteSslSignature}isCertificateExpiringSoon(){const e=new Date(1e3*this.validTo).getTime();return e<new Date(Date.now()).setHours(48)&&e>Date.now()}getKeyExchangeName(){return this.keyExchangeGroup?this.keyExchange?C(p.keyExchangeWithGroup,{PH1:this.keyExchange,PH2:this.keyExchangeGroup}):this.keyExchangeGroup:this.keyExchange}getCipherFullName(){return this.mac?C(p.cipherWithMAC,{PH1:this.cipher,PH2:this.mac}):this.cipher}}class b{constructor(e){this.safetyTipStatus=e.safetyTipStatus,this.safeUrl=e.safeUrl||null}}class I{constructor(e,t,i,s,r=[],n=Protocol.Security.MixedContentType.None,o=[]){this.securityState=e,this.title=t,this.summary=i,this.description=s,this.certificate=r,this.mixedContentType=n,this.recommendations=o}}class E{constructor(e){this._model=e}securityStateChanged({securityState:e,explanations:t,summary:i}){const s=new _(e,t,i||null);this._model.dispatchEventToListeners(P.SecurityStateChanged,s)}visibleSecurityStateChanged({visibleSecurityState:e}){const t=new T(e.securityState,e.certificateSecurityState||null,e.safetyTipInfo||null,e.securityStateIssueIds);this._model.dispatchEventToListeners(P.VisibleSecurityStateChanged,t)}certificateError(e){}}var L=Object.freeze({__proto__:null,UIStrings:p,SecurityModel:w,get Events(){return P},SummaryMessages:x,PageSecurityState:_,PageVisibleSecurityState:T,CertificateSecurityState:k,SecurityStyleExplanation:I});const M={overview:"Overview",mainOrigin:"Main origin",nonsecureOrigins:"Non-secure origins",secureOrigins:"Secure origins",unknownCanceled:"Unknown / canceled",reloadToViewDetails:"Reload to view details",mainOriginSecure:"Main origin (secure)",mainOriginNonsecure:"Main origin (non-secure)",securityOverview:"Security overview",secure:"Secure",info:"Info",notSecure:"Not secure",viewCertificate:"View certificate",theSecurityOfThisPageIsUnknown:"The security of this page is unknown.",thisPageIsNotSecure:"This page is not secure.",thisPageIsSecureValidHttps:"This page is secure (valid HTTPS).",thisPageIsNotSecureBrokenHttps:"This page is not secure (broken HTTPS).",notSecureBroken:"Not secure (broken)",thisPageIsDangerousFlaggedBy:"This page is dangerous (flagged by Google Safe Browsing).",flaggedByGoogleSafeBrowsing:"Flagged by Google Safe Browsing",toCheckThisPagesStatusVisit:"To check this page's status, visit g.co/safebrowsingstatus.",thisIsAnErrorPage:"This is an error page.",thisPageIsInsecureUnencrypted:"This page is insecure (unencrypted HTTP).",formFieldEditedOnANonsecurePage:"Form field edited on a non-secure page",dataWasEnteredInAFieldOnA:"Data was entered in a field on a non-secure page. A warning has been added to the URL bar.",thisPageHasANonhttpsSecureOrigin:"This page has a non-HTTPS secure origin.",thisPageIsSuspicious:"This page is suspicious",chromeHasDeterminedThatThisSite:"Chrome has determined that this site could be fake or fraudulent.\n\nIf you believe this is shown in error please visit https://bugs.chromium.org/p/chromium/issues/entry?template=Safety+Tips+Appeals.",possibleSpoofingUrl:"Possible spoofing URL",thisSitesHostnameLooksSimilarToS:"This site's hostname looks similar to {PH1}. Attackers sometimes mimic sites by making small, hard-to-see changes to the domain name.\n\nIf you believe this is shown in error please visit https://bugs.chromium.org/p/chromium/issues/entry?template=Safety+Tips+Appeals.",thisPageIsSuspiciousFlaggedBy:"This page is suspicious (flagged by Chrome).",certificate:"Certificate",insecureSha:"insecure (SHA-1)",theCertificateChainForThisSite:"The certificate chain for this site contains a certificate signed using SHA-1.",subjectAlternativeNameMissing:"Subject Alternative Name missing",theCertificateForThisSiteDoesNot:"The certificate for this site does not contain a Subject Alternative Name extension containing a domain name or IP address.",missing:"missing",thisSiteIsMissingAValidTrusted:"This site is missing a valid, trusted certificate ({PH1}).",validAndTrusted:"valid and trusted",theConnectionToThisSiteIsUsingA:"The connection to this site is using a valid, trusted server certificate issued by {PH1}.",publickeypinningBypassed:"Public-Key-Pinning bypassed",publickeypinningWasBypassedByA:"Public-Key-Pinning was bypassed by a local root certificate.",certificateExpiresSoon:"Certificate expires soon",theCertificateForThisSiteExpires:"The certificate for this site expires in less than 48 hours and needs to be renewed.",connection:"Connection",secureConnectionSettings:"secure connection settings",theConnectionToThisSiteIs:"The connection to this site is encrypted and authenticated using {PH1}, {PH2}, and {PH3}.",sIsObsoleteEnableTlsOrLater:"{PH1} is obsolete. Enable TLS 1.2 or later.",rsaKeyExchangeIsObsoleteEnableAn:"RSA key exchange is obsolete. Enable an ECDHE-based cipher suite.",sIsObsoleteEnableAnAesgcmbased:"{PH1} is obsolete. Enable an AES-GCM-based cipher suite.",theServerSignatureUsesShaWhichIs:"The server signature uses SHA-1, which is obsolete. Enable a SHA-2 signature algorithm instead. (Note this is different from the signature in the certificate.)",obsoleteConnectionSettings:"obsolete connection settings",resources:"Resources",activeMixedContent:"active mixed content",youHaveRecentlyAllowedNonsecure:"You have recently allowed non-secure content (such as scripts or iframes) to run on this site.",mixedContent:"mixed content",thisPageIncludesHttpResources:"This page includes HTTP resources.",nonsecureForm:"non-secure form",thisPageIncludesAFormWithA:'This page includes a form with a non-secure "action" attribute.',activeContentWithCertificate:"active content with certificate errors",youHaveRecentlyAllowedContent:"You have recently allowed content loaded with certificate errors (such as scripts or iframes) to run on this site.",contentWithCertificateErrors:"content with certificate errors",thisPageIncludesResourcesThat:"This page includes resources that were loaded with certificate errors.",allServedSecurely:"all served securely",allResourcesOnThisPageAreServed:"All resources on this page are served securely.",blockedMixedContent:"Blocked mixed content",yourPageRequestedNonsecure:"Your page requested non-secure resources that were blocked.",reloadThePageToRecordRequestsFor:"Reload the page to record requests for HTTP resources.",viewDRequestInNetworkPanel:"View {PH1} request in Network Panel",viewDRequestsInNetworkPanel:"View {PH1} requests in Network Panel",origin:"Origin",viewRequestsInNetworkPanel:"View requests in Network Panel",protocol:"Protocol",keyExchange:"Key exchange",keyExchangeGroup:"Key exchange group",cipher:"Cipher",certificateTransparency:"Certificate Transparency",subject:"Subject",san:"SAN",validFrom:"Valid from",validUntil:"Valid until",issuer:"Issuer",openFullCertificateDetails:"Open full certificate details",sct:"SCT",logName:"Log name",logId:"Log ID",validationStatus:"Validation status",source:"Source",issuedAt:"Issued at",hashAlgorithm:"Hash algorithm",signatureAlgorithm:"Signature algorithm",signatureData:"Signature data",showFullDetails:"Show full details",hideFullDetails:"Hide full details",thisRequestCompliesWithChromes:"This request complies with `Chrome`'s Certificate Transparency policy.",thisRequestDoesNotComplyWith:"This request does not comply with `Chrome`'s Certificate Transparency policy.",thisResponseWasLoadedFromCache:"This response was loaded from cache. Some security details might be missing.",theSecurityDetailsAboveAreFrom:"The security details above are from the first inspected response.",thisOriginIsANonhttpsSecure:"This origin is a non-HTTPS secure origin.",yourConnectionToThisOriginIsNot:"Your connection to this origin is not secure.",noSecurityInformation:"No security information",noSecurityDetailsAreAvailableFor:"No security details are available for this origin.",na:"(n/a)",showLess:"Show less",showMoreSTotal:"Show more ({PH1} total)"},N=e.registerUIStrings("security/SecurityPanel.ts",M),A=e.getLocalizedString.bind(void 0,N);let R;class H extends u.PanelWithSidebar{constructor(){super("security"),this._mainView=new F(this);const e=document.createElement("span");e.classList.add("title"),e.textContent=A(M.overview),this._sidebarMainViewElement=new V(e,this._setVisibleView.bind(this,this._mainView),"security-main-view-sidebar-tree-item","lock-icon"),this._sidebarMainViewElement.tooltip=e.textContent,this._sidebarTree=new O(this._sidebarMainViewElement,this.showOrigin.bind(this)),this.panelSidebarElement().appendChild(this._sidebarTree.element),this._lastResponseReceivedForLoaderId=new Map,this._origins=new Map,this._filterRequestCounts=new Map,t.TargetManager.instance().observeModels(w,this),this._visibleView=null,this._eventListeners=[],this._securityModel=null}static instance(e={forceNew:null}){const{forceNew:t}=e;return R&&!t||(R=new H),R}static _instance(){return H.instance()}static createCertificateViewerButtonForOrigin(e,t){const i=h.createTextButton(e,(async e=>{e.consume();const i=await s.MultitargetNetworkManager.instance().getCertificate(t);i.length>0&&c.InspectorFrontendHostInstance.showCertificateViewer(i)}),"origin-button");return d.markAsButton(i),i}static createCertificateViewerButtonForCert(e,t){const i=h.createTextButton(e,(e=>{e.consume(),c.InspectorFrontendHostInstance.showCertificateViewer(t)}),"origin-button");return d.markAsButton(i),i}static createHighlightedUrl(e,t){const i="://",s=e.indexOf(i);if(-1===s){const t=document.createElement("span");return t.textContent=e,t}const r=document.createElement("span"),n=e.substr(0,s),o=e.substr(s+i.length);return r.createChild("span","url-scheme-"+t).textContent=n,r.createChild("span","url-scheme-separator").textContent=i,r.createChild("span").textContent=o,r}_updateSecurityState(e,t,i){this._sidebarMainViewElement.setSecurityState(e),this._mainView.updateSecurityState(e,t,i)}_onSecurityStateChanged(e){const t=e.data,i=t.securityState,s=t.explanations,r=t.summary;this._updateSecurityState(i,s,r)}_updateVisibleSecurityState(e){this._sidebarMainViewElement.setSecurityState(e.securityState),this._mainView.updateVisibleSecurityState(e)}_onVisibleSecurityStateChanged(e){const t=e.data;this._updateVisibleSecurityState(t)}selectAndSwitchToMainView(){this._sidebarMainViewElement.select(!0)}showOrigin(e){const t=this._origins.get(e);t&&(t.originView||(t.originView=new B(this,e,t)),this._setVisibleView(t.originView))}wasShown(){super.wasShown(),this._visibleView||this.selectAndSwitchToMainView()}focus(){this._sidebarTree.focus()}_setVisibleView(e){this._visibleView!==e&&(this._visibleView&&this._visibleView.detach(),this._visibleView=e,e&&this.splitWidget().setMainWidget(e))}_onResponseReceived(e){const t=e.data.request;t.resourceType()===r.resourceTypes.Document&&this._lastResponseReceivedForLoaderId.set(t.loaderId,t)}_processRequest(e){const t=n.ParsedURL.extractOrigin(e.url());if(!t)return;let i=e.securityState();e.mixedContentType!==Protocol.Security.MixedContentType.Blockable&&e.mixedContentType!==Protocol.Security.MixedContentType.OptionallyBlockable||(i=Protocol.Security.SecurityState.Insecure);const s=this._origins.get(t);if(s){const r=s.securityState;if(s.securityState=this._securityStateMin(r,i),r!==s.securityState){const r=e.securityDetails();r&&(s.securityDetails=r),this._sidebarTree.updateOrigin(t,i),s.originView&&s.originView.setSecurityState(i)}}else{const s={securityState:i,securityDetails:e.securityDetails(),loadedFromCache:e.cached(),originView:void 0};this._origins.set(t,s),this._sidebarTree.addOrigin(t,i)}}_onRequestFinished(e){const t=e.data;this._updateFilterRequestCounts(t),this._processRequest(t)}_updateFilterRequestCounts(e){if(e.mixedContentType===Protocol.Security.MixedContentType.None)return;let t=a.MixedContentFilterValues.All;e.wasBlocked()?t=a.MixedContentFilterValues.Blocked:e.mixedContentType===Protocol.Security.MixedContentType.Blockable?t=a.MixedContentFilterValues.BlockOverridden:e.mixedContentType===Protocol.Security.MixedContentType.OptionallyBlockable&&(t=a.MixedContentFilterValues.Displayed);const i=this._filterRequestCounts.get(t);i?this._filterRequestCounts.set(t,i+1):this._filterRequestCounts.set(t,1),this._mainView.refreshExplanations()}filterRequestCount(e){return this._filterRequestCounts.get(e)||0}_securityStateMin(e,t){return w.SecurityStateComparator(e,t)<0?e:t}modelAdded(e){if(this._securityModel)return;this._securityModel=e;const t=e.resourceTreeModel(),r=e.networkManager();this._eventListeners=[e.addEventListener(P.VisibleSecurityStateChanged,this._onVisibleSecurityStateChanged,this),t.addEventListener(i.Events.MainFrameNavigated,this._onMainFrameNavigated,this),t.addEventListener(i.Events.InterstitialShown,this._onInterstitialShown,this),t.addEventListener(i.Events.InterstitialHidden,this._onInterstitialHidden,this),r.addEventListener(s.Events.ResponseReceived,this._onResponseReceived,this),r.addEventListener(s.Events.RequestFinished,this._onRequestFinished,this)],t.isInterstitialShowing()&&this._onInterstitialShown()}modelRemoved(e){this._securityModel===e&&(this._securityModel=null,o.EventTarget.removeEventListeners(this._eventListeners))}_onMainFrameNavigated(e){const t=e.data,i=this._lastResponseReceivedForLoaderId.get(t.loaderId);this.selectAndSwitchToMainView(),this._sidebarTree.clearOrigins(),this._origins.clear(),this._lastResponseReceivedForLoaderId.clear(),this._filterRequestCounts.clear(),this._mainView.refreshExplanations();const s=n.ParsedURL.extractOrigin(i?i.url():t.url);this._sidebarTree.setMainOrigin(s),i&&this._processRequest(i)}_onInterstitialShown(){this.selectAndSwitchToMainView(),this._sidebarTree.toggleOriginsList(!0)}_onInterstitialHidden(){this._sidebarTree.toggleOriginsList(!1)}}class O extends S.TreeOutlineInShadow{constructor(e,t){super(),this.registerRequiredCSS("security/sidebar.css",{enableLegacyPatching:!0}),this.registerRequiredCSS("security/lockIcon.css",{enableLegacyPatching:!0}),this.appendChild(e),this._showOriginInPanel=t,this._mainOrigin=null,this._originGroupTitles=new Map([[D.MainOrigin,A(M.mainOrigin)],[D.NonSecure,A(M.nonsecureOrigins)],[D.Secure,A(M.secureOrigins)],[D.Unknown,A(M.unknownCanceled)]]),this._originGroups=new Map;for(const e of Object.values(D)){const t=this._createOriginGroupElement(this._originGroupTitles.get(e));this._originGroups.set(e,t),this.appendChild(t)}this._clearOriginGroups();const i=new S.TreeElement(A(M.reloadToViewDetails));i.selectable=!1,i.listItemElement.classList.add("security-main-view-reload-message");this._originGroups.get(D.MainOrigin).appendChild(i),this._elementsByOrigin=new Map}_originGroupTitle(e){return this._originGroupTitles.get(e)}_originGroupElement(e){return this._originGroups.get(e)}_createOriginGroupElement(e){const t=new S.TreeElement(e,!0);return t.selectable=!1,t.setCollapsible(!1),t.expand(),t.listItemElement.classList.add("security-sidebar-origins"),d.setAccessibleName(t.childrenListElement,e),t}toggleOriginsList(e){for(const t of this._originGroups.values())t.hidden=e}addOrigin(e,t){const i=new V(H.createHighlightedUrl(e,t),this._showOriginInPanel.bind(this,e),"security-sidebar-tree-item","security-property");i.tooltip=e,this._elementsByOrigin.set(e,i),this.updateOrigin(e,t)}setMainOrigin(e){this._mainOrigin=e}updateOrigin(e,t){const i=this._elementsByOrigin.get(e);let s;if(i.setSecurityState(t),e===this._mainOrigin)s=this._originGroups.get(D.MainOrigin),t===Protocol.Security.SecurityState.Secure?s.title=A(M.mainOriginSecure):s.title=A(M.mainOriginNonsecure),d.setAccessibleName(s.childrenListElement,s.title);else switch(t){case Protocol.Security.SecurityState.Secure:s=this._originGroupElement(D.Secure);break;case Protocol.Security.SecurityState.Unknown:s=this._originGroupElement(D.Unknown);break;default:s=this._originGroupElement(D.NonSecure)}const r=i.parent;r!==s&&(r&&(r.removeChild(i),0===r.childCount()&&(r.hidden=!0)),s.appendChild(i),s.hidden=!1)}_clearOriginGroups(){for(const e of this._originGroups.values())e.removeChildren(),e.hidden=!0;const e=this._originGroupElement(D.MainOrigin);e.title=this._originGroupTitle(D.MainOrigin),e.hidden=!1}clearOrigins(){this._clearOriginGroups(),this._elementsByOrigin.clear()}}var D;!function(e){e.MainOrigin="MainOrigin",e.NonSecure="NonSecure",e.Secure="Secure",e.Unknown="Unknown"}(D||(D={}));class V extends S.TreeElement{constructor(e,t,i,s){super("",!1),this._selectCallback=t,this._cssPrefix=s,this.listItemElement.classList.add(i),this._iconElement=this.listItemElement.createChild("div","icon"),this._iconElement.classList.add(this._cssPrefix),this.listItemElement.appendChild(e),this._securityState=null,this.setSecurityState(Protocol.Security.SecurityState.Unknown)}static SecurityStateComparator(e,t){return w.SecurityStateComparator(e.securityState(),t.securityState())}setSecurityState(e){this._securityState&&this._iconElement.classList.remove(this._cssPrefix+"-"+this._securityState),this._securityState=e,this._iconElement.classList.add(this._cssPrefix+"-"+e)}securityState(){return this._securityState}onselect(){return this._selectCallback(),!0}}class F extends y.VBox{constructor(e){super(!0),this.registerRequiredCSS("security/mainView.css",{enableLegacyPatching:!0}),this.registerRequiredCSS("security/lockIcon.css",{enableLegacyPatching:!0}),this.setMinimumSize(200,100),this.contentElement.classList.add("security-main-view"),this._panel=e,this._summarySection=this.contentElement.createChild("div","security-summary"),this._securityExplanationsMain=this.contentElement.createChild("div","security-explanation-list security-explanations-main"),this._securityExplanationsExtra=this.contentElement.createChild("div","security-explanation-list security-explanations-extra");const t=this._summarySection.createChild("div","security-summary-section-title");t.textContent=A(M.securityOverview),d.markAsHeading(t,1);const i=this._summarySection.createChild("div","lock-spectrum");this._lockSpectrum=new Map([[Protocol.Security.SecurityState.Secure,i.createChild("div","lock-icon lock-icon-secure")],[Protocol.Security.SecurityState.Neutral,i.createChild("div","lock-icon lock-icon-neutral")],[Protocol.Security.SecurityState.Insecure,i.createChild("div","lock-icon lock-icon-insecure")]]),g.Tooltip.install(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Secure),A(M.secure)),g.Tooltip.install(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Neutral),A(M.info)),g.Tooltip.install(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure),A(M.notSecure)),this._summarySection.createChild("div","triangle-pointer-container").createChild("div","triangle-pointer-wrapper").createChild("div","triangle-pointer"),this._summaryText=this._summarySection.createChild("div","security-summary-text"),d.markAsHeading(this._summaryText,2),this._explanations=null,this._securityState=null}getLockSpectrumDiv(e){const t=this._lockSpectrum.get(e);if(!t)throw new Error("Invalid argument: "+e);return t}_addExplanation(e,t){const i=e.createChild("div","security-explanation");i.classList.add("security-explanation-"+t.securityState),i.createChild("div","security-property").classList.add("security-property-"+t.securityState);const s=i.createChild("div","security-explanation-text"),r=s.createChild("div","security-explanation-title");if(t.title?(r.createChild("span").textContent=t.title+" - ",r.createChild("span","security-explanation-title-"+t.securityState).textContent=t.summary):r.textContent=t.summary,s.createChild("div").textContent=t.description,t.certificate.length&&s.appendChild(H.createCertificateViewerButtonForCert(A(M.viewCertificate),t.certificate)),t.recommendations&&t.recommendations.length){const e=s.createChild("ul","security-explanation-recommendations");for(const i of t.recommendations)e.createChild("li").textContent=i}return s}updateSecurityState(e,t,i){this._summarySection.classList.remove("security-summary-"+this._securityState),this._securityState=e,this._summarySection.classList.add("security-summary-"+this._securityState);const s=new Map([[Protocol.Security.SecurityState.Unknown,A(M.theSecurityOfThisPageIsUnknown)],[Protocol.Security.SecurityState.Insecure,A(M.thisPageIsNotSecure)],[Protocol.Security.SecurityState.Neutral,A(M.thisPageIsNotSecure)],[Protocol.Security.SecurityState.Secure,A(M.thisPageIsSecureValidHttps)],[Protocol.Security.SecurityState.InsecureBroken,A(M.thisPageIsNotSecureBrokenHttps)]]);this._securityState===Protocol.Security.SecurityState.Insecure?(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure).classList.add("lock-icon-insecure"),this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure).classList.remove("lock-icon-insecure-broken"),g.Tooltip.install(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure),A(M.notSecure))):this._securityState===Protocol.Security.SecurityState.InsecureBroken&&(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure).classList.add("lock-icon-insecure-broken"),this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure).classList.remove("lock-icon-insecure"),g.Tooltip.install(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure),A(M.notSecureBroken))),this._summaryText.textContent=i||s.get(this._securityState)||"",this._explanations=t,this.refreshExplanations()}updateVisibleSecurityState(e){this._summarySection.classList.remove("security-summary-"+this._securityState),this._securityState=e.securityState,this._summarySection.classList.add("security-summary-"+this._securityState),this._securityState===Protocol.Security.SecurityState.Insecure?(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure).classList.add("lock-icon-insecure"),this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure).classList.remove("lock-icon-insecure-broken"),g.Tooltip.install(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure),A(M.notSecure))):this._securityState===Protocol.Security.SecurityState.InsecureBroken&&(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure).classList.add("lock-icon-insecure-broken"),this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure).classList.remove("lock-icon-insecure"),g.Tooltip.install(this.getLockSpectrumDiv(Protocol.Security.SecurityState.Insecure),A(M.notSecureBroken)));const{summary:t,explanations:i}=this._getSecuritySummaryAndExplanations(e);this._summaryText.textContent=t||x[this._securityState],this._explanations=this._orderExplanations(i),this.refreshExplanations()}_getSecuritySummaryAndExplanations(e){const{securityState:t,securityStateIssueIds:i}=e;let s;const r=[];if(s=this._explainSafetyTipSecurity(e,s,r),i.includes("malicious-content"))s=A(M.thisPageIsDangerousFlaggedBy),r.unshift(new I(Protocol.Security.SecurityState.Insecure,void 0,A(M.flaggedByGoogleSafeBrowsing),A(M.toCheckThisPagesStatusVisit)));else{if(i.includes("is-error-page")&&(null===e.certificateSecurityState||null===e.certificateSecurityState.certificateNetworkError))return s=A(M.thisIsAnErrorPage),{summary:s,explanations:r};t===Protocol.Security.SecurityState.InsecureBroken&&i.includes("scheme-is-not-cryptographic")&&(s=s||A(M.thisPageIsInsecureUnencrypted),i.includes("insecure-input-events")&&r.push(new I(Protocol.Security.SecurityState.Insecure,void 0,A(M.formFieldEditedOnANonsecurePage),A(M.dataWasEnteredInAFieldOnA))))}return i.includes("scheme-is-not-cryptographic")?(t!==Protocol.Security.SecurityState.Neutral||i.includes("insecure-origin")||(s=A(M.thisPageHasANonhttpsSecureOrigin)),{summary:s,explanations:r}):(this._explainCertificateSecurity(e,r),this._explainConnectionSecurity(e,r),this._explainContentSecurity(e,r),{summary:s,explanations:r})}_explainSafetyTipSecurity(e,t,i){const{securityStateIssueIds:s,safetyTipInfo:r}=e,n=[];if(s.includes("bad_reputation"))n.push({summary:A(M.thisPageIsSuspicious),description:A(M.chromeHasDeterminedThatThisSite)});else if(s.includes("lookalike")&&r&&r.safeUrl){const e=new URL(r.safeUrl).hostname;n.push({summary:A(M.possibleSpoofingUrl),description:A(M.thisSitesHostnameLooksSimilarToS,{PH1:e})})}return n.length>0&&(t=t||A(M.thisPageIsSuspiciousFlaggedBy),i.push(new I(Protocol.Security.SecurityState.Insecure,void 0,n[0].summary,n[0].description))),t}_explainCertificateSecurity(e,t){const{certificateSecurityState:i,securityStateIssueIds:s}=e,r=A(M.certificate);if(i&&i.certificateHasSha1Signature){const e=A(M.insecureSha),s=A(M.theCertificateChainForThisSite);i.certificateHasWeakSignature?t.push(new I(Protocol.Security.SecurityState.Insecure,r,e,s,i.certificate,Protocol.Security.MixedContentType.None)):t.push(new I(Protocol.Security.SecurityState.Neutral,r,e,s,i.certificate,Protocol.Security.MixedContentType.None))}i&&s.includes("cert-missing-subject-alt-name")&&t.push(new I(Protocol.Security.SecurityState.Insecure,r,A(M.subjectAlternativeNameMissing),A(M.theCertificateForThisSiteDoesNot),i.certificate,Protocol.Security.MixedContentType.None)),i&&null!==i.certificateNetworkError?t.push(new I(Protocol.Security.SecurityState.Insecure,r,A(M.missing),A(M.thisSiteIsMissingAValidTrusted,{PH1:i.certificateNetworkError}),i.certificate,Protocol.Security.MixedContentType.None)):i&&!i.certificateHasSha1Signature&&t.push(new I(Protocol.Security.SecurityState.Secure,r,A(M.validAndTrusted),A(M.theConnectionToThisSiteIsUsingA,{PH1:i.issuer}),i.certificate,Protocol.Security.MixedContentType.None)),s.includes("pkp-bypassed")&&t.push(new I(Protocol.Security.SecurityState.Info,r,A(M.publickeypinningBypassed),A(M.publickeypinningWasBypassedByA))),i&&i.isCertificateExpiringSoon()&&t.push(new I(Protocol.Security.SecurityState.Info,void 0,A(M.certificateExpiresSoon),A(M.theCertificateForThisSiteExpires)))}_explainConnectionSecurity(e,t){const i=e.certificateSecurityState;if(!i)return;const s=A(M.connection);if(i.modernSSL)return void t.push(new I(Protocol.Security.SecurityState.Secure,s,A(M.secureConnectionSettings),A(M.theConnectionToThisSiteIs,{PH1:i.protocol,PH2:i.getKeyExchangeName(),PH3:i.getCipherFullName()})));const r=[];i.obsoleteSslProtocol&&r.push(A(M.sIsObsoleteEnableTlsOrLater,{PH1:i.protocol})),i.obsoleteSslKeyExchange&&r.push(A(M.rsaKeyExchangeIsObsoleteEnableAn)),i.obsoleteSslCipher&&r.push(A(M.sIsObsoleteEnableAnAesgcmbased,{PH1:i.cipher})),i.obsoleteSslSignature&&r.push(A(M.theServerSignatureUsesShaWhichIs)),t.push(new I(Protocol.Security.SecurityState.Info,s,A(M.obsoleteConnectionSettings),A(M.theConnectionToThisSiteIs,{PH1:i.protocol,PH2:i.getKeyExchangeName(),PH3:i.getCipherFullName()}),void 0,void 0,r))}_explainContentSecurity(e,t){let i=!0;const s=A(M.resources),r=e.securityStateIssueIds;r.includes("ran-mixed-content")&&(i=!1,t.push(new I(Protocol.Security.SecurityState.Insecure,s,A(M.activeMixedContent),A(M.youHaveRecentlyAllowedNonsecure),[],Protocol.Security.MixedContentType.Blockable))),r.includes("displayed-mixed-content")&&(i=!1,t.push(new I(Protocol.Security.SecurityState.Neutral,s,A(M.mixedContent),A(M.thisPageIncludesHttpResources),[],Protocol.Security.MixedContentType.OptionallyBlockable))),r.includes("contained-mixed-form")&&(i=!1,t.push(new I(Protocol.Security.SecurityState.Neutral,s,A(M.nonsecureForm),A(M.thisPageIncludesAFormWithA)))),null!==e.certificateSecurityState&&null!==e.certificateSecurityState.certificateNetworkError||(r.includes("ran-content-with-cert-error")&&(i=!1,t.push(new I(Protocol.Security.SecurityState.Insecure,s,A(M.activeContentWithCertificate),A(M.youHaveRecentlyAllowedContent)))),r.includes("displayed-content-with-cert-errors")&&(i=!1,t.push(new I(Protocol.Security.SecurityState.Neutral,s,A(M.contentWithCertificateErrors),A(M.thisPageIncludesResourcesThat))))),i&&(r.includes("scheme-is-not-cryptographic")||t.push(new I(Protocol.Security.SecurityState.Secure,s,A(M.allServedSecurely),A(M.allResourcesOnThisPageAreServed))))}_orderExplanations(e){if(0===e.length)return e;const t=[Protocol.Security.SecurityState.Insecure,Protocol.Security.SecurityState.Neutral,Protocol.Security.SecurityState.Secure,Protocol.Security.SecurityState.Info],i=[];for(const s of t)i.push(...e.filter((e=>e.securityState===s)));return i}refreshExplanations(){if(this._securityExplanationsMain.removeChildren(),this._securityExplanationsExtra.removeChildren(),this._explanations){for(const e of this._explanations)if(e.securityState===Protocol.Security.SecurityState.Info)this._addExplanation(this._securityExplanationsExtra,e);else switch(e.mixedContentType){case Protocol.Security.MixedContentType.Blockable:this._addMixedContentExplanation(this._securityExplanationsMain,e,a.MixedContentFilterValues.BlockOverridden);break;case Protocol.Security.MixedContentType.OptionallyBlockable:this._addMixedContentExplanation(this._securityExplanationsMain,e,a.MixedContentFilterValues.Displayed);break;default:this._addExplanation(this._securityExplanationsMain,e)}if(this._panel.filterRequestCount(a.MixedContentFilterValues.Blocked)>0){const e={securityState:Protocol.Security.SecurityState.Info,summary:A(M.blockedMixedContent),description:A(M.yourPageRequestedNonsecure),mixedContentType:Protocol.Security.MixedContentType.Blockable,certificate:[],title:""};this._addMixedContentExplanation(this._securityExplanationsMain,e,a.MixedContentFilterValues.Blocked)}}}_addMixedContentExplanation(e,t,i){const s=this._addExplanation(e,t),r=this._panel.filterRequestCount(i);if(!r){return void(s.createChild("div","security-mixed-content").textContent=A(M.reloadThePageToRecordRequestsFor))}const n=s.createChild("div","security-mixed-content devtools-link");d.markAsLink(n),n.tabIndex=0,n.textContent=A(1===r?M.viewDRequestInNetworkPanel:M.viewDRequestsInNetworkPanel,{PH1:r}),n.addEventListener("click",this.showNetworkFilter.bind(this,i)),n.addEventListener("keydown",(e=>{"Enter"===e.key&&this.showNetworkFilter(i,e)}))}showNetworkFilter(e,t){t.consume(),l.NetworkPanel.revealAndFilter([{filterType:a.FilterType.MixedContent,filterValue:e}])}}class B extends y.VBox{constructor(e,t,i){super(),this._panel=e,this.setMinimumSize(200,100),this.element.classList.add("security-origin-view"),this.registerRequiredCSS("security/originView.css",{enableLegacyPatching:!0}),this.registerRequiredCSS("security/lockIcon.css",{enableLegacyPatching:!0});const s=this.element.createChild("div","title-section"),r=s.createChild("div","title-section-header");r.textContent=A(M.origin),d.markAsHeading(r,1);const o=s.createChild("div","origin-display");this._originLockIcon=o.createChild("span","security-property"),this._originLockIcon.classList.add("security-property-"+i.securityState),o.appendChild(H.createHighlightedUrl(t,i.securityState));const c=s.createChild("div","view-network-button"),u=h.createTextButton(A(M.viewRequestsInNetworkPanel),(e=>{e.consume();const i=new n.ParsedURL(t);l.NetworkPanel.revealAndFilter([{filterType:a.FilterType.Domain,filterValue:i.host},{filterType:a.FilterType.Scheme,filterValue:i.scheme}])}));if(c.appendChild(u),d.markAsLink(u),i.securityDetails){const e=this.element.createChild("div","origin-view-section"),s=e.createChild("div","origin-view-section-title");s.textContent=A(M.connection),d.markAsHeading(s,2);let r=new U;e.appendChild(r.element()),r.addRow(A(M.protocol),i.securityDetails.protocol),i.securityDetails.keyExchange&&r.addRow(A(M.keyExchange),i.securityDetails.keyExchange),i.securityDetails.keyExchangeGroup&&r.addRow(A(M.keyExchangeGroup),i.securityDetails.keyExchangeGroup),r.addRow(A(M.cipher),i.securityDetails.cipher+(i.securityDetails.mac?" with "+i.securityDetails.mac:""));const n=this.element.createChild("div","origin-view-section"),o=n.createChild("div","origin-view-section-title");o.textContent=A(M.certificate),d.markAsHeading(o,2);const c=i.securityDetails.signedCertificateTimestampList.length,a=i.securityDetails.certificateTransparencyCompliance;let l;if(c||a!==Protocol.Network.CertificateTransparencyCompliance.Unknown){l=this.element.createChild("div","origin-view-section");const e=l.createChild("div","origin-view-section-title");e.textContent=A(M.certificateTransparency),d.markAsHeading(e,2)}const u=this._createSanDiv(i.securityDetails.sanList),S=new Date(1e3*i.securityDetails.validFrom).toUTCString(),y=new Date(1e3*i.securityDetails.validTo).toUTCString();if(r=new U,n.appendChild(r.element()),r.addRow(A(M.subject),i.securityDetails.subjectName),r.addRow(A(M.san),u),r.addRow(A(M.validFrom),S),r.addRow(A(M.validUntil),y),r.addRow(A(M.issuer),i.securityDetails.issuer),r.addRow("",H.createCertificateViewerButtonForOrigin(A(M.openFullCertificateDetails),t)),!l)return;const g=new U;g.element().classList.add("sct-summary"),l.appendChild(g.element());for(let e=0;e<c;e++){const t=i.securityDetails.signedCertificateTimestampList[e];g.addRow(A(M.sct),t.logDescription+" ("+t.origin+", "+t.status+")")}const p=l.createChild("div","sct-details");p.classList.add("hidden");for(let e=0;e<c;e++){const t=new U;p.appendChild(t.element());const s=i.securityDetails.signedCertificateTimestampList[e];t.addRow(A(M.logName),s.logDescription),t.addRow(A(M.logId),s.logId.replace(/(.{2})/g,"$1 ")),t.addRow(A(M.validationStatus),s.status),t.addRow(A(M.source),s.origin),t.addRow(A(M.issuedAt),new Date(s.timestamp).toUTCString()),t.addRow(A(M.hashAlgorithm),s.hashAlgorithm),t.addRow(A(M.signatureAlgorithm),s.signatureAlgorithm),t.addRow(A(M.signatureData),s.signatureData.replace(/(.{2})/g,"$1 "))}if(c){const e=h.createTextButton(A(M.showFullDetails),(function(){let t;const i=!p.classList.contains("hidden");t=A(i?M.showFullDetails:M.hideFullDetails),e.textContent=t,d.setAccessibleName(e,t),d.setExpanded(e,!i),g.element().classList.toggle("hidden"),p.classList.toggle("hidden")}),"details-toggle");l.appendChild(e)}switch(a){case Protocol.Network.CertificateTransparencyCompliance.Compliant:l.createChild("div","origin-view-section-notes").textContent=A(M.thisRequestCompliesWithChromes);break;case Protocol.Network.CertificateTransparencyCompliance.NotCompliant:l.createChild("div","origin-view-section-notes").textContent=A(M.thisRequestDoesNotComplyWith);break;case Protocol.Network.CertificateTransparencyCompliance.Unknown:}const m=this.element.createChild("div","origin-view-section origin-view-notes");i.loadedFromCache&&(m.createChild("div").textContent=A(M.thisResponseWasLoadedFromCache)),m.createChild("div").textContent=A(M.theSecurityDetailsAboveAreFrom)}else if(i.securityState===Protocol.Security.SecurityState.Secure){const e=this.element.createChild("div","origin-view-section"),t=e.createChild("div","origin-view-section-title");t.textContent=A(M.secure),d.markAsHeading(t,2),e.createChild("div").textContent=A(M.thisOriginIsANonhttpsSecure)}else if(i.securityState!==Protocol.Security.SecurityState.Unknown){const e=this.element.createChild("div","origin-view-section"),t=e.createChild("div","origin-view-section-title");t.textContent=A(M.notSecure),d.markAsHeading(t,2),e.createChild("div").textContent=A(M.yourConnectionToThisOriginIsNot)}else{const e=this.element.createChild("div","origin-view-section"),t=e.createChild("div","origin-view-section-title");t.textContent=A(M.noSecurityInformation),d.markAsHeading(t,2),e.createChild("div").textContent=A(M.noSecurityDetailsAreAvailableFor)}}_createSanDiv(e){const t=document.createElement("div");if(0===e.length)t.textContent=A(M.na),t.classList.add("empty-san");else{const s=2,r=e.length>s+1;for(let i=0;i<e.length;i++){const n=t.createChild("span","san-entry");n.textContent=e[i],r&&i>=s&&n.classList.add("truncated-entry")}if(r){function i(){const i=t.classList.contains("truncated-san");let r;i?(t.classList.remove("truncated-san"),r=A(M.showLess)):(t.classList.add("truncated-san"),r=A(M.showMoreSTotal,{PH1:e.length})),s.textContent=r,d.setAccessibleName(s,r),d.setExpanded(s,i)}const s=h.createTextButton(A(M.showMoreSTotal,{PH1:e.length}),i);t.appendChild(s),i()}}return t}setSecurityState(e){for(const e of Array.prototype.slice.call(this._originLockIcon.classList))e.startsWith("security-property-")&&this._originLockIcon.classList.remove(e);this._originLockIcon.classList.add("security-property-"+e)}}class U{constructor(){this._element=document.createElement("table"),this._element.classList.add("details-table")}element(){return this._element}addRow(e,t){const i=this._element.createChild("div","details-table-row");i.createChild("div").textContent=e;const s=i.createChild("div");"string"==typeof t?s.textContent=t:s.appendChild(t)}}var q=Object.freeze({__proto__:null,UIStrings:M,SecurityPanel:H,SecurityPanelSidebarTree:O,get OriginGroup(){return D},SecurityPanelSidebarTreeElement:V,SecurityMainView:F,SecurityOriginView:B,SecurityDetailsTable:U});export{L as SecurityModel,q as SecurityPanel};
@@ -0,0 +1 @@
1
+ import*as RootModule from'../root/root.js';RootModule.Runtime.cachedResources.set("security/lockIcon.css","/* Copyright (c) 2015 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.lock-icon,\n.security-property {\n height: 16px;\n width: 16px;\n -webkit-mask-image: url(Images/securityIcons.svg);\n -webkit-mask-size: 80px 32px;\n background-color: #888;\n}\n\n.lock-icon-secure {\n -webkit-mask-position: 0 0;\n background-color: #0b8043;\n}\n\n.lock-icon-unknown,\n.lock-icon-neutral {\n -webkit-mask-position: -16px 0;\n background-color: #000; /* Black for clarity on lower DPI screens */\n}\n\n@media (-webkit-min-device-pixel-ratio: 1.1) {\n .lock-icon-unknown,\n .lock-icon-neutral {\n background-color: #5a5a5a; /* Gray for hiDPI screens */\n }\n}\n\n.lock-icon-insecure {\n -webkit-mask-position: -32px 0;\n background-color: #5a5a5a;\n}\n\n.lock-icon-insecure-broken {\n -webkit-mask-position: -32px 0;\n background-color: #c63626;\n}\n\n.security-property-secure {\n -webkit-mask-position: 0 -16px;\n background-color: #0b8043;\n}\n\n.security-property-neutral {\n -webkit-mask-position: -16px -16px;\n background-color: #c63626;\n}\n\n.security-property-insecure {\n -webkit-mask-position: -32px -16px;\n background-color: #c63626;\n}\n\n.security-property-insecure-broken {\n -webkit-mask-position: -32px -16px;\n background-color: #c63626;\n}\n\n.security-property-info {\n -webkit-mask-position: -48px -16px;\n background-color: rgb(0 0 0 / 50%);\n}\n\n.security-property-unknown {\n -webkit-mask-position: -64px -16px;\n background-color: rgb(0 0 0 / 50%);\n}\n\n.url-scheme-secure {\n color: #0b8043;\n}\n\n.url-scheme-neutral,\n.url-scheme-insecure,\n.url-scheme-insecure-broken {\n color: #cb3626;\n}\n\n.url-scheme-separator {\n color: #8a8a8a;\n}\n\n@media (forced-colors: active) {\n .lock-icon,\n .security-property,\n .url-scheme-neutral,\n .url-scheme-insecure,\n .url-scheme-insecure-broken {\n forced-color-adjust: none;\n }\n\n .lock-icon-unknown,\n .lock-icon-neutral {\n background-color: Highlight;\n }\n\n .security-property-info,\n .security-property-unknown {\n background-color: canvastext;\n }\n\n .tree-outline:not(.hide-selection-when-blurred) li.selected .security-property-info,\n .tree-outline:not(.hide-selection-when-blurred) li.selected .security-property-unknown {\n background-color: HighlightText;\n }\n}\n\n/*# sourceURL=security/lockIcon.css */");RootModule.Runtime.cachedResources.set("security/mainView.css","/* Copyright (c) 2015 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.devtools-link {\n display: inline-block;\n}\n\n.security-main-view {\n user-select: text;\n overflow-x: hidden;\n overflow-y: auto;\n background-color: var(--toolbar-bg-color);\n}\n\n.security-main-view > div {\n flex-shrink: 0;\n}\n\n.security-summary-section-title {\n font-size: 15px;\n margin: 12px 16px;\n}\n\n.lock-spectrum {\n margin: 8px 16px;\n display: flex;\n align-items: flex-start;\n}\n\n.security-summary .lock-icon {\n flex: none;\n width: 16px;\n height: 16px;\n margin: 0 0;\n}\n\n/* Separate the middle icon from the other two. */\n\n.security-summary .lock-icon-neutral {\n margin: 0 16px;\n}\n\n.security-summary:not(.security-summary-secure) .lock-icon-secure,\n.security-summary:not(.security-summary-neutral) .lock-icon-neutral,\n.security-summary:not(.security-summary-insecure) .lock-icon-insecure,\n.security-summary:not(.security-summary-insecure-broken) .lock-icon-insecure-broken {\n background-color: rgb(90 90 90 / 25%);\n}\n\n@media (forced-colors: active) {\n .security-summary-neutral .lock-icon-neutral {\n background-color: Highlight;\n }\n\n .security-summary:not(.security-summary-secure) .lock-icon-secure,\n .security-summary:not(.security-summary-neutral) .lock-icon-neutral,\n .security-summary:not(.security-summary-insecure) .lock-icon-insecure,\n .security-summary:not(.security-summary-insecure-broken) .lock-icon-insecure-broken {\n background-color: canvastext;\n }\n}\n\n.triangle-pointer-container {\n margin: 8px 24px 0;\n padding: 0 0;\n}\n\n.triangle-pointer-wrapper {\n /* Defaults for dynamic properties. */\n transform: translateX(0);\n transition: transform 0.3s;\n}\n\n.triangle-pointer {\n width: 12px;\n height: 12px;\n margin-bottom: -6px;\n margin-left: -6px;\n transform: rotate(-45deg);\n border-style: solid;\n border-width: 1px 1px 0 0;\n background: var(--color-background);\n border-color: rgb(217 217 217);\n}\n\n.security-summary-secure .triangle-pointer-wrapper {\n transform: translateX(0);\n}\n\n.security-summary-neutral .triangle-pointer-wrapper {\n transform: translateX(32px);\n}\n\n.security-summary-insecure .triangle-pointer-wrapper {\n transform: translateX(64px);\n}\n\n.security-summary-insecure-broken .triangle-pointer-wrapper {\n transform: translateX(64px);\n}\n\n.security-summary-text {\n padding: 16px 24px;\n border-style: solid;\n border-width: 1px 0;\n font-size: 15px;\n background: var(--color-background);\n border-color: rgb(217 217 217);\n}\n\n.security-summary-secure .triangle-pointer,\n.security-summary-secure .security-summary-text,\n.security-explanation-title-secure {\n color: #0b8043;\n}\n\n.security-summary-insecure-broken .triangle-pointer,\n.security-summary-insecure-broken .security-summary-text,\n.security-explanation-title-neutral,\n.security-explanation-title-insecure,\n.security-explanation-title-insecure-broken {\n color: #cb3626;\n}\n\n.security-explanation-list {\n padding-bottom: 16px;\n}\n\n.security-explanation-list:empty {\n border-bottom: none;\n padding: 0;\n}\n\n.security-explanations-main {\n margin-top: -5px;\n background-color: var(--color-background);\n border-bottom: 1px solid rgb(230 230 230);\n}\n\n.security-explanations-extra {\n background-color: transparent;\n}\n\n.security-explanation {\n padding: 11px;\n display: flex;\n white-space: nowrap;\n border: none;\n color: rgb(90 90 90);\n}\n\n.security-explanation-text {\n flex: auto;\n white-space: normal;\n max-width: 400px;\n}\n\n.security-explanation .security-property {\n flex: none;\n width: 16px;\n height: 16px;\n margin-right: 16px;\n}\n\n.security-explanation-title {\n color: rgb(48 57 66);\n margin-top: 1px;\n margin-bottom: 8px;\n}\n\n.security-mixed-content {\n margin-top: 8px;\n}\n\n.security-explanation-recommendations {\n padding-inline-start: 16px;\n}\n\n.security-explanation-recommendations > li {\n margin-bottom: 4px;\n}\n\n/*# sourceURL=security/mainView.css */");RootModule.Runtime.cachedResources.set("security/originView.css","/* Copyright (c) 2015 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.title-section {\n padding: 16px 0 24px 0;\n border-bottom: 1px solid rgb(230 230 230);\n}\n\n.title-section-header {\n padding-left: 16px;\n padding-bottom: 10px;\n font-size: 14px;\n}\n\n.security-origin-view {\n overflow-x: hidden;\n overflow-y: scroll;\n display: block;\n user-select: text;\n}\n\n.security-origin-view .origin-view-section {\n border-bottom: 1px solid rgb(230 230 230);\n padding: 12px 6px 12px 24px;\n font-size: 12px;\n}\n\n.origin-view-notes {\n margin-top: 2px;\n color: #8c8c8c;\n}\n\n.origin-view-section-notes {\n margin-top: 6px;\n color: #8c8c8c;\n}\n\n.security-origin-view .origin-display {\n font-size: 12px;\n padding-left: 32px;\n display: flex;\n align-items: center;\n}\n\n.title-section > .view-network-button {\n padding: 6px 0 0 16px;\n}\n\n.security-origin-view .origin-display .security-property {\n display: inline-block;\n vertical-align: middle;\n position: absolute;\n left: 13px;\n}\n\n.security-origin-view .origin-view-section-title {\n margin-top: 4px;\n margin-bottom: 4px;\n font-weight: bold;\n}\n\n.security-origin-view .details-table-row {\n display: flex;\n white-space: nowrap;\n overflow: hidden;\n line-height: 22px;\n}\n\n.security-origin-view .details-table-row > div {\n align-items: flex-start;\n}\n\n.security-origin-view .details-table-row > div:first-child {\n color: rgb(140 140 140);\n width: 110px;\n margin-right: 1em;\n flex: none;\n display: flex;\n justify-content: flex-end;\n}\n\n.security-origin-view .details-table-row > div:nth-child(2) {\n flex: auto;\n white-space: normal;\n}\n\n.security-origin-view .sct-details .details-table .details-table-row:last-child div:last-child {\n border-bottom: 1px solid rgb(230 230 230);\n padding-bottom: 10px;\n}\n\n.security-origin-view .sct-details .details-table:last-child .details-table-row:last-child div:last-child {\n border-bottom: none;\n padding-bottom: 0;\n}\n\n.security-origin-view .details-toggle {\n margin-left: 126px;\n}\n\n.security-origin-view .sct-toggle {\n margin-left: 145px;\n padding-top: 5px;\n}\n\n.security-origin-view .details-table .empty-san {\n color: rgb(140 140 140);\n}\n\n.security-origin-view .details-table .san-entry {\n display: block;\n}\n\n.security-origin-view .truncated-san .truncated-entry {\n display: none;\n}\n\n.origin-button {\n margin-top: 4px;\n margin-left: 0;\n}\n\n.origin-view-section:last-child {\n border-bottom: none;\n}\n\n.devtools-link {\n display: inline-flex;\n}\n\n/*# sourceURL=security/originView.css */");RootModule.Runtime.cachedResources.set("security/sidebar.css","/* Copyright (c) 2015 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.tree-outline {\n padding: 0;\n}\n\n.tree-outline li {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 2px 5px;\n overflow: hidden;\n margin: 2px 0;\n border-top: 1px solid transparent;\n white-space: nowrap;\n}\n\n.tree-outline .lock-icon,\n.tree-outline .security-property {\n margin-right: 4px;\n flex: none;\n}\n\n.tree-outline li.selected:focus .lock-icon,\n.tree-outline .security-sidebar-tree-item.selected:focus .icon {\n background-color: var(--selection-fg-color);\n}\n\n@media (forced-colors: active) {\n .tree-outline .lock-icon,\n .tree-outline .security-property {\n forced-color-adjust: none;\n }\n\n .tree-outline li.selected:focus .lock-icon,\n .tree-outline .security-sidebar-tree-item.selected:focus .icon {\n background-color: HighlightText;\n }\n}\n\n.tree-outline .security-main-view-sidebar-tree-item {\n border-bottom: 1px solid rgb(230 230 230);\n padding: 16px 0;\n}\n\n.tree-outline li.security-sidebar-origins {\n padding: 1px 8px 1px 13px;\n margin-top: 1em;\n margin-bottom: 0.5em;\n color: rgb(90 90 90);\n border-top: none;\n line-height: 16px;\n text-shadow: rgb(255 255 255 / 75%) 0 1px 0;\n}\n\n.tree-outline ol {\n padding-left: 0;\n}\n\n.tree-outline li::before {\n content: none;\n}\n\n.tree-outline .security-main-view-sidebar-tree-item,\n.tree-outline .security-sidebar-origins,\n.tree-outline li.security-sidebar-origins + .children > li {\n padding-left: 16px;\n}\n\n.security-sidebar-tree-item {\n padding: 2px 0;\n}\n\n.security-sidebar-tree-item .title {\n overflow: hidden;\n margin-right: 5px;\n}\n\n.security-main-view-reload-message .tree-element-title {\n color: rgb(0 0 0 / 60%);\n padding-left: 8px;\n}\n\n/*# sourceURL=security/sidebar.css */");
@@ -0,0 +1,32 @@
1
+ // Copyright 2017 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ /**
6
+ * @fileoverview using private properties isn't a Closure violation in tests.
7
+ */
8
+ self.SecurityTestRunner = self.SecurityTestRunner || {};
9
+
10
+ SecurityTestRunner.dumpSecurityPanelSidebarOrigins = function() {
11
+ for (const key in Security.SecurityPanelSidebarTree.OriginGroup) {
12
+ const originGroup = Security.SecurityPanelSidebarTree.OriginGroup[key];
13
+ const element = Security.SecurityPanel._instance()._sidebarTree._originGroups.get(originGroup);
14
+
15
+ if (element.hidden) {
16
+ continue;
17
+ }
18
+
19
+ TestRunner.addResult('Group: ' + element.title);
20
+ const originTitles = element.childrenListElement.getElementsByTagName('span');
21
+
22
+ for (const originTitle of originTitles) {
23
+ if (originTitle.className !== 'tree-element-title') {
24
+ TestRunner.dumpDeepInnerHTML(originTitle);
25
+ }
26
+ }
27
+ }
28
+ };
29
+
30
+ SecurityTestRunner.dispatchRequestFinished = function(request) {
31
+ TestRunner.networkManager.dispatchEventToListeners(SDK.NetworkManager.Events.RequestFinished, request);
32
+ };
@@ -0,0 +1 @@
1
+ import{ServiceManager as e,serviceManager as r}from"./services.js";self.Services=self.Services||{},Services=Services||{},Services.ServiceManager=e.ServiceManager,Services.ServiceManager.Service=e.Service,Services.serviceManager=r;
@@ -0,0 +1 @@
1
+ import{InspectorFrontendHost as e}from"../host/host.js";import{Runtime as s}from"../root/root.js";class t{createRemoteService(e){if(!this._remoteConnection){const e=s.Runtime.queryParam("service-backend");if(!e)return console.error("No endpoint address specified"),Promise.resolve(null);this._remoteConnection=new o(new r(e))}return this._remoteConnection._createService(e)}createAppService(t,i){let r=t+".js";const c=s.Runtime.queryParam("remoteBase"),a=s.Runtime.queryParam("debugFrontend"),h=e.isUnderTest(),_=[];c&&_.push("remoteBase="+c),a&&_.push("debugFrontend="+a),h&&_.push("isUnderTest=true"),_.length&&(r+="?"+_.join("&"));const l=new Worker(r,{type:"module"});return new o(new n(l))._createService(i)}}class o{constructor(e){this._port=e,this._port.setHandlers(this._onMessage.bind(this),this._connectionClosed.bind(this)),this._lastId=1,this._callbacks=new Map,this._services=new Map}_createService(e){return this._sendCommand(e+".create").then((s=>{if(!s)return console.error("Could not initialize service: "+e),null;const t=new i(this,e,s.id);return this._services.set(e+":"+s.id,t),t}))}_serviceDisposed(e){this._services.delete(e._serviceName+":"+e._objectId),this._services.size||this._port.close()}_sendCommand(e,s){const t=this._lastId++,o=JSON.stringify({id:t,method:e,params:s||{}});return this._port.send(o).then((e=>e?new Promise((e=>this._callbacks.set(t,e))):Promise.resolve(null)))}_onMessage(e){let s;try{s=JSON.parse(e)}catch(e){return void console.error(e)}if(s.id){s.error&&console.error("Service error: "+s.error);const e=this._callbacks.get(s.id);return void(e&&(e(s.error?null:s.result),this._callbacks.delete(s.id)))}const t=s.method.split("."),o=t[0],i=t[1],r=this._services.get(o+":"+s.params.id);r?r._dispatchNotification(i,s.params):console.error("Unable to lookup stub for "+o+":"+s.params.id)}_connectionClosed(){for(const e of this._callbacks.values())e(null);this._callbacks.clear();for(const e of this._services.values())e._dispatchNotification("disposed");this._services.clear()}}class i{constructor(e,s,t){this._connection=e,this._serviceName=s,this._objectId=t,this._notificationHandlers=new Map}dispose(){const e={id:this._objectId};return this._connection._sendCommand(this._serviceName+".dispose",e).then((()=>{this._connection._serviceDisposed(this)}))}on(e,s){this._notificationHandlers.set(e,s)}send(e,s){return(s=s||{}).id=this._objectId,this._connection._sendCommand(this._serviceName+"."+e,s)}_dispatchNotification(e,s){const t=this._notificationHandlers.get(e);t?t(s):console.error("Could not report notification '"+e+"' on '"+this._objectId+"'")}}class r{constructor(e){this._url=e,this._socket}setHandlers(e,s){this._messageHandler=e,this._closeHandler=s}_open(){return this._connectionPromise||(this._connectionPromise=new Promise(function(e){let s;try{s=new WebSocket(this._url),s.onmessage=o.bind(this),s.onclose=i.bind(this),s.onopen=t.bind(this)}catch(s){e(!1)}function t(){this._socket=s,e(!0)}function o(e){this._messageHandler&&this._messageHandler(e.data)}function i(){this._socket||e(!1),this._socketClosed(Boolean(this._socket))}}.bind(this))),this._connectionPromise}send(e){return this._open().then((()=>!!this._socket&&(this._socket.send(e),!0)))}close(){return this._open().then((()=>(this._socket&&(this._socket.close(),this._socketClosed(!0)),!0)))}_socketClosed(e){this._socket=null,delete this._connectionPromise,e&&this._closeHandler&&this._closeHandler()}}class n{constructor(e){let s;this._worker=e,this._workerPromise=new Promise((e=>{s=e})),this._worker.onmessage=function(e){if("workerReady"===e.data)return void s(!0);this._messageHandler&&this._messageHandler(e.data)}.bind(this)}setHandlers(e,s){this._messageHandler=e,this._closeHandler=s}send(e){return this._workerPromise.then((()=>{try{return this._worker.postMessage(e),!0}catch(e){return!1}}))}close(){return this._workerPromise.then((()=>(this._worker&&this._worker.terminate(),!1)))}}var c=Object.freeze({__proto__:null,ServiceManager:t,Connection:o,Service:i,RemoteServicePort:r,WorkerServicePort:n});const a=new t;export{c as ServiceManager,a as serviceManager};
@@ -0,0 +1 @@
1
+ import{FrameworkIgnoreListSettingsTab as e,SettingsScreen as t,KeybindsSettingsTab as n}from"./settings.js";self.Settings=self.Settings||{},Settings=Settings||{},Settings.FrameworkIgnoreListSettingsTab=e.FrameworkIgnoreListSettingsTab,Settings.SettingsScreen=t.SettingsScreen,Settings.SettingsScreen.ActionDelegate=t.ActionDelegate,Settings.SettingsScreen.Revealer=t.Revealer,Settings.GenericSettingsTab=t.GenericSettingsTab,Settings.ExperimentsSettingsTab=t.ExperimentsSettingsTab,Settings.KeybindsSettingsTab=n.KeybindsSettingsTab;
@@ -0,0 +1 @@
1
+ import{i18n as e}from"../i18n/i18n.js";import{Runtime as t}from"../root/root.js";import{ViewManager as i}from"../ui/ui.js";const s={shortcuts:"Shortcuts",preferences:"Preferences",experiments:"Experiments",ignoreList:"Ignore List",showShortcuts:"Show Shortcuts",showPreferences:"Show Preferences",showExperiments:"Show Experiments",showIgnoreList:"Show Ignore List"},n=e.registerUIStrings("settings/settings-meta.ts",s),r=e.getLazilyComputedLocalizedString.bind(void 0,n);let o;async function a(){return o||(await t.Runtime.instance().loadModulePromise("settings"),o=await import("./settings.js")),o}i.registerViewExtension({location:"settings-view",id:"preferences",title:r(s.preferences),commandPrompt:r(s.showPreferences),order:0,loadView:async()=>(await a()).SettingsScreen.GenericSettingsTab.instance()}),i.registerViewExtension({location:"settings-view",id:"experiments",title:r(s.experiments),commandPrompt:r(s.showExperiments),order:3,experiment:t.ExperimentName.ALL,loadView:async()=>(await a()).SettingsScreen.ExperimentsSettingsTab.instance()}),i.registerViewExtension({location:"settings-view",id:"blackbox",title:r(s.ignoreList),commandPrompt:r(s.showIgnoreList),order:4,loadView:async()=>(await a()).FrameworkIgnoreListSettingsTab.FrameworkIgnoreListSettingsTab.instance()}),i.registerViewExtension({location:"settings-view",id:"keybinds",title:r(s.shortcuts),commandPrompt:r(s.showShortcuts),order:100,loadView:async()=>(await a()).KeybindsSettingsTab.KeybindsSettingsTab.instance()});export{s as UIStrings};
@@ -0,0 +1 @@
1
+ import{Settings as t}from"../common/common.js";import{Reload as e}from"../components/components.js";import{userMetrics as s,InspectorFrontendHost as i,UserMetrics as n}from"../host/host.js";import{i18n as r}from"../i18n/i18n.js";import{ls as o}from"../platform/platform.js";import{Runtime as a}from"../root/root.js";import{Widget as c,Utils as d,ARIAUtils as l,ViewManager as h,Toolbar as u,TabbedPane as g,Dialog as m,GlassPane as p,UIUtils as b,SettingsUI as _,InspectorView as S,Tooltip as f,ListWidget as y,ListModel as v,ListControl as E,ShortcutRegistry as C,KeyboardShortcut as T,ActionRegistry as I,Icon as k}from"../ui/ui.js";const w={settings:"Settings",shortcuts:"Shortcuts",preferences:"Preferences",restoreDefaultsAndReload:"Restore defaults and reload",experiments:"Experiments",theseExperimentsCouldBeUnstable:"These experiments could be unstable or unreliable and may require you to restart DevTools.",theseExperimentsAreParticularly:"These experiments are particularly unstable. Enable at your own risk.",warning:"WARNING:",oneOrMoreSettingsHaveChanged:"One or more settings have changed which requires a reload to take effect."},x=r.registerUIStrings("settings/SettingsScreen.ts",w),L=r.getLocalizedString.bind(void 0,x);let A,R,F;class P extends c.VBox{constructor(){super(!0),this.registerRequiredCSS("settings/settingsScreen.css",{enableLegacyPatching:!0}),this.contentElement.classList.add("settings-window-main"),this.contentElement.classList.add("vbox");const t=document.createElement("div"),e=d.createShadowRootWithCoreStyles(t,{cssFile:"settings/settingsScreen.css",enableLegacyPatching:!0,delegatesFocus:void 0}).createChild("div","settings-window-title");l.markAsHeading(e,1),e.textContent=L(w.settings),this._tabbedLocation=h.ViewManager.instance().createTabbedLocation((()=>P._revealSettingsScreen()),"settings-view");const s=this._tabbedLocation.tabbedPane();s.leftToolbar().appendToolbarItem(new u.ToolbarItem(t)),s.setShrinkableTabs(!1),s.makeVerticalTabLayout();const i=h.ViewManager.instance().view("keybinds");i&&i.widget().then((t=>{this._keybindsTab=t})),s.show(this.contentElement),s.selectTab("preferences"),s.addEventListener(g.Events.TabInvoked,this._tabInvoked,this),this._reportTabOnReveal=!1}static instance(t={forceNew:null}){const{forceNew:e}=t;return A&&!e||(A=new P),A}static _revealSettingsScreen(){const t=P.instance();if(t.isShowing())return t;t._reportTabOnReveal=!0;const e=new m.Dialog;return e.contentElement.tabIndex=-1,e.addCloseButton(),e.setOutsideClickCallback((()=>{})),e.setPointerEventsBehavior(p.PointerEventsBehavior.PierceGlassPane),e.setOutsideTabIndexBehavior(m.OutsideTabIndexBehavior.PreserveMainViewTabIndex),t.show(e.contentElement),e.setEscapeKeyCallback(t._onEscapeKeyPressed.bind(t)),e.show(),t}static async _showSettingsScreen(t={name:void 0,focusTabHeader:void 0}){const{name:e,focusTabHeader:s}=t,i=P._revealSettingsScreen();i._selectTab(e||"preferences");const n=i._tabbedLocation.tabbedPane();await n.waitForTabElementUpdate(),s?n.focusSelectedTabHeader():n.focus()}resolveLocation(t){return this._tabbedLocation}_selectTab(t){this._tabbedLocation.tabbedPane().selectTab(t,!0)}_tabInvoked(t){const e=t.data;if(!e.isUserGesture)return;const s=e.prevTabId,i=e.tabId;!this._reportTabOnReveal&&s&&s===i||(this._reportTabOnReveal=!1,this._reportSettingsPanelShown(i))}_reportSettingsPanelShown(t){t!==L(w.shortcuts)?s.settingsPanelShown(t):s.settingsPanelShown("shortcuts")}_onEscapeKeyPressed(t){"keybinds"===this._tabbedLocation.tabbedPane().selectedTabId&&this._keybindsTab&&this._keybindsTab.onEscapeKeyPressed(t)}}class N extends c.VBox{constructor(t,e){super(),this.element.classList.add("settings-tab-container"),e&&(this.element.id=e);const s=this.element.createChild("header");b.createTextChild(s.createChild("h1"),t),this.containerElement=this.element.createChild("div","settings-container-wrapper").createChild("div","settings-tab settings-content settings-container")}_appendSection(t){const e=this.containerElement.createChild("div","settings-block");if(t){l.markAsGroup(e);const s=e.createChild("div","settings-section-title");s.textContent=t,l.markAsHeading(s,2),l.setAccessibleName(e,t)}return e}}class B extends N{constructor(){super(L(w.preferences),"preferences-tab-content");const s=["","Appearance","Sources","Elements","Network","Performance","Console","Extensions","Persistence","Debugger","Global"];this._nameToSection=new Map;for(const t of s)this._createSectionElement(t);const i=[...a.Runtime.instance().extensions("setting").map((t=>{const e=t.descriptor().category;return{category:e?o(e):void 0,settingName:t.descriptor().settingName,title:t.title(),order:t.descriptor().order,settingType:t.descriptor().settingType||"",defaultValue:t.descriptor().defaultValue}})),...t.getRegisteredSettings().map((t=>{const e=t.titleMac&&t.titleMac(),s=t.title&&t.title(),{category:i,settingName:n,order:r,settingType:o,defaultValue:a}=t;return{category:i||void 0,settingName:n,title:e||s,order:r||void 0,settingType:o,defaultValue:a}}))];i.sort(((t,e)=>t.order&&e.order?t.order-e.order:0)),i.forEach(this._addSetting.bind(this)),a.Runtime.instance().extensions(_.SettingUI).forEach(this._addSettingUI.bind(this)),this._appendSection().appendChild(b.createTextButton(L(w.restoreDefaultsAndReload),(function(){t.Settings.instance().clearAll(),e.reload()})))}static instance(t={forceNew:null}){const{forceNew:e}=t;return R&&!e||(R=new B),R}static isSettingVisible(t){return Boolean(t.title&&t.category)}_addSetting(e){if(!B.isSettingVisible(e))return;const s=e.category;if(!s)return;const i=this._sectionElement(s);if(!i)return;const n=t.Settings.instance().moduleSetting(e.settingName),r=_.createControlForSetting(n);r&&i.appendChild(r)}_addSettingUI(t){const e=t.descriptor().category||"";t.instance().then(function(t){const s=t.settingElement();if(s){let t=this._sectionElement(e);t||(t=this._createSectionElement(e)),t.appendChild(s)}}.bind(this))}_createSectionElement(t){const e=t&&L(t),s=this._appendSection(e);return this._nameToSection.set(t,s),s}_sectionElement(t){return this._nameToSection.get(t)||null}}class K extends N{constructor(){super(L(w.experiments),"experiments-tab-content");const t=a.experiments.allConfigurableExperiments().sort(),e=t.filter((t=>t.unstable)),s=t.filter((t=>!t.unstable));if(s.length){const t=this._appendSection(),e=L(w.theseExperimentsCouldBeUnstable);t.appendChild(this._createExperimentsWarningSubsection(e));for(const e of s)t.appendChild(this._createExperimentCheckbox(e))}if(e.length){const t=this._appendSection(),s=L(w.theseExperimentsAreParticularly);t.appendChild(this._createExperimentsWarningSubsection(s));for(const s of e)"blackboxJSFramesOnTimeline"!==s.name&&t.appendChild(this._createExperimentCheckbox(s))}}static instance(t={forceNew:null}){const{forceNew:e}=t;return F&&!e||(F=new K),F}_createExperimentsWarningSubsection(t){const e=document.createElement("div");e.createChild("span","settings-experiments-warning-subsection-warning").textContent=L(w.warning),b.createTextChild(e," ");return e.createChild("span","settings-experiments-warning-subsection-message").textContent=t,e}_createExperimentCheckbox(t){const e=b.CheckboxLabel.create(L(t.title),t.isEnabled()),i=e.checkboxElement;i.name=t.name,i.addEventListener("click",(function(){t.setEnabled(i.checked),"ignoreListJSFramesOnTimeline"===t.name&&a.experiments.setEnabled("blackboxJSFramesOnTimeline",i.checked),s.experimentChanged(t.name,t.isEnabled()),S.InspectorView.instance().displayReloadRequiredWarning(L(w.oneOrMoreSettingsHaveChanged))}),!1);const n=document.createElement("p");return n.className=t.unstable&&!t.isEnabled()?"settings-experiment-unstable":"",n.appendChild(e),n}}var M=Object.freeze({__proto__:null,UIStrings:w,SettingsScreen:P,GenericSettingsTab:B,ExperimentsSettingsTab:K,ActionDelegate:class{handleAction(t,e){switch(e){case"settings.show":return P._showSettingsScreen({focusTabHeader:!0}),!0;case"settings.documentation":return i.InspectorFrontendHostInstance.openInNewTab(b.addReferrerToURL("https://developers.google.com/web/tools/chrome-devtools/")),!0;case"settings.shortcuts":return P._showSettingsScreen({name:"keybinds",focusTabHeader:!0}),!0}return!1}},Revealer:class{reveal(e){console.assert(e instanceof t.Setting);const s=e;let n=!1;[...a.Runtime.instance().extensions("setting").map((t=>{const e=t.descriptor().category;return{category:e?o(e):void 0,settingName:t.descriptor().settingName,title:t.title(),order:t.descriptor().order,settingType:t.descriptor().settingType||"",defaultValue:t.descriptor().defaultValue}})),...t.getRegisteredSettings().map((t=>{const e=t.titleMac&&t.titleMac(),s=t.title&&t.title(),{category:i,settingName:n,order:r,settingType:o,defaultValue:a}=t;return{category:i||void 0,settingName:n,title:e||s,order:r||void 0,settingType:o,defaultValue:a}}))].forEach((function(t){if(!B.isSettingVisible(t))return;t.settingName===s.name&&(i.InspectorFrontendHostInstance.bringToFront(),P._showSettingsScreen(),n=!0)})),a.Runtime.instance().extensions(_.SettingUI).forEach((function(t){const e=t.descriptor().settings;e&&-1!==e.indexOf(s.name)&&(i.InspectorFrontendHostInstance.bringToFront(),P._showSettingsScreen(),n=!0)}));for(const t of h.getRegisteredViewExtensions()){const e=t.viewId();if("settings-view"!==t.location())continue;const r=t.settings();r&&-1!==r.indexOf(s.name)&&(i.InspectorFrontendHostInstance.bringToFront(),P._showSettingsScreen({name:e}),n=!0)}return n?Promise.resolve():Promise.reject()}}});const D={frameworkIgnoreList:"Framework Ignore List",debuggerWillSkipThroughThe:"Debugger will skip through the scripts and will not stop on exceptions thrown by them.",ignoreListContentScripts:"Add content scripts to ignore list",ignoreListContentScriptsExtension:"Add content scripts to ignore list (extension scripts in the page)",ignoreList:"Ignore List",disabled:"Disabled",noIgnoreListPatterns:"No ignore list patterns",addPattern:"Add pattern...",addFilenamePattern:"Add filename pattern",ignoreScriptsWhoseNamesMatchS:"Ignore scripts whose names match '{PH1}'",pattern:"Pattern",behavior:"Behavior",patternCannotBeEmpty:"Pattern cannot be empty",patternAlreadyExists:"Pattern already exists",patternMustBeAValidRegular:"Pattern must be a valid regular expression"},U=r.registerUIStrings("settings/FrameworkIgnoreListSettingsTab.ts",D),O=r.getLocalizedString.bind(void 0,U);let V;class H extends c.VBox{constructor(){super(!0),this.registerRequiredCSS("settings/frameworkIgnoreListSettingsTab.css",{enableLegacyPatching:!0});const e=this.contentElement.createChild("div","header");e.textContent=O(D.frameworkIgnoreList),l.markAsHeading(e,1),this.contentElement.createChild("div","intro").textContent=O(D.debuggerWillSkipThroughThe);const s=this.contentElement.createChild("div","ignore-list-content-scripts");s.appendChild(_.createSettingCheckbox(O(D.ignoreListContentScripts),t.Settings.instance().moduleSetting("skipContentScripts"),!0)),f.Tooltip.install(s,O(D.ignoreListContentScriptsExtension)),this._ignoreListLabel=O(D.ignoreList),this._disabledLabel=O(D.disabled),this._list=new y.ListWidget(this),this._list.element.classList.add("ignore-list"),this._list.registerRequiredCSS("settings/frameworkIgnoreListSettingsTab.css",{enableLegacyPatching:!0});const i=document.createElement("div");i.classList.add("ignore-list-empty"),i.textContent=O(D.noIgnoreListPatterns),this._list.setEmptyPlaceholder(i),this._list.show(this.contentElement);const n=b.createTextButton(O(D.addPattern),this._addButtonClicked.bind(this),"add-button");l.setAccessibleName(n,O(D.addFilenamePattern)),this.contentElement.appendChild(n),this._setting=t.Settings.instance().moduleSetting("skipStackFramesPattern"),this._setting.addChangeListener(this._settingUpdated,this),this.setDefaultFocusedElement(n)}static instance(t={forceNew:null}){const{forceNew:e}=t;return V&&!e||(V=new H),V}wasShown(){super.wasShown(),this._settingUpdated()}_settingUpdated(){this._list.clear();const t=this._setting.getAsArray();for(let e=0;e<t.length;++e)this._list.appendItem(t[e],!0)}_addButtonClicked(){this._list.addNewItem(this._setting.getAsArray().length,{pattern:"",disabled:!1})}renderItem(t,e){const s=document.createElement("div");s.classList.add("ignore-list-item");const i=s.createChild("div","ignore-list-pattern");return i.textContent=t.pattern,f.Tooltip.install(i,O(D.ignoreScriptsWhoseNamesMatchS,{PH1:t.pattern})),s.createChild("div","ignore-list-separator"),s.createChild("div","ignore-list-behavior").textContent=t.disabled?this._disabledLabel:this._ignoreListLabel,t.disabled&&s.classList.add("ignore-list-disabled"),s}removeItemRequested(t,e){const s=this._setting.getAsArray();s.splice(e,1),this._setting.setAsArray(s)}commitEdit(t,e,s){t.pattern=e.control("pattern").value.trim(),t.disabled=e.control("behavior").value===this._disabledLabel;const i=this._setting.getAsArray();s&&i.push(t),this._setting.setAsArray(i)}beginEdit(t){const e=this._createEditor();return e.control("pattern").value=t.pattern,e.control("behavior").value=t.disabled?this._disabledLabel:this._ignoreListLabel,e}_createEditor(){if(this._editor)return this._editor;const t=new y.Editor;this._editor=t;const e=t.contentElement(),s=e.createChild("div","ignore-list-edit-row");s.createChild("div","ignore-list-pattern").textContent=O(D.pattern),s.createChild("div","ignore-list-separator ignore-list-separator-invisible"),s.createChild("div","ignore-list-behavior").textContent=O(D.behavior);const i=e.createChild("div","ignore-list-edit-row"),n=t.createInput("pattern","text","/framework\\.js$",function(t,e,s){const i=s.value.trim(),n=this._setting.getAsArray();if(!i.length)return{valid:!1,errorMessage:O(D.patternCannotBeEmpty)};for(let t=0;t<n.length;++t)if(t!==e&&n[t].pattern===i)return{valid:!1,errorMessage:O(D.patternAlreadyExists)};let r;try{r=new RegExp(i)}catch(t){}if(!r)return{valid:!1,errorMessage:O(D.patternMustBeAValidRegular)};return{valid:!0,errorMessage:void 0}}.bind(this));l.setAccessibleName(n,O(D.pattern)),i.createChild("div","ignore-list-pattern").appendChild(n),i.createChild("div","ignore-list-separator ignore-list-separator-invisible");const r=t.createSelect("behavior",[this._ignoreListLabel,this._disabledLabel],(function(t,e,s){return{valid:!0,errorMessage:void 0}}));return l.setAccessibleName(r,O(D.behavior)),i.createChild("div","ignore-list-behavior").appendChild(r),t}}var j=Object.freeze({__proto__:null,UIStrings:D,FrameworkIgnoreListSettingsTab:H});const W={shortcuts:"Shortcuts",matchShortcutsFromPreset:"Match shortcuts from preset",keyboardShortcutsList:"Keyboard shortcuts list",shortcutModified:"Shortcut modified",noShortcutForAction:"No shortcut for action",addAShortcut:"Add a shortcut",confirmChanges:"Confirm changes",discardChanges:"Discard changes",removeShortcut:"Remove shortcut",editShortcut:"Edit shortcut",shortcutsCannotContainOnly:"Shortcuts cannot contain only modifier keys.",thisShortcutIsInUseByS:"This shortcut is in use by {PH1}: {PH2}.",RestoreDefaultShortcuts:"Restore default shortcuts",FullListOfDevtoolsKeyboard:"Full list of DevTools keyboard shortcuts and gestures",ResetShortcutsForAction:"Reset shortcuts for action"},q=r.registerUIStrings("settings/KeybindsSettingsTab.ts",W),z=r.getLocalizedString.bind(void 0,q);let G;class J extends c.VBox{constructor(){super(!0),this.registerRequiredCSS("settings/keybindsSettingsTab.css",{enableLegacyPatching:!0});this.contentElement.createChild("header").createChild("h1").textContent=z(W.shortcuts);const e=t.Settings.instance().moduleSetting("activeKeybindSet"),s=t.Settings.instance().moduleSetting("userShortcuts");s.addChangeListener(this.update,this),e.addChangeListener(this.update,this);const i=_.createControlForSetting(e,z(W.matchShortcutsFromPreset));i&&(i.classList.add("keybinds-set-select"),this.contentElement.appendChild(i)),this._items=new v.ListModel,this._list=new E.ListControl(this._items,this,E.ListMode.NonViewport),this._items.replaceAll(this._createListItems()),l.markAsList(this._list.element),this.registerRequiredCSS("settings/keybindsSettingsTab.css",{enableLegacyPatching:!0}),this.contentElement.appendChild(this._list.element),l.setAccessibleName(this._list.element,z(W.keyboardShortcutsList));const n=this.contentElement.createChild("div");n.classList.add("keybinds-footer");const r=b.createDocumentationLink("iterate/inspect-styles/shortcuts",z(W.FullListOfDevtoolsKeyboard));r.classList.add("docs-link"),n.appendChild(r),n.appendChild(b.createTextButton(z(W.RestoreDefaultShortcuts),(()=>{s.set([]),e.set(C.DefaultShortcutSetting)}))),this._editingItem=null,this._editingRow=null,this.update()}static instance(t={forceNew:null}){const{forceNew:e}=t;return G&&!e||(G=new J),G}createElementForItem(t){let e=document.createElement("div");if("string"==typeof t)l.setLevel(e,1),e.classList.add("keybinds-category-header"),e.textContent=t;else{const s=new $(t,this,t===this._editingItem);e=s.element,l.setLevel(e,2),t===this._editingItem&&(this._editingRow=s)}return e.classList.add("keybinds-list-item"),l.markAsListitem(e),e.tabIndex=t===this._list.selectedItem()&&t!==this._editingItem?0:-1,e}commitChanges(t,e){for(const[t,i]of e)t.type!==T.Type.UnsetShortcut&&(C.ShortcutRegistry.instance().removeShortcut(t),i||s.actionTaken(n.Action.ShortcutRemoved)),i&&(C.ShortcutRegistry.instance().registerUserShortcut(t.changeKeys(i).changeType(T.Type.UserShortcut)),t.type===T.Type.UnsetShortcut?s.actionTaken(n.Action.UserShortcutAdded):s.actionTaken(n.Action.ShortcutModified));this.stopEditing(t)}heightForItem(t){return 0}isItemSelectable(t){return!0}selectedItemChanged(t,e,s,i){s&&(s.tabIndex=-1),i&&(e===this._editingItem&&this._editingRow?this._editingRow.focus():(i.tabIndex=0,this._list.element.hasFocus()&&i.focus()),this.setDefaultFocusedElement(i))}updateSelectedItemARIA(t,e){return!0}startEditing(t){this._editingItem&&this.stopEditing(this._editingItem),b.markBeingEdited(this._list.element,!0),this._editingItem=t,this._list.refreshItem(t)}stopEditing(t){b.markBeingEdited(this._list.element,!1),this._editingItem=null,this._editingRow=null,this._list.refreshItem(t),this.focus()}_createListItems(){const t=I.ActionRegistry.instance().actions().sort(((t,e)=>t.category()<e.category()?-1:t.category()>e.category()?1:t.id()<e.id()?-1:t.id()>e.id()?1:0)),e=[];let s;return t.forEach((t=>{s!==t.category()&&e.push(t.category()),e.push(t),s=t.category()})),e}onEscapeKeyPressed(t){const e=document.deepActiveElement();this._editingRow&&e&&"INPUT"===e.nodeName&&this._editingRow.onEscapeKeyPressed(t)}update(){this._editingItem&&this.stopEditing(this._editingItem),this._list.refreshAllItems(),this._list.selectedItem()||this._list.selectItem(this._items.at(0))}willHide(){this._editingItem&&this.stopEditing(this._editingItem)}}class ${constructor(t,e,s){this._isEditing=Boolean(s),this._settingsTab=e,this._item=t,this.element=document.createElement("div"),this._editedShortcuts=new Map,this._shortcutInputs=new Map,this._shortcuts=C.ShortcutRegistry.instance().shortcutsForAction(t.id()),this._elementToFocus=null,this._confirmButton=null,this._addShortcutLinkContainer=null,this._errorMessageElement=null,this._secondKeyTimeout=null,this._update()}focus(){this._elementToFocus&&this._elementToFocus.focus()}_update(){this.element.removeChildren(),this._elementToFocus=null,this._shortcutInputs.clear(),this.element.classList.toggle("keybinds-editing",this._isEditing),this.element.createChild("div","keybinds-action-name keybinds-list-text").textContent=this._item.title(),this._shortcuts.forEach(this._createShortcutRow,this),0===this._shortcuts.length&&this._createEmptyInfo(),this._isEditing&&this._setupEditor()}_createEmptyInfo(){if(C.ShortcutRegistry.instance().actionHasDefaultShortcut(this._item.id())){const t=k.Icon.create("largeicon-shortcut-changed","keybinds-modified");l.setAccessibleName(t,z(W.shortcutModified)),this.element.appendChild(t)}if(!this._isEditing){const t=this.element.createChild("div","keybinds-shortcut keybinds-list-text");l.setAccessibleName(t,z(W.noShortcutForAction)),a.experiments.isEnabled("keyboardShortcutEditor")&&this.element.appendChild(this._createEditButton())}}_setupEditor(){this._addShortcutLinkContainer=this.element.createChild("div","keybinds-shortcut devtools-link");const t=this._addShortcutLinkContainer.createChild("span","devtools-link");t.textContent=z(W.addAShortcut),t.tabIndex=0,l.markAsLink(t),self.onInvokeElement(t,this._addShortcut.bind(this)),this._elementToFocus||(this._elementToFocus=t),this._errorMessageElement=this.element.createChild("div","keybinds-info keybinds-error hidden"),l.markAsAlert(this._errorMessageElement),this.element.appendChild(this._createIconButton(z(W.ResetShortcutsForAction),"largeicon-undo","",this._resetShortcutsToDefaults.bind(this))),this._confirmButton=this._createIconButton(z(W.confirmChanges),"largeicon-checkmark","keybinds-confirm-button",(()=>this._settingsTab.commitChanges(this._item,this._editedShortcuts))),this.element.appendChild(this._confirmButton),this.element.appendChild(this._createIconButton(z(W.discardChanges),"largeicon-delete","keybinds-cancel-button",(()=>this._settingsTab.stopEditing(this._item)))),this.element.addEventListener("keydown",(t=>{isEscKey(t)&&(this._settingsTab.stopEditing(this._item),t.consume(!0))}))}_addShortcut(){const t=new T.KeyboardShortcut([],this._item.id(),T.Type.UnsetShortcut);this._shortcuts.push(t),this._update();const e=this._shortcutInputs.get(t);e&&e.focus()}_createShortcutRow(t,e){if(this._editedShortcuts.has(t)&&!this._editedShortcuts.get(t))return;let s;t.type===T.Type.UnsetShortcut||t.isDefault()||(s=k.Icon.create("largeicon-shortcut-changed","keybinds-modified"),l.setAccessibleName(s,z(W.shortcutModified)),this.element.appendChild(s));const i=this.element.createChild("div","keybinds-shortcut keybinds-list-text");if(this._isEditing){const e=i.createChild("input","harmony-input");e.spellcheck=!1,this._shortcutInputs.set(t,e),this._elementToFocus||(this._elementToFocus=e),e.value=t.title();const s=this._editedShortcuts.get(t);s&&(e.value=this._shortcutInputTextForDescriptors(s)),e.addEventListener("keydown",this._onShortcutInputKeyDown.bind(this,t,e)),e.addEventListener("blur",(()=>{null!==this._secondKeyTimeout&&(clearTimeout(this._secondKeyTimeout),this._secondKeyTimeout=null)})),i.appendChild(this._createIconButton(z(W.removeShortcut),"largeicon-trash-bin","keybinds-delete-button",(()=>{const e=this._shortcuts.indexOf(t);t.isDefault()||this._shortcuts.splice(e,1),this._editedShortcuts.set(t,null),this._update(),this.focus(),this._validateInputs()})))}else{t.descriptors.flatMap((t=>t.name.split(" + "))).forEach((t=>{i.createChild("span","keybinds-key").textContent=t})),a.experiments.isEnabled("keyboardShortcutEditor")&&0===e&&this.element.appendChild(this._createEditButton())}}_createEditButton(){return this._createIconButton(z(W.editShortcut),"largeicon-edit","keybinds-edit-button",(()=>this._settingsTab.startEditing(this._item)))}_createIconButton(t,e,s,i){const n=document.createElement("button");return n.appendChild(k.Icon.create(e)),n.addEventListener("click",i),l.setAccessibleName(n,t),s&&n.classList.add(s),n}_onShortcutInputKeyDown(t,e,s){if("Tab"!==s.key){const i=this._descriptorForEvent(s),n=this._editedShortcuts.get(t)||[];this._editedShortcuts.set(t,n);const r=2===n.length&&T.KeyboardShortcut.isModifier(n[1].key);2===n.length&&!r&&n.splice(0,2),this._secondKeyTimeout?(clearTimeout(this._secondKeyTimeout),this._secondKeyTimeout=null,n.push(i)):r?n[1]=i:T.KeyboardShortcut.isModifier(i.key)?n[0]=i:(n[0]=i,this._secondKeyTimeout=window.setTimeout((()=>{this._secondKeyTimeout=null}),C.KeyTimeout)),e.value=this._shortcutInputTextForDescriptors(n),this._validateInputs(),s.consume(!0)}}_descriptorForEvent(t){const e=T.KeyboardShortcut.makeKeyFromEvent(t),s=T.KeyboardShortcut.keyCodeAndModifiersFromKey(e),i=T.Keys[t.key]||T.KeyBindings[t.key];return T.KeyboardShortcut.makeDescriptor(i||t.key,s.modifiers)}_shortcutInputTextForDescriptors(t){return t.map((t=>t.name)).join(" ")}_resetShortcutsToDefaults(){this._editedShortcuts.clear();for(const t of this._shortcuts)if(t.type===T.Type.UnsetShortcut){const e=this._shortcuts.indexOf(t);this._shortcuts.splice(e,1)}else t.type===T.Type.UserShortcut&&this._editedShortcuts.set(t,null);C.ShortcutRegistry.instance().disabledDefaultsForAction(this._item.id()).forEach((t=>{this._shortcuts.push(t),this._editedShortcuts.set(t,t.descriptors)})),this._update(),this.focus()}onEscapeKeyPressed(t){const e=document.deepActiveElement();for(const[s,i]of this._shortcutInputs.entries())e===i&&this._onShortcutInputKeyDown(s,i,t)}_validateInputs(){const t=this._confirmButton,e=this._errorMessageElement;t&&e&&(t.disabled=!1,e.classList.add("hidden"),this._shortcutInputs.forEach(((s,i)=>{const n=this._editedShortcuts.get(i);if(!n)return;if(n.some((t=>T.KeyboardShortcut.isModifier(t.key))))return t.disabled=!0,s.classList.add("error-input"),l.setInvalid(s,!0),e.classList.remove("hidden"),void(e.textContent=z(W.shortcutsCannotContainOnly));const r=C.ShortcutRegistry.instance().actionsForDescriptors(n).filter((t=>t!==this._item.id()));if(r.length){t.disabled=!0,s.classList.add("error-input"),l.setInvalid(s,!0),e.classList.remove("hidden");const i=I.ActionRegistry.instance().action(r[0]);if(!i)return;const n=i.title(),o=i.category();e.textContent=z(W.thisShortcutIsInUseByS,{PH1:o,PH2:n})}else s.classList.remove("error-input"),l.setInvalid(s,!1)})))}}var Q=Object.freeze({__proto__:null,UIStrings:W,KeybindsSettingsTab:J,ShortcutListItem:$});export{j as FrameworkIgnoreListSettingsTab,Q as KeybindsSettingsTab,M as SettingsScreen};