@browserless.io/browserless 2.2.0-beta-8 → 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.
- package/CHANGELOG.md +21 -2
- package/bin/browserless.js +1 -1
- package/bin/scaffold/README.md +8 -7
- package/build/browserless.js +7 -6
- package/build/browsers/chrome.cdp.d.ts +6 -0
- package/build/browsers/chrome.cdp.js +6 -0
- package/build/browsers/chrome.playwright.d.ts +6 -0
- package/build/browsers/chrome.playwright.js +6 -0
- package/build/browsers/{cdp-chromium.d.ts → chromium.cdp.d.ts} +3 -2
- package/build/browsers/{cdp-chromium.js → chromium.cdp.js} +16 -10
- package/build/browsers/{playwright-chromium.d.ts → chromium.playwright.d.ts} +3 -2
- package/build/browsers/{playwright-chromium.js → chromium.playwright.js} +6 -5
- package/build/browsers/{playwright-firefox.d.ts → firefox.playwright.d.ts} +2 -2
- package/build/browsers/{playwright-firefox.js → firefox.playwright.js} +4 -4
- package/build/browsers/index.d.ts +20 -10
- package/build/browsers/index.js +110 -11
- package/build/browsers/{playwright-webkit.d.ts → webkit.playwright.d.ts} +2 -2
- package/build/browsers/{playwright-webkit.js → webkit.playwright.js} +4 -4
- package/build/data/selectors.json +1 -1
- package/build/exports.d.ts +6 -4
- package/build/exports.js +6 -4
- package/build/hooks.d.ts +4 -5
- package/build/hooks.js +4 -6
- package/build/http.d.ts +22 -1
- package/build/http.js +21 -0
- package/build/router.js +19 -3
- package/build/routes/{chromium/http/content-post.body.json → chrome/http/content.post.body.json} +8 -8
- package/build/routes/chrome/http/content.post.d.ts +7 -0
- package/build/routes/chrome/http/content.post.js +6 -0
- package/build/routes/chrome/http/download.post.d.ts +7 -0
- package/build/routes/chrome/http/download.post.js +6 -0
- package/build/routes/chrome/http/function.post.d.ts +7 -0
- package/build/routes/chrome/http/function.post.js +6 -0
- package/build/routes/chrome/http/json-list.get.d.ts +1 -0
- package/build/routes/chrome/http/json-list.get.js +1 -0
- package/build/routes/chrome/http/json-new.put.d.ts +1 -0
- package/build/routes/chrome/http/json-new.put.js +1 -0
- package/build/routes/chrome/http/json-protocol.get.d.ts +1 -0
- package/build/routes/chrome/http/json-protocol.get.js +1 -0
- package/build/routes/chrome/http/json-version.get.d.ts +1 -0
- package/build/routes/chrome/http/json-version.get.js +1 -0
- package/build/routes/chrome/http/json-version.get.response.json +44 -0
- package/build/routes/{chromium/http/pdf-post.body.json → chrome/http/pdf.post.body.json} +8 -8
- package/build/routes/chrome/http/pdf.post.d.ts +7 -0
- package/build/routes/chrome/http/pdf.post.js +6 -0
- package/build/routes/chrome/http/performance.post.d.ts +7 -0
- package/build/routes/chrome/http/performance.post.js +6 -0
- package/build/routes/{chromium/http/scrape-post.body.json → chrome/http/scrape.post.body.json} +8 -8
- package/build/routes/chrome/http/scrape.post.d.ts +7 -0
- package/build/routes/chrome/http/scrape.post.js +6 -0
- package/build/routes/{chromium/http/screenshot-post.body.json → chrome/http/screenshot.post.body.json} +8 -8
- package/build/routes/chrome/http/screenshot.post.d.ts +7 -0
- package/build/routes/chrome/http/screenshot.post.js +6 -0
- package/build/routes/chrome/tests/content.spec.js +311 -0
- package/build/routes/chrome/tests/download.spec.js +67 -0
- package/build/routes/chrome/tests/function.spec.d.ts +1 -0
- package/build/routes/chrome/tests/function.spec.js +245 -0
- package/build/routes/chrome/tests/json-version.spec.d.ts +1 -0
- package/build/routes/chrome/tests/json-version.spec.js +37 -0
- package/build/routes/chrome/tests/page-websocket.spec.d.ts +1 -0
- package/build/routes/chrome/tests/page-websocket.spec.js +97 -0
- package/build/routes/chrome/tests/pdf.spec.d.ts +1 -0
- package/build/routes/chrome/tests/pdf.spec.js +333 -0
- package/build/routes/chrome/tests/performance.spec.d.ts +1 -0
- package/build/routes/chrome/tests/performance.spec.js +124 -0
- package/build/routes/chrome/tests/scrape.spec.d.ts +1 -0
- package/build/routes/chrome/tests/scrape.spec.js +354 -0
- package/build/routes/chrome/tests/screenshot.spec.d.ts +1 -0
- package/build/routes/chrome/tests/screenshot.spec.js +339 -0
- package/build/routes/chrome/tests/websocket.spec.d.ts +1 -0
- package/build/routes/chrome/tests/websocket.spec.js +371 -0
- package/build/routes/chrome/ws/browser.d.ts +6 -0
- package/build/routes/chrome/ws/browser.js +5 -0
- package/build/routes/chrome/ws/cdp.d.ts +7 -0
- package/build/routes/chrome/ws/cdp.js +6 -0
- package/build/routes/chrome/ws/cdp.query.json +120 -0
- package/build/routes/chrome/ws/page.d.ts +6 -0
- package/build/routes/chrome/ws/page.js +5 -0
- package/build/routes/chrome/ws/page.query.json +120 -0
- package/build/routes/chrome/ws/playwright.d.ts +7 -0
- package/build/routes/chrome/ws/playwright.js +6 -0
- package/build/routes/chromium/http/content.post.body.json +510 -0
- package/build/routes/chromium/http/content.post.d.ts +1 -0
- package/build/routes/chromium/http/content.post.js +1 -0
- package/build/routes/chromium/http/content.post.query.json +183 -0
- package/build/routes/chromium/http/content.post.response.json +5 -0
- package/build/routes/chromium/http/download.post.body.json +32 -0
- package/build/routes/chromium/http/download.post.d.ts +1 -0
- package/build/routes/chromium/http/download.post.js +1 -0
- package/build/routes/chromium/http/download.post.query.json +120 -0
- package/build/routes/chromium/http/download.post.response.json +4 -0
- package/build/routes/chromium/http/function.post.body.json +32 -0
- package/build/routes/chromium/http/function.post.d.ts +1 -0
- package/build/routes/chromium/http/function.post.js +1 -0
- package/build/routes/chromium/http/function.post.query.json +120 -0
- package/build/routes/chromium/http/function.post.response.json +4 -0
- package/build/routes/chromium/http/json-list.get.d.ts +1 -0
- package/build/routes/chromium/http/json-list.get.js +1 -0
- package/build/routes/chromium/http/json-list.get.response.json +52 -0
- package/build/routes/chromium/http/json-new.put.d.ts +1 -0
- package/build/routes/chromium/http/json-new.put.js +1 -0
- package/build/routes/chromium/http/json-new.put.response.json +44 -0
- package/build/routes/chromium/http/json-protocol.get.d.ts +1 -0
- package/build/routes/chromium/http/json-protocol.get.js +1 -0
- package/build/routes/chromium/http/json-protocol.get.response.json +6 -0
- package/build/routes/chromium/http/json-version.get.d.ts +1 -0
- package/build/routes/chromium/http/json-version.get.js +1 -0
- package/build/routes/chromium/http/json-version.get.response.json +44 -0
- package/build/routes/chromium/http/pdf.post.body.json +654 -0
- package/build/routes/chromium/http/pdf.post.d.ts +1 -0
- package/build/routes/chromium/http/pdf.post.js +1 -0
- package/build/routes/chromium/http/pdf.post.query.json +120 -0
- package/build/routes/chromium/http/pdf.post.response.json +5 -0
- package/build/routes/chromium/http/performance.post.body.json +26 -0
- package/build/routes/chromium/http/performance.post.d.ts +1 -0
- package/build/routes/chromium/http/performance.post.js +1 -0
- package/build/routes/chromium/http/performance.post.query.json +120 -0
- package/build/routes/chromium/http/performance.post.response.json +7 -0
- package/build/routes/chromium/http/scrape.post.body.json +557 -0
- package/build/routes/chromium/http/scrape.post.d.ts +1 -0
- package/build/routes/chromium/http/scrape.post.js +1 -0
- package/build/routes/chromium/http/scrape.post.query.json +183 -0
- package/build/routes/chromium/http/scrape.post.response.json +309 -0
- package/build/routes/chromium/http/screenshot.post.body.json +600 -0
- package/build/routes/chromium/http/screenshot.post.d.ts +1 -0
- package/build/routes/chromium/http/screenshot.post.js +1 -0
- package/build/routes/chromium/http/screenshot.post.query.json +120 -0
- package/build/routes/chromium/http/screenshot.post.response.json +5 -0
- package/build/routes/chromium/tests/content.spec.js +16 -16
- package/build/routes/chromium/tests/download.spec.js +3 -3
- package/build/routes/chromium/tests/function.spec.js +10 -10
- package/build/routes/chromium/tests/page-websocket.spec.d.ts +1 -0
- package/build/routes/chromium/tests/page-websocket.spec.js +97 -0
- package/build/routes/chromium/tests/pdf.spec.js +16 -16
- package/build/routes/chromium/tests/performance.spec.js +7 -7
- package/build/routes/chromium/tests/scrape.spec.js +15 -15
- package/build/routes/chromium/tests/screenshot.spec.js +17 -17
- package/build/routes/chromium/tests/websocket.spec.js +31 -37
- package/build/routes/chromium/ws/browser.d.ts +1 -16
- package/build/routes/chromium/ws/browser.js +1 -10
- package/build/routes/chromium/ws/cdp.d.ts +1 -0
- package/build/routes/chromium/ws/cdp.js +1 -0
- package/build/routes/chromium/ws/cdp.query.json +120 -0
- package/build/routes/chromium/ws/page.d.ts +1 -16
- package/build/routes/chromium/ws/page.js +1 -10
- package/build/routes/chromium/ws/playwright.d.ts +1 -0
- package/build/routes/chromium/ws/playwright.js +1 -0
- package/build/routes/firefox/ws/{playwright-firefox.d.ts → playwright.d.ts} +5 -5
- package/build/routes/firefox/ws/{playwright-firefox.js → playwright.js} +4 -4
- package/build/routes/management/http/{sessions-get.response.json → sessions.get.response.json} +11 -1
- package/build/routes/management/http/{static-get.js → static.get.js} +2 -2
- package/build/routes/webkit/ws/{playwright-webkit.d.ts → playwright.d.ts} +5 -5
- package/build/routes/webkit/ws/{playwright-webkit.js → playwright.js} +4 -4
- package/build/routes/webkit/ws/playwright.query.json +100 -0
- package/build/{routes/chromium/ws/cdp-chromium.d.ts → shared/browser.ws.d.ts} +4 -4
- package/build/shared/browser.ws.js +12 -0
- package/build/{routes/chromium/ws/playwright-chromium.d.ts → shared/chromium.playwright.ws.d.ts} +4 -4
- package/build/{routes/chromium/ws/playwright-chromium.js → shared/chromium.playwright.ws.js} +6 -3
- package/build/shared/chromium.ws.d.ts +16 -0
- package/build/shared/chromium.ws.js +10 -0
- package/build/{routes/chromium/http/content-post.d.ts → shared/content.http.d.ts} +3 -3
- package/build/{routes/chromium/http/content-post.js → shared/content.http.js} +3 -3
- package/build/{routes/chromium/http/download-post.d.ts → shared/download.http.d.ts} +3 -3
- package/build/{routes/chromium/http/download-post.js → shared/download.http.js} +4 -4
- package/build/{routes/chromium/http/function-post.d.ts → shared/function.http.d.ts} +3 -3
- package/build/{routes/chromium/http/function-post.js → shared/function.http.js} +4 -4
- package/build/{routes/chromium/http/json-new.d.ts → shared/json-list.http.d.ts} +2 -3
- package/build/{routes/chromium/http/json-list.js → shared/json-list.http.js} +5 -8
- package/build/{routes/chromium/http/json-list.d.ts → shared/json-new.http.d.ts} +2 -3
- package/build/shared/json-new.http.js +34 -0
- package/build/{routes/chromium/http/json-protocol-get.js → shared/json-protocol.http.js} +2 -2
- package/build/{routes/chromium/http/json-version-get.js → shared/json-version.http.js} +3 -3
- package/build/shared/page.ws.d.ts +16 -0
- package/build/shared/page.ws.js +13 -0
- package/build/{routes/chromium/http/pdf-post.d.ts → shared/pdf.http.d.ts} +3 -3
- package/build/{routes/chromium/http/pdf-post.js → shared/pdf.http.js} +3 -3
- package/build/{routes/chromium/http/performance.d.ts → shared/performance.http.d.ts} +3 -3
- package/build/{routes/chromium/http/performance.js → shared/performance.http.js} +4 -4
- package/build/{routes/chromium/http/scrape-post.d.ts → shared/scrape.http.d.ts} +3 -3
- package/build/{routes/chromium/http/scrape-post.js → shared/scrape.http.js} +3 -3
- package/build/{routes/chromium/http/screenshot-post.d.ts → shared/screenshot.http.d.ts} +3 -3
- package/build/{routes/chromium/http/screenshot-post.js → shared/screenshot.http.js} +3 -3
- package/build/shared/utils/performance/child.d.ts +1 -0
- package/build/{routes/chromium → shared}/utils/performance/main.js +1 -1
- package/build/shared/utils/performance/types.js +1 -0
- package/build/shim.js +2 -1
- package/build/types.d.ts +10 -8
- package/build/utils.d.ts +8 -3
- package/build/utils.js +24 -11
- package/docker/base/Dockerfile +1 -1
- package/docker/chrome/Dockerfile +4 -4
- package/docker/chromium/.dockerignore +16 -0
- package/docker/chromium/Dockerfile +40 -0
- package/docker/firefox/Dockerfile +1 -1
- package/docker/multi/Dockerfile +13 -1
- package/docker/webkit/Dockerfile +1 -1
- package/extensions/ublock/3p-filters.html +1 -1
- package/extensions/ublock/_locales/ar/messages.json +4 -0
- package/extensions/ublock/_locales/az/messages.json +4 -0
- package/extensions/ublock/_locales/be/messages.json +4 -0
- package/extensions/ublock/_locales/bg/messages.json +5 -1
- package/extensions/ublock/_locales/bn/messages.json +4 -0
- package/extensions/ublock/_locales/br_FR/messages.json +6 -2
- package/extensions/ublock/_locales/bs/messages.json +4 -0
- package/extensions/ublock/_locales/ca/messages.json +4 -0
- package/extensions/ublock/_locales/cs/messages.json +4 -0
- package/extensions/ublock/_locales/cv/messages.json +4 -0
- package/extensions/ublock/_locales/cy/messages.json +1294 -0
- package/extensions/ublock/_locales/da/messages.json +4 -0
- package/extensions/ublock/_locales/de/messages.json +5 -1
- package/extensions/ublock/_locales/el/messages.json +4 -0
- package/extensions/ublock/_locales/en/messages.json +4 -0
- package/extensions/ublock/_locales/en_GB/messages.json +4 -0
- package/extensions/ublock/_locales/eo/messages.json +9 -5
- package/extensions/ublock/_locales/es/messages.json +4 -0
- package/extensions/ublock/_locales/et/messages.json +4 -0
- package/extensions/ublock/_locales/eu/messages.json +8 -4
- package/extensions/ublock/_locales/fa/messages.json +4 -0
- package/extensions/ublock/_locales/fi/messages.json +4 -0
- package/extensions/ublock/_locales/fil/messages.json +4 -0
- package/extensions/ublock/_locales/fr/messages.json +4 -0
- package/extensions/ublock/_locales/fy/messages.json +4 -0
- package/extensions/ublock/_locales/gl/messages.json +4 -0
- package/extensions/ublock/_locales/gu/messages.json +4 -0
- package/extensions/ublock/_locales/he/messages.json +4 -0
- package/extensions/ublock/_locales/hi/messages.json +4 -0
- package/extensions/ublock/_locales/hr/messages.json +4 -0
- package/extensions/ublock/_locales/hu/messages.json +4 -0
- package/extensions/ublock/_locales/hy/messages.json +4 -0
- package/extensions/ublock/_locales/id/messages.json +5 -1
- package/extensions/ublock/_locales/it/messages.json +4 -0
- package/extensions/ublock/_locales/ja/messages.json +4 -0
- package/extensions/ublock/_locales/ka/messages.json +34 -30
- package/extensions/ublock/_locales/kk/messages.json +4 -0
- package/extensions/ublock/_locales/kn/messages.json +4 -0
- package/extensions/ublock/_locales/ko/messages.json +4 -0
- package/extensions/ublock/_locales/ku/messages.json +4 -0
- package/extensions/ublock/_locales/lt/messages.json +4 -0
- package/extensions/ublock/_locales/lv/messages.json +4 -0
- package/extensions/ublock/_locales/mk/messages.json +4 -0
- package/extensions/ublock/_locales/ml/messages.json +4 -0
- package/extensions/ublock/_locales/mr/messages.json +4 -0
- package/extensions/ublock/_locales/ms/messages.json +13 -9
- package/extensions/ublock/_locales/nb/messages.json +4 -0
- package/extensions/ublock/_locales/nl/messages.json +4 -0
- package/extensions/ublock/_locales/no/messages.json +4 -0
- package/extensions/ublock/_locales/oc/messages.json +4 -0
- package/extensions/ublock/_locales/pa/messages.json +4 -0
- package/extensions/ublock/_locales/pl/messages.json +5 -1
- package/extensions/ublock/_locales/pt_BR/messages.json +4 -0
- package/extensions/ublock/_locales/pt_PT/messages.json +4 -0
- package/extensions/ublock/_locales/ro/messages.json +5 -1
- package/extensions/ublock/_locales/ru/messages.json +4 -0
- package/extensions/ublock/_locales/si/messages.json +4 -0
- package/extensions/ublock/_locales/sk/messages.json +4 -0
- package/extensions/ublock/_locales/sl/messages.json +4 -0
- package/extensions/ublock/_locales/so/messages.json +4 -0
- package/extensions/ublock/_locales/sq/messages.json +4 -0
- package/extensions/ublock/_locales/sr/messages.json +4 -0
- package/extensions/ublock/_locales/sv/messages.json +4 -0
- package/extensions/ublock/_locales/sw/messages.json +4 -0
- package/extensions/ublock/_locales/ta/messages.json +4 -0
- package/extensions/ublock/_locales/te/messages.json +4 -0
- package/extensions/ublock/_locales/th/messages.json +12 -8
- package/extensions/ublock/_locales/tr/messages.json +4 -0
- package/extensions/ublock/_locales/uk/messages.json +4 -0
- package/extensions/ublock/_locales/ur/messages.json +4 -0
- package/extensions/ublock/_locales/vi/messages.json +4 -0
- package/extensions/ublock/_locales/zh_CN/messages.json +6 -2
- package/extensions/ublock/_locales/zh_TW/messages.json +6 -2
- package/extensions/ublock/assets/assets.json +11 -11
- package/extensions/ublock/assets/resources/scriptlets.js +660 -378
- package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +7173 -3455
- package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +18829 -1918
- package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +21 -26
- package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +118 -46
- package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +710 -1117
- package/extensions/ublock/assets/ublock/badlists.txt +0 -4
- package/extensions/ublock/assets/ublock/badware.min.txt +116 -105
- package/extensions/ublock/assets/ublock/filters.min.txt +1443 -1097
- package/extensions/ublock/assets/ublock/privacy.min.txt +50 -31
- package/extensions/ublock/assets/ublock/quick-fixes.min.txt +97 -108
- package/extensions/ublock/assets/ublock/unbreak.min.txt +64 -21
- package/extensions/ublock/css/1p-filters.css +4 -0
- package/extensions/ublock/css/3p-filters.css +6 -4
- package/extensions/ublock/css/common.css +1 -1
- package/extensions/ublock/css/fa-icons.css +1 -0
- package/extensions/ublock/css/logger-ui.css +72 -52
- package/extensions/ublock/css/popup-fenix.css +1 -1
- package/extensions/ublock/img/fontawesome/fontawesome-defs.svg +1 -0
- package/extensions/ublock/js/3p-filters.js +3 -3
- package/extensions/ublock/js/assets.js +7 -4
- package/extensions/ublock/js/background.js +1 -3
- package/extensions/ublock/js/benchmarks.js +1 -0
- package/extensions/ublock/js/broadcast.js +12 -0
- package/extensions/ublock/js/click2load.js +2 -3
- package/extensions/ublock/js/codemirror/ubo-static-filtering.js +1 -0
- package/extensions/ublock/js/commands.js +10 -0
- package/extensions/ublock/js/contentscript-extra.js +13 -11
- package/extensions/ublock/js/contentscript.js +0 -31
- package/extensions/ublock/js/contextmenu.js +5 -1
- package/extensions/ublock/js/dyna-rules.js +83 -52
- package/extensions/ublock/js/fa-icons.js +1 -0
- package/extensions/ublock/js/filtering-context.js +0 -2
- package/extensions/ublock/js/i18n.js +1 -5
- package/extensions/ublock/js/logger-ui.js +71 -38
- package/extensions/ublock/js/logger.js +18 -14
- package/extensions/ublock/js/messaging.js +17 -5
- package/extensions/ublock/js/popup-fenix.js +6 -6
- package/extensions/ublock/js/scriptlet-filtering-core.js +14 -12
- package/extensions/ublock/js/scriptlet-filtering.js +149 -53
- package/extensions/ublock/js/scriptlets/scriptlet-loglevel-1.js +49 -0
- package/extensions/ublock/js/scriptlets/scriptlet-loglevel-2.js +49 -0
- package/extensions/ublock/js/scriptlets/should-inject-contentscript.js +1 -1
- package/extensions/ublock/js/static-dnr-filtering.js +4 -2
- package/extensions/ublock/js/static-filtering-parser.js +14 -8
- package/extensions/ublock/js/static-net-filtering.js +32 -30
- package/extensions/ublock/js/storage.js +18 -4
- package/extensions/ublock/js/traffic.js +3 -3
- package/extensions/ublock/js/ublock.js +1 -1
- package/extensions/ublock/js/vapi-background.js +15 -7
- package/extensions/ublock/logger-ui.html +18 -10
- package/extensions/ublock/manifest.json +4 -1
- package/extensions/ublock/web_accessible_resources/chartbeat.js +3 -0
- package/package.json +12 -11
- package/scripts/build-function.js +1 -1
- package/scripts/build-open-api.js +3 -2
- package/scripts/clean.js +6 -1
- package/scripts/install-debugger.js +20 -0
- package/scripts/install-devtools.js +40 -0
- package/src/browserless.ts +11 -9
- package/src/browsers/chrome.cdp.ts +10 -0
- package/src/browsers/chrome.playwright.ts +10 -0
- package/src/browsers/{cdp-chromium.ts → chromium.cdp.ts} +20 -13
- package/src/browsers/{playwright-chromium.ts → chromium.playwright.ts} +7 -6
- package/src/browsers/{playwright-firefox.ts → firefox.playwright.ts} +5 -5
- package/src/browsers/index.ts +160 -23
- package/src/browsers/{playwright-webkit.ts → webkit.playwright.ts} +5 -5
- package/src/exports.ts +6 -4
- package/src/hooks.ts +4 -12
- package/src/http.ts +21 -0
- package/src/router.ts +21 -5
- package/src/routes/chrome/http/content.post.ts +14 -0
- package/src/routes/chrome/http/download.post.ts +14 -0
- package/src/routes/chrome/http/function.post.ts +14 -0
- package/src/routes/chrome/http/json-list.get.ts +1 -0
- package/src/routes/chrome/http/json-new.put.ts +1 -0
- package/src/routes/chrome/http/json-protocol.get.ts +1 -0
- package/src/routes/chrome/http/json-version.get.ts +1 -0
- package/src/routes/chrome/http/pdf.post.ts +14 -0
- package/src/routes/chrome/http/performance.post.ts +14 -0
- package/src/routes/chrome/http/scrape.post.ts +14 -0
- package/src/routes/chrome/http/screenshot.post.ts +14 -0
- package/src/routes/chrome/tests/content.spec.ts +375 -0
- package/src/routes/chrome/tests/download.spec.ts +77 -0
- package/src/routes/chrome/tests/function.spec.ts +282 -0
- package/src/routes/chrome/tests/json-version.spec.ts +52 -0
- package/src/routes/chrome/tests/page-websocket.spec.ts +129 -0
- package/src/routes/chrome/tests/pdf.spec.ts +380 -0
- package/src/routes/chrome/tests/performance.spec.ts +155 -0
- package/src/routes/chrome/tests/scrape.spec.ts +417 -0
- package/src/routes/chrome/tests/screenshot.spec.ts +387 -0
- package/src/routes/chrome/tests/websocket.spec.ts +491 -0
- package/src/routes/chrome/ws/browser.ts +8 -0
- package/src/routes/chrome/ws/cdp.ts +12 -0
- package/src/routes/chrome/ws/page.ts +8 -0
- package/src/routes/chrome/ws/playwright.ts +12 -0
- package/src/routes/chromium/http/content.post.ts +6 -0
- package/src/routes/chromium/http/download.post.ts +6 -0
- package/src/routes/chromium/http/function.post.ts +6 -0
- package/src/routes/chromium/http/json-list.get.ts +1 -0
- package/src/routes/chromium/http/json-new.put.ts +1 -0
- package/src/routes/chromium/http/json-protocol.get.ts +1 -0
- package/src/routes/chromium/http/json-version.get.ts +1 -0
- package/src/routes/chromium/http/pdf.post.ts +6 -0
- package/src/routes/chromium/http/performance.post.ts +6 -0
- package/src/routes/chromium/http/scrape.post.ts +6 -0
- package/src/routes/chromium/http/screenshot.post.ts +6 -0
- package/src/routes/chromium/tests/content.spec.ts +36 -28
- package/src/routes/chromium/tests/download.spec.ts +3 -3
- package/src/routes/chromium/tests/function.spec.ts +18 -15
- package/src/routes/chromium/tests/page-websocket.spec.ts +129 -0
- package/src/routes/chromium/tests/pdf.spec.ts +31 -26
- package/src/routes/chromium/tests/performance.spec.ts +46 -34
- package/src/routes/chromium/tests/scrape.spec.ts +23 -20
- package/src/routes/chromium/tests/screenshot.spec.ts +24 -24
- package/src/routes/chromium/tests/websocket.spec.ts +31 -40
- package/src/routes/chromium/ws/browser.ts +1 -29
- package/src/routes/chromium/ws/cdp.ts +1 -0
- package/src/routes/chromium/ws/page.ts +1 -29
- package/src/routes/chromium/ws/playwright.ts +4 -0
- package/src/routes/firefox/ws/{playwright-firefox.ts → playwright.ts} +5 -5
- package/src/routes/management/http/{static-get.ts → static.get.ts} +2 -2
- package/src/routes/webkit/ws/{playwright-webkit.ts → playwright.ts} +5 -5
- package/src/shared/browser.ws.ts +34 -0
- package/src/{routes/chromium/ws/playwright-chromium.ts → shared/chromium.playwright.ws.ts} +7 -4
- package/src/{routes/chromium/ws/cdp-chromium.ts → shared/chromium.ws.ts} +6 -6
- package/src/{routes/chromium/http/content-post.ts → shared/content.http.ts} +4 -4
- package/src/{routes/chromium/http/download-post.ts → shared/download.http.ts} +4 -4
- package/src/{routes/chromium/http/function-post.ts → shared/function.http.ts} +4 -4
- package/src/shared/json-list.http.ts +35 -0
- package/src/{routes/chromium/http/json-new.ts → shared/json-new.http.ts} +23 -7
- package/src/{routes/chromium/http/json-protocol-get.ts → shared/json-protocol.http.ts} +3 -5
- package/src/{routes/chromium/http/json-version-get.ts → shared/json-version.http.ts} +4 -5
- package/src/shared/page.ws.ts +35 -0
- package/src/{routes/chromium/http/pdf-post.ts → shared/pdf.http.ts} +4 -4
- package/src/{routes/chromium/http/performance.ts → shared/performance.http.ts} +4 -4
- package/src/{routes/chromium/http/scrape-post.ts → shared/scrape.http.ts} +4 -4
- package/src/{routes/chromium/http/screenshot-post.ts → shared/screenshot.http.ts} +4 -4
- package/src/{routes/chromium → shared}/utils/function/handler.ts +2 -2
- package/src/{routes/chromium → shared}/utils/performance/main.ts +1 -2
- package/src/shim.ts +2 -1
- package/src/types.ts +27 -20
- package/src/utils.ts +32 -14
- package/static/devtools/Images/accelerometer-back.svg +1 -0
- package/static/devtools/Images/accelerometer-bottom.png +0 -0
- package/static/devtools/Images/accelerometer-front.svg +1 -0
- package/static/devtools/Images/accelerometer-left.png +0 -0
- package/static/devtools/Images/accelerometer-right.png +0 -0
- package/static/devtools/Images/accelerometer-top.png +0 -0
- package/static/devtools/Images/baseline-icon.svg +1 -0
- package/static/devtools/Images/breaking_change_icon.svg +1 -0
- package/static/devtools/Images/checkboxCheckmark.svg +1 -0
- package/static/devtools/Images/checker.png +0 -0
- package/static/devtools/Images/chevrons.svg +1 -0
- package/static/devtools/Images/chromeDisabledSelect.png +0 -0
- package/static/devtools/Images/chromeDisabledSelect_2x.png +0 -0
- package/static/devtools/Images/chromeLeft.avif +0 -0
- package/static/devtools/Images/chromeMiddle.avif +0 -0
- package/static/devtools/Images/chromeRight.avif +0 -0
- package/static/devtools/Images/chromeSelect.svg +1 -0
- package/static/devtools/Images/chromeSelectDark.svg +1 -0
- package/static/devtools/Images/cssoverview_icons_2x.avif +0 -0
- package/static/devtools/Images/dropdown_7x6_icon.svg +1 -0
- package/static/devtools/Images/elements_panel_icon.svg +1 -0
- package/static/devtools/Images/errorWave.svg +1 -0
- package/static/devtools/Images/error_icon.svg +1 -0
- package/static/devtools/Images/feedback_thin_16x16_icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-around-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-between-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-evenly-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-direction-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-center-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-around-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-between-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-evenly-icon.svg +1 -0
- package/static/devtools/Images/ic_checkmark_16x16.svg +3 -0
- package/static/devtools/Images/ic_delete_filter.svg +1 -0
- package/static/devtools/Images/ic_delete_list.svg +1 -0
- package/static/devtools/Images/ic_info_black_18dp.svg +1 -0
- package/static/devtools/Images/ic_page_next_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_page_prev_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_redo_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_show_node_16x16.svg +4 -0
- package/static/devtools/Images/ic_suggest_color.svg +6 -0
- package/static/devtools/Images/ic_undo_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_warning_black_18dp.svg +1 -0
- package/static/devtools/Images/issue-text-icon.svg +1 -0
- package/static/devtools/Images/largeIcons.svg +1 -0
- package/static/devtools/Images/lighthouse_logo.svg +1 -0
- package/static/devtools/Images/link_icon.svg +1 -0
- package/static/devtools/Images/mediumIcons.svg +1 -0
- package/static/devtools/Images/navigationControls.png +0 -0
- package/static/devtools/Images/navigationControls_2x.png +0 -0
- package/static/devtools/Images/network_panel_icon.svg +1 -0
- package/static/devtools/Images/nodeIcon.avif +0 -0
- package/static/devtools/Images/node_search_icon.svg +1 -0
- package/static/devtools/Images/popoverArrows.png +0 -0
- package/static/devtools/Images/profileGroupIcon.png +0 -0
- package/static/devtools/Images/profileIcon.png +0 -0
- package/static/devtools/Images/profileSmallIcon.png +0 -0
- package/static/devtools/Images/radioDot-dark-theme.png +0 -0
- package/static/devtools/Images/radioDot.png +0 -0
- package/static/devtools/Images/refresh_12x12_icon.svg +1 -0
- package/static/devtools/Images/resizeDiagonal.svg +1 -0
- package/static/devtools/Images/resizeHorizontal.svg +1 -0
- package/static/devtools/Images/resizeVertical.svg +1 -0
- package/static/devtools/Images/resourceCSSIcon.png +0 -0
- package/static/devtools/Images/resourceDocumentIcon.png +0 -0
- package/static/devtools/Images/resourceDocumentIconSmall.png +0 -0
- package/static/devtools/Images/resourceJSIcon.png +0 -0
- package/static/devtools/Images/resourcePlainIcon.png +0 -0
- package/static/devtools/Images/resourcePlainIconSmall.png +0 -0
- package/static/devtools/Images/resourcesTimeGraphIcon.avif +0 -0
- package/static/devtools/Images/searchNext.png +0 -0
- package/static/devtools/Images/searchPrev.png +0 -0
- package/static/devtools/Images/securityIcons.svg +1 -0
- package/static/devtools/Images/settings_14x14_icon.svg +1 -0
- package/static/devtools/Images/smallIcons.svg +1 -0
- package/static/devtools/Images/sources_panel_icon.svg +1 -0
- package/static/devtools/Images/speech.png +0 -0
- package/static/devtools/Images/toolbarResizerVertical.png +0 -0
- package/static/devtools/Images/touchCursor.png +0 -0
- package/static/devtools/Images/touchCursor_2x.png +0 -0
- package/static/devtools/Images/treeoutlineTriangles.svg +1 -0
- package/static/devtools/Images/warning_icon.svg +1 -0
- package/static/devtools/Images/whatsnew.avif +0 -0
- package/static/devtools/Tests.js +1654 -0
- package/static/devtools/accessibility/accessibility-legacy.js +1 -0
- package/static/devtools/accessibility/accessibility-meta.js +1 -0
- package/static/devtools/accessibility/accessibility.js +1 -0
- package/static/devtools/accessibility/accessibility_module.js +1 -0
- package/static/devtools/accessibility_test_runner/accessibility_test_runner.js +77 -0
- package/static/devtools/accessibility_test_runner/accessibility_test_runner_module.js +0 -0
- package/static/devtools/animation/animation-legacy.js +1 -0
- package/static/devtools/animation/animation-meta.js +1 -0
- package/static/devtools/animation/animation.js +1 -0
- package/static/devtools/animation/animation_module.js +1 -0
- package/static/devtools/application_test_runner/AppcacheTestRunner.js +220 -0
- package/static/devtools/application_test_runner/CacheStorageTestRunner.js +286 -0
- package/static/devtools/application_test_runner/IndexedDBTestRunner.js +476 -0
- package/static/devtools/application_test_runner/ResourceTreeTestRunner.js +99 -0
- package/static/devtools/application_test_runner/ResourcesTestRunner.js +167 -0
- package/static/devtools/application_test_runner/ServiceWorkersTestRunner.js +131 -0
- package/static/devtools/application_test_runner/application_test_runner.js +10 -0
- package/static/devtools/application_test_runner/application_test_runner_module.js +0 -0
- package/static/devtools/axe_core_test_runner/axe_core_test_runner.js +174 -0
- package/static/devtools/axe_core_test_runner/axe_core_test_runner_module.js +0 -0
- package/static/devtools/bindings/bindings-legacy.js +1 -0
- package/static/devtools/bindings/bindings.js +1 -0
- package/static/devtools/bindings_test_runner/AutomappingTestRunner.js +130 -0
- package/static/devtools/bindings_test_runner/BindingsTestRunner.js +238 -0
- package/static/devtools/bindings_test_runner/IsolatedFilesystemTestRunner.js +287 -0
- package/static/devtools/bindings_test_runner/OverridesTestRunner.js +26 -0
- package/static/devtools/bindings_test_runner/PersistenceTestRunner.js +109 -0
- package/static/devtools/bindings_test_runner/bindings_test_runner.js +9 -0
- package/static/devtools/bindings_test_runner/bindings_test_runner_module.js +0 -0
- package/static/devtools/browser_debugger/browser_debugger-legacy.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger-meta.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger_module.js +1 -0
- package/static/devtools/browser_sdk/browser_sdk-meta.js +1 -0
- package/static/devtools/browser_sdk/browser_sdk.js +1 -0
- package/static/devtools/changes/changes-legacy.js +1 -0
- package/static/devtools/changes/changes-meta.js +1 -0
- package/static/devtools/changes/changes.js +1 -0
- package/static/devtools/changes/changes_module.js +1 -0
- package/static/devtools/client_variations/client_variations.js +1 -0
- package/static/devtools/client_variations/client_variations_module.js +0 -0
- package/static/devtools/cm/cm.js +1 -0
- package/static/devtools/cm/cm_module.js +1 -0
- package/static/devtools/cm_headless/cm_headless.js +1 -0
- package/static/devtools/color_picker/color_picker-legacy.js +1 -0
- package/static/devtools/color_picker/color_picker.js +1 -0
- package/static/devtools/color_picker/color_picker_module.js +1 -0
- package/static/devtools/common/common-legacy.js +1 -0
- package/static/devtools/common/common.js +1 -0
- package/static/devtools/component_helpers/component_helpers.js +1 -0
- package/static/devtools/components/components-legacy.js +1 -0
- package/static/devtools/components/components.js +1 -0
- package/static/devtools/console/console-legacy.js +1 -0
- package/static/devtools/console/console-meta.js +1 -0
- package/static/devtools/console/console.js +6 -0
- package/static/devtools/console/console_module.js +1 -0
- package/static/devtools/console_counters/console_counters-legacy.js +1 -0
- package/static/devtools/console_counters/console_counters.js +1 -0
- package/static/devtools/console_test_runner/console_test_runner.js +696 -0
- package/static/devtools/console_test_runner/console_test_runner_module.js +0 -0
- package/static/devtools/cookie_table/cookie_table-legacy.js +1 -0
- package/static/devtools/cookie_table/cookie_table.js +1 -0
- package/static/devtools/cookie_table/cookie_table_module.js +1 -0
- package/static/devtools/coverage/coverage-legacy.js +1 -0
- package/static/devtools/coverage/coverage-meta.js +1 -0
- package/static/devtools/coverage/coverage.js +1 -0
- package/static/devtools/coverage/coverage_module.js +1 -0
- package/static/devtools/coverage_test_runner/coverage_test_runner.js +151 -0
- package/static/devtools/coverage_test_runner/coverage_test_runner_module.js +0 -0
- package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner.js +72 -0
- package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner_module.js +0 -0
- package/static/devtools/css_overview/css_overview-meta.js +1 -0
- package/static/devtools/css_overview/css_overview.js +146 -0
- package/static/devtools/css_overview/css_overview_module.js +1 -0
- package/static/devtools/data_grid/data_grid-legacy.js +1 -0
- package/static/devtools/data_grid/data_grid.js +1 -0
- package/static/devtools/data_grid/data_grid_module.js +1 -0
- package/static/devtools/data_grid_test_runner/data_grid_test_runner.js +78 -0
- package/static/devtools/data_grid_test_runner/data_grid_test_runner_module.js +0 -0
- package/static/devtools/developer_resources/developer_resources-legacy.js +1 -0
- package/static/devtools/developer_resources/developer_resources-meta.js +1 -0
- package/static/devtools/developer_resources/developer_resources.js +1 -0
- package/static/devtools/developer_resources/developer_resources_module.js +1 -0
- package/static/devtools/device_mode_test_runner/device_mode_test_runner.js +45 -0
- package/static/devtools/device_mode_test_runner/device_mode_test_runner_module.js +0 -0
- package/static/devtools/devtools_app.html +20 -0
- package/static/devtools/devtools_app.js +1 -0
- package/static/devtools/devtools_compatibility.js +1546 -0
- package/static/devtools/diff/diff-legacy.js +1 -0
- package/static/devtools/diff/diff.js +1 -0
- package/static/devtools/diff/diff_module.js +0 -0
- package/static/devtools/dom_extension/dom_extension.js +1 -0
- package/static/devtools/elements/elements-legacy.js +1 -0
- package/static/devtools/elements/elements-meta.js +1 -0
- package/static/devtools/elements/elements.js +469 -0
- package/static/devtools/elements/elements_module.js +1 -0
- package/static/devtools/elements_test_runner/EditDOMTestRunner.js +78 -0
- package/static/devtools/elements_test_runner/ElementsPanelShadowSelectionOnRefreshTestRunner.js +39 -0
- package/static/devtools/elements_test_runner/ElementsTestRunner.js +1280 -0
- package/static/devtools/elements_test_runner/SetOuterHTMLTestRunner.js +115 -0
- package/static/devtools/elements_test_runner/StylesUpdateLinksTestRunner.js +134 -0
- package/static/devtools/elements_test_runner/elements_test_runner.js +9 -0
- package/static/devtools/elements_test_runner/elements_test_runner_module.js +0 -0
- package/static/devtools/emulated_devices/emulated_devices_module.js +0 -0
- package/static/devtools/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/static/devtools/emulation/emulation-legacy.js +1 -0
- package/static/devtools/emulation/emulation-meta.js +1 -0
- package/static/devtools/emulation/emulation.js +1 -0
- package/static/devtools/event_listeners/event_listeners-legacy.js +1 -0
- package/static/devtools/event_listeners/event_listeners.js +1 -0
- package/static/devtools/event_listeners/event_listeners_module.js +1 -0
- package/static/devtools/extensions/extensions-legacy.js +1 -0
- package/static/devtools/extensions/extensions.js +1 -0
- package/static/devtools/extensions_test_runner/ExtensionsNetworkTestRunner.js +27 -0
- package/static/devtools/extensions_test_runner/ExtensionsTestRunner.js +68 -0
- package/static/devtools/extensions_test_runner/extensions_test_runner.js +6 -0
- package/static/devtools/extensions_test_runner/extensions_test_runner_module.js +0 -0
- package/static/devtools/formatter/formatter-legacy.js +1 -0
- package/static/devtools/formatter/formatter.js +1 -0
- package/static/devtools/formatter/formatter_module.js +0 -0
- package/static/devtools/formatter_worker/FormatterActions.js +1 -0
- package/static/devtools/formatter_worker/formatter_worker-entrypoint.js +1 -0
- package/static/devtools/formatter_worker/formatter_worker.js +1 -0
- package/static/devtools/har_importer/har_importer-legacy.js +1 -0
- package/static/devtools/har_importer/har_importer.js +1 -0
- package/static/devtools/har_importer/har_importer_module.js +0 -0
- package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner.js +740 -0
- package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner_module.js +0 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model-legacy.js +1 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model.js +1 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model_module.js +0 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-legacy.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker_module.js +0 -0
- package/static/devtools/help/help-legacy.js +1 -0
- package/static/devtools/help/help-meta.js +1 -0
- package/static/devtools/help/help.js +1 -0
- package/static/devtools/help/help_module.js +1 -0
- package/static/devtools/host/host-legacy.js +1 -0
- package/static/devtools/host/host.js +1 -0
- package/static/devtools/i18n/i18n.js +1 -0
- package/static/devtools/i18n/i18n_locales-tsconfig.json +8 -0
- package/static/devtools/i18n/locales/en-US.json +3566 -0
- package/static/devtools/inline_editor/inline_editor-legacy.js +1 -0
- package/static/devtools/inline_editor/inline_editor.js +203 -0
- package/static/devtools/inline_editor/inline_editor_module.js +1 -0
- package/static/devtools/input/input-legacy.js +1 -0
- package/static/devtools/input/input-meta.js +1 -0
- package/static/devtools/input/input.js +1 -0
- package/static/devtools/input/input_module.js +1 -0
- package/static/devtools/inspector.html +20 -0
- package/static/devtools/inspector.js +1 -0
- package/static/devtools/inspector_main/inspector_main-legacy.js +1 -0
- package/static/devtools/inspector_main/inspector_main-meta.js +1 -0
- package/static/devtools/inspector_main/inspector_main.js +1 -0
- package/static/devtools/integration_test_runner.html +14 -0
- package/static/devtools/integration_test_runner.js +2 -0
- package/static/devtools/issues/issues-legacy.js +1 -0
- package/static/devtools/issues/issues-meta.js +1 -0
- package/static/devtools/issues/issues.js +67 -0
- package/static/devtools/issues/issues_module.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata-legacy.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata_module.js +0 -0
- package/static/devtools/js_app.html +20 -0
- package/static/devtools/js_app.js +1 -0
- package/static/devtools/js_main/js_main-legacy.js +1 -0
- package/static/devtools/js_main/js_main.js +1 -0
- package/static/devtools/js_profiler/js_profiler-meta.js +1 -0
- package/static/devtools/js_profiler/js_profiler.js +1 -0
- package/static/devtools/js_profiler/js_profiler_module.js +0 -0
- package/static/devtools/layer_viewer/layer_viewer-legacy.js +1 -0
- package/static/devtools/layer_viewer/layer_viewer.js +1 -0
- package/static/devtools/layer_viewer/layer_viewer_module.js +1 -0
- package/static/devtools/layers/layers-legacy.js +1 -0
- package/static/devtools/layers/layers-meta.js +1 -0
- package/static/devtools/layers/layers.js +1 -0
- package/static/devtools/layers/layers_module.js +0 -0
- package/static/devtools/layers_test_runner/layers_test_runner.js +156 -0
- package/static/devtools/layers_test_runner/layers_test_runner_module.js +0 -0
- package/static/devtools/lighthouse/lighthouse-legacy.js +1 -0
- package/static/devtools/lighthouse/lighthouse-meta.js +1 -0
- package/static/devtools/lighthouse/lighthouse.js +70 -0
- package/static/devtools/lighthouse/lighthouse_module.js +1 -0
- package/static/devtools/lighthouse_test_runner/lighthouse_test_runner.js +136 -0
- package/static/devtools/lighthouse_test_runner/lighthouse_test_runner_module.js +0 -0
- package/static/devtools/lighthouse_worker/LighthouseService.js +195 -0
- package/static/devtools/lighthouse_worker/lighthouse_worker.js +6 -0
- package/static/devtools/lighthouse_worker.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector-legacy.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector.js +399 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector_module.js +0 -0
- package/static/devtools/main/main-legacy.js +1 -0
- package/static/devtools/main/main.js +1 -0
- package/static/devtools/media/media-legacy.js +1 -0
- package/static/devtools/media/media-meta.js +1 -0
- package/static/devtools/media/media.js +1 -0
- package/static/devtools/media/media_module.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling-legacy.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling-meta.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling.js +1 -0
- package/static/devtools/ndb_app.html +20 -0
- package/static/devtools/ndb_app.js +1 -0
- package/static/devtools/network/network-legacy.js +1 -0
- package/static/devtools/network/network-meta.js +1 -0
- package/static/devtools/network/network.js +72 -0
- package/static/devtools/network/network_module.js +1 -0
- package/static/devtools/network_test_runner/network_test_runner.js +280 -0
- package/static/devtools/network_test_runner/network_test_runner_module.js +0 -0
- package/static/devtools/node_app.html +20 -0
- package/static/devtools/node_app.js +1 -0
- package/static/devtools/node_debugger/node_debugger-meta.js +1 -0
- package/static/devtools/node_debugger/node_debugger.js +1 -0
- package/static/devtools/node_debugger/node_debugger_module.js +0 -0
- package/static/devtools/node_main/node_main-legacy.js +1 -0
- package/static/devtools/node_main/node_main-meta.js +1 -0
- package/static/devtools/node_main/node_main.js +1 -0
- package/static/devtools/object_ui/object_ui-legacy.js +1 -0
- package/static/devtools/object_ui/object_ui.js +3 -0
- package/static/devtools/object_ui/object_ui_module.js +1 -0
- package/static/devtools/perf_ui/perf_ui-legacy.js +1 -0
- package/static/devtools/perf_ui/perf_ui.js +152 -0
- package/static/devtools/perf_ui/perf_ui_module.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor-legacy.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor-meta.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor_module.js +1 -0
- package/static/devtools/performance_test_runner/TimelineDataTestRunner.js +5375 -0
- package/static/devtools/performance_test_runner/TimelineTestRunner.js +446 -0
- package/static/devtools/performance_test_runner/performance_test_runner.js +6 -0
- package/static/devtools/performance_test_runner/performance_test_runner_module.js +0 -0
- package/static/devtools/persistence/persistence-legacy.js +1 -0
- package/static/devtools/persistence/persistence-meta.js +1 -0
- package/static/devtools/persistence/persistence.js +1 -0
- package/static/devtools/platform/platform.js +1 -0
- package/static/devtools/profiler/profiler-legacy.js +1 -0
- package/static/devtools/profiler/profiler-meta.js +1 -0
- package/static/devtools/profiler/profiler.js +8 -0
- package/static/devtools/profiler/profiler_module.js +1 -0
- package/static/devtools/protocol_client/protocol_client-legacy.js +1 -0
- package/static/devtools/protocol_client/protocol_client.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor-legacy.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor-meta.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor_module.js +1 -0
- package/static/devtools/quick_open/quick_open-legacy.js +1 -0
- package/static/devtools/quick_open/quick_open.js +1 -0
- package/static/devtools/quick_open/quick_open_module.js +1 -0
- package/static/devtools/recorder/recorder.js +1 -0
- package/static/devtools/resources/resources-legacy.js +1 -0
- package/static/devtools/resources/resources-meta.js +1 -0
- package/static/devtools/resources/resources.js +28 -0
- package/static/devtools/resources/resources_module.js +1 -0
- package/static/devtools/root/root-legacy.js +1 -0
- package/static/devtools/root/root.js +1 -0
- package/static/devtools/screencast/screencast-legacy.js +1 -0
- package/static/devtools/screencast/screencast.js +1 -0
- package/static/devtools/sdk/sdk-legacy.js +1 -0
- package/static/devtools/sdk/sdk.js +2 -0
- package/static/devtools/sdk_test_runner/sdk_test_runner.js +297 -0
- package/static/devtools/sdk_test_runner/sdk_test_runner_module.js +0 -0
- package/static/devtools/search/search-legacy.js +1 -0
- package/static/devtools/search/search.js +1 -0
- package/static/devtools/search/search_module.js +1 -0
- package/static/devtools/security/security-legacy.js +1 -0
- package/static/devtools/security/security-meta.js +1 -0
- package/static/devtools/security/security.js +1 -0
- package/static/devtools/security/security_module.js +1 -0
- package/static/devtools/security_test_runner/security_test_runner.js +32 -0
- package/static/devtools/security_test_runner/security_test_runner_module.js +0 -0
- package/static/devtools/services/services-legacy.js +1 -0
- package/static/devtools/services/services.js +1 -0
- package/static/devtools/settings/settings-legacy.js +1 -0
- package/static/devtools/settings/settings-meta.js +1 -0
- package/static/devtools/settings/settings.js +1 -0
- package/static/devtools/settings/settings_module.js +1 -0
- package/static/devtools/shell.js +1 -0
- package/static/devtools/snippets/snippets-legacy.js +1 -0
- package/static/devtools/snippets/snippets.js +1 -0
- package/static/devtools/snippets/snippets_module.js +0 -0
- package/static/devtools/source_frame/source_frame-legacy.js +1 -0
- package/static/devtools/source_frame/source_frame.js +1 -0
- package/static/devtools/source_frame/source_frame_module.js +1 -0
- package/static/devtools/sources/sources-legacy.js +1 -0
- package/static/devtools/sources/sources-meta.js +1 -0
- package/static/devtools/sources/sources.js +13 -0
- package/static/devtools/sources/sources_module.js +1 -0
- package/static/devtools/sources_test_runner/AutocompleteTestRunner.js +46 -0
- package/static/devtools/sources_test_runner/DebuggerTestRunner.js +895 -0
- package/static/devtools/sources_test_runner/EditorTestRunner.js +237 -0
- package/static/devtools/sources_test_runner/LiveEditTestRunner.js +33 -0
- package/static/devtools/sources_test_runner/SearchTestRunner.js +158 -0
- package/static/devtools/sources_test_runner/SourcesTestRunner.js +173 -0
- package/static/devtools/sources_test_runner/sources_test_runner.js +10 -0
- package/static/devtools/sources_test_runner/sources_test_runner_module.js +0 -0
- package/static/devtools/startup/startup.js +1 -0
- package/static/devtools/test_runner/test_runner.js +1 -0
- package/static/devtools/text_editor/text_editor-legacy.js +1 -0
- package/static/devtools/text_editor/text_editor.js +1 -0
- package/static/devtools/text_editor/text_editor_module.js +1 -0
- package/static/devtools/text_utils/text_utils-legacy.js +1 -0
- package/static/devtools/text_utils/text_utils.js +1 -0
- package/static/devtools/theme_support/theme_support.js +1 -0
- package/static/devtools/third_party/acorn/acorn-tsconfig.json +8 -0
- package/static/devtools/third_party/acorn/acorn.js +1 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.d.ts +209 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs +5261 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs.d.ts +2 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs.map +1 -0
- package/static/devtools/third_party/acorn-loose/acorn-loose-tsconfig.json +8 -0
- package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.d.ts +16 -0
- package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.mjs +1418 -0
- package/static/devtools/third_party/axe-core/axe.js +16423 -0
- package/static/devtools/third_party/chromium/chromium-tsconfig.json +8 -0
- package/static/devtools/third_party/chromium/client-variations/ClientVariations.d.ts +13 -0
- package/static/devtools/third_party/chromium/client-variations/ClientVariations.js +27 -0
- package/static/devtools/third_party/codemirror/codemirror-tsconfig.json +72 -0
- package/static/devtools/third_party/codemirror/package/addon/comment/comment.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/addon/comment/comment.js +211 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.js +201 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.js +158 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.js +105 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.js +157 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.js +163 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.js +131 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/overlay.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/overlay.js +90 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/simple.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/simple.js +216 -0
- package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.js +333 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/active-line.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/active-line.js +72 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.js +119 -0
- package/static/devtools/third_party/codemirror/package/lib/codemirror.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/lib/codemirror.js +9800 -0
- package/static/devtools/third_party/codemirror/package/mode/clike/clike.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/clike/clike.js +935 -0
- package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.js +292 -0
- package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.js +359 -0
- package/static/devtools/third_party/codemirror/package/mode/css/css.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/css/css.js +864 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.js +37 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.js +153 -0
- package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.js +942 -0
- package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.js +148 -0
- package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.js +280 -0
- package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.js +886 -0
- package/static/devtools/third_party/codemirror/package/mode/php/php.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/php/php.js +234 -0
- package/static/devtools/third_party/codemirror/package/mode/python/python.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/python/python.js +399 -0
- package/static/devtools/third_party/codemirror/package/mode/shell/shell.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/shell/shell.js +168 -0
- package/static/devtools/third_party/codemirror/package/mode/wast/wast.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/wast/wast.js +41 -0
- package/static/devtools/third_party/codemirror/package/mode/xml/xml.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/xml/xml.js +413 -0
- package/static/devtools/third_party/i18n/bundle-tsconfig.json +8 -0
- package/static/devtools/third_party/i18n/i18n.d.ts +108 -0
- package/static/devtools/third_party/i18n/i18n.js +4336 -0
- package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.js +1140 -0
- package/static/devtools/third_party/lighthouse/lighthouse-tsconfig.json +10 -0
- package/static/devtools/third_party/lighthouse/locales/ar-XB.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ar.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/bg.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ca.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/cs.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/da.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/de.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/el.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-GB.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-US.json +2297 -0
- package/static/devtools/third_party/lighthouse/locales/en-XA.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-XL.json +2297 -0
- package/static/devtools/third_party/lighthouse/locales/es-419.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/es.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fil.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/he.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hu.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/id.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/it.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ja.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ko.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/lt.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/lv.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/nl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/no.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pt-PT.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pt.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ro.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ru.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sk.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sr-Latn.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sv.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ta.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/te.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/th.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/tr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/uk.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/vi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh-HK.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh-TW.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh.json +2066 -0
- package/static/devtools/third_party/lighthouse/report-assets/report-generator.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/report-assets/report-generator.js +167 -0
- package/static/devtools/third_party/lighthouse/report-assets/report.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/report-assets/report.js +5032 -0
- package/static/devtools/third_party/lit-html/lit-html-tsconfig.json +22 -0
- package/static/devtools/third_party/lit-html/lit-html.js +120 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.d.ts +28 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.js +101 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.d.ts +22 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.js +37 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/live.d.ts +38 -0
- package/static/devtools/third_party/lit-html/package/directives/live.js +73 -0
- package/static/devtools/third_party/lit-html/package/directives/live.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.d.ts +37 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.js +415 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.d.ts +36 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.js +78 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.d.ts +39 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js +52 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.d.ts +59 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.js +63 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.d.ts +29 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.js +44 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/part.d.ts +46 -0
- package/static/devtools/third_party/lit-html/package/lib/part.js +23 -0
- package/static/devtools/third_party/lit-html/package/lib/part.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.d.ts +148 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.js +476 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/render.d.ts +33 -0
- package/static/devtools/third_party/lit-html/package/lib/render.js +43 -0
- package/static/devtools/third_party/lit-html/package/lib/render.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.d.ts +57 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.js +48 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.d.ts +30 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.js +134 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.d.ts +42 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.js +131 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template.d.ts +92 -0
- package/static/devtools/third_party/lit-html/package/lib/template.js +215 -0
- package/static/devtools/third_party/lit-html/package/lib/template.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lit-html.d.ts +42 -0
- package/static/devtools/third_party/lit-html/package/lit-html.js +59 -0
- package/static/devtools/third_party/lit-html/package/lit-html.js.map +1 -0
- package/static/devtools/third_party/marked/marked-tsconfig.json +8 -0
- package/static/devtools/third_party/marked/marked.js +1 -0
- package/static/devtools/third_party/marked/package/lib/marked.esm.d.ts +1 -0
- package/static/devtools/third_party/marked/package/lib/marked.esm.js +2584 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +53 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.js +64 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts +176 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js +356 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts +21 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +81 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +423 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +516 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +39 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +76 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts +26 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.js +30 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +120 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +266 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +72 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +60 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +181 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +316 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +174 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +647 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +53 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +77 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +33 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +873 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +76 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js +92 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts +25 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.js +33 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +34 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +37 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +59 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +89 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +109 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts +82 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.js +83 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +189 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +313 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +60 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +735 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +962 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +276 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +421 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +128 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +150 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +322 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +463 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +439 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +724 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +62 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +145 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +80 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +262 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +152 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js +31 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +910 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +1343 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts +21 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +135 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +133 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts +24 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.js +0 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +157 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts +61 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.js +72 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +98 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +137 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts +28 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.js +43 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts +47 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +94 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts +40 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.js +403 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +102 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +109 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js +24 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts +17 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js +20 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +288 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +17 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +16 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +39 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +132 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +468 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +40 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +197 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +42 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js +0 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +16 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +469 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +29 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +34 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +31 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +61 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +156 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +183 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +151 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +23 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +19 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js +53 -0
- package/static/devtools/third_party/puppeteer/puppeteer-tsconfig.json +58 -0
- package/static/devtools/third_party/puppeteer/puppeteer.js +1 -0
- package/static/devtools/third_party/wasmparser/package/dist/esm/WasmDis.js +1595 -0
- package/static/devtools/third_party/wasmparser/package/dist/esm/WasmParser.js +3120 -0
- package/static/devtools/third_party/wasmparser/wasmparser-tsconfig.json +9 -0
- package/static/devtools/timeline/timeline-legacy.js +1 -0
- package/static/devtools/timeline/timeline-meta.js +1 -0
- package/static/devtools/timeline/timeline.js +1 -0
- package/static/devtools/timeline/timeline_module.js +1 -0
- package/static/devtools/timeline_model/timeline_model-legacy.js +1 -0
- package/static/devtools/timeline_model/timeline_model.js +1 -0
- package/static/devtools/timeline_model/timeline_model_module.js +0 -0
- package/static/devtools/toolbox.html +20 -0
- package/static/devtools/toolbox.js +1 -0
- package/static/devtools/toolbox_bootstrap/toolbox_bootstrap.js +1 -0
- package/static/devtools/ui/components/components.js +378 -0
- package/static/devtools/ui/ui-legacy.js +1 -0
- package/static/devtools/ui/ui.js +3 -0
- package/static/devtools/ui/utils/utils.js +1 -0
- package/static/devtools/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
- package/static/devtools/wasmparser_worker/wasmparser_worker.js +1 -0
- package/static/devtools/web_audio/graph_visualizer/graph_visualizer.js +1 -0
- package/static/devtools/web_audio/web_audio-legacy.js +1 -0
- package/static/devtools/web_audio/web_audio-meta.js +1 -0
- package/static/devtools/web_audio/web_audio.js +23 -0
- package/static/devtools/web_audio/web_audio_module.js +1 -0
- package/static/devtools/webauthn/webauthn-legacy.js +1 -0
- package/static/devtools/webauthn/webauthn-meta.js +1 -0
- package/static/devtools/webauthn/webauthn.js +6 -0
- package/static/devtools/webauthn/webauthn_module.js +1 -0
- package/static/devtools/worker_app.html +20 -0
- package/static/devtools/worker_app.js +1 -0
- package/static/devtools/worker_main/worker_main-legacy.js +1 -0
- package/static/devtools/worker_main/worker_main.js +1 -0
- package/static/devtools/worker_service/worker_service.js +1 -0
- package/static/devtools/workspace/workspace-legacy.js +1 -0
- package/static/devtools/workspace/workspace.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff-legacy.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff_module.js +0 -0
- package/static/docs/swagger.json +2337 -279
- package/static/function/client.js +1037 -992
- package/build/routes/chromium/http/json-new.js +0 -23
- package/build/routes/chromium/http/json-version-get.response.json +0 -37
- package/build/routes/chromium/utils/cdp.d.ts +0 -2
- package/build/routes/chromium/utils/cdp.js +0 -14
- package/build/routes/chromium/ws/cdp-chromium.js +0 -10
- package/src/routes/chromium/http/json-list.ts +0 -50
- package/src/routes/chromium/utils/cdp.ts +0 -19
- package/build/routes/{chromium/http/content-post.query.json → chrome/http/content.post.query.json} +0 -0
- package/build/routes/{chromium/http/content-post.response.json → chrome/http/content.post.response.json} +0 -0
- package/build/routes/{chromium/http/download-post.body.json → chrome/http/download.post.body.json} +0 -0
- package/build/routes/{chromium/http/download-post.query.json → chrome/http/download.post.query.json} +0 -0
- package/build/routes/{chromium/http/download-post.response.json → chrome/http/download.post.response.json} +0 -0
- package/build/routes/{chromium/http/function-post.body.json → chrome/http/function.post.body.json} +0 -0
- package/build/routes/{chromium/http/function-post.query.json → chrome/http/function.post.query.json} +0 -0
- package/build/routes/{chromium/http/function-post.response.json → chrome/http/function.post.response.json} +0 -0
- package/build/routes/{chromium/http/json-list.response.json → chrome/http/json-list.get.response.json} +0 -0
- package/build/routes/{chromium/http/json-new.response.json → chrome/http/json-new.put.response.json} +0 -0
- package/build/routes/{chromium/http/json-protocol-get.response.json → chrome/http/json-protocol.get.response.json} +0 -0
- package/build/routes/{chromium/http/pdf-post.query.json → chrome/http/pdf.post.query.json} +0 -0
- package/build/routes/{chromium/http/pdf-post.response.json → chrome/http/pdf.post.response.json} +0 -0
- package/build/routes/{chromium/http/performance.body.json → chrome/http/performance.post.body.json} +0 -0
- package/build/routes/{chromium/http/performance.query.json → chrome/http/performance.post.query.json} +0 -0
- package/build/routes/{chromium/http/performance.response.json → chrome/http/performance.post.response.json} +0 -0
- package/build/routes/{chromium/http/scrape-post.query.json → chrome/http/scrape.post.query.json} +0 -0
- package/build/routes/{chromium/http/scrape-post.response.json → chrome/http/scrape.post.response.json} +0 -0
- package/build/routes/{chromium/http/screenshot-post.query.json → chrome/http/screenshot.post.query.json} +0 -0
- package/build/routes/{chromium/http/screenshot-post.response.json → chrome/http/screenshot.post.response.json} +0 -0
- package/build/routes/{chromium/utils/performance/child.d.ts → chrome/tests/content.spec.d.ts} +0 -0
- package/build/routes/{chromium/utils/performance/types.js → chrome/tests/download.spec.d.ts} +0 -0
- package/build/routes/{chromium/ws/cdp-chromium.query.json → chrome/ws/browser.query.json} +0 -0
- package/build/routes/{chromium/ws/playwright-chromium.query.json → chrome/ws/playwright.query.json} +0 -0
- package/build/routes/{firefox/ws/playwright-firefox.query.json → chromium/ws/playwright.query.json} +0 -0
- package/build/routes/{webkit/ws/playwright-webkit.query.json → firefox/ws/playwright.query.json} +0 -0
- package/build/routes/management/http/{config-get.d.ts → config.get.d.ts} +0 -0
- package/build/routes/management/http/{config-get.js → config.get.js} +0 -0
- package/build/routes/management/http/{config-get.response.json → config.get.response.json} +0 -0
- package/build/routes/management/http/{metrics-total-get.d.ts → metrics-total.get.d.ts} +0 -0
- package/build/routes/management/http/{metrics-total-get.js → metrics-total.get.js} +0 -0
- package/build/routes/management/http/{metrics-total-get.response.json → metrics-total.get.response.json} +0 -0
- package/build/routes/management/http/{metrics-get.d.ts → metrics.get.d.ts} +0 -0
- package/build/routes/management/http/{metrics-get.js → metrics.get.js} +0 -0
- package/build/routes/management/http/{metrics-get.response.json → metrics.get.response.json} +0 -0
- package/build/routes/management/http/{sessions-get.d.ts → sessions.get.d.ts} +0 -0
- package/build/routes/management/http/{sessions-get.js → sessions.get.js} +0 -0
- package/build/routes/management/http/{static-get.d.ts → static.get.d.ts} +0 -0
- package/build/{routes/chromium/http/json-protocol-get.d.ts → shared/json-protocol.http.d.ts} +1 -1
- package/build/{routes/chromium/http/json-version-get.d.ts → shared/json-version.http.d.ts} +1 -1
- /package/build/{routes/chromium → shared}/utils/function/client.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/function/client.js +0 -0
- /package/build/{routes/chromium → shared}/utils/function/handler.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/function/handler.js +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/child.js +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/main.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/types.d.ts +0 -0
- /package/src/routes/management/http/{config-get.ts → config.get.ts} +0 -0
- /package/src/routes/management/http/{metrics-total-get.ts → metrics-total.get.ts} +0 -0
- /package/src/routes/management/http/{metrics-get.ts → metrics.get.ts} +0 -0
- /package/src/routes/management/http/{sessions-get.ts → sessions.get.ts} +0 -0
- /package/src/{routes/chromium → shared}/utils/function/client.ts +0 -0
- /package/src/{routes/chromium → shared}/utils/performance/child.ts +0 -0
- /package/src/{routes/chromium → shared}/utils/performance/types.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Settings as e,ParsedURL as t,ObjectWrapper as o,ResourceType as s,EventTarget as r,Console as i,Throttler as n,UIString as a,Revealer as c}from"../common/common.js";import{SDKModel as u,DebuggerModel as d,SourceMapManager as l,ResourceTreeModel as h,RemoteObject as p,CompilerSourceMappingContentProvider as _,CSSModel as g,CSSStyleDeclaration as m,RuntimeModel as f,Script as b,ConsoleModel as S}from"../sdk/sdk.js";import{Workspace as L,UISourceCode as M,FileManager as v}from"../workspace/workspace.js";import{ls as w,StringUtilities as C,MapUtilities as y}from"../platform/platform.js";import{Runtime as I}from"../root/root.js";import{StaticContentProvider as R,TextRange as k,Text as T}from"../text_utils/text_utils.js";class F extends L.ProjectStore{constructor(e,t,o,s,r){super(e,t,o,s),this._contentProviders=new Map,this._isServiceProject=r,this._uiSourceCodeToData=new WeakMap,e.addProject(this)}async requestFileContent(e){const t=this._contentProviders.get(e.url());try{const[e,o]=await Promise.all([t.requestContent(),t.contentEncoded()]);return{content:e.content,isEncoded:o,error:"error"in e&&e.error||""}}catch(e){return{content:null,isEncoded:!1,error:e?String(e):w`Unknown error loading file`}}}isServiceProject(){return this._isServiceProject}async requestMetadata(e){const{metadata:t}=this._uiSourceCodeToData.get(e);return t}canSetFileContent(){return!1}async setFileContent(e,t,o){}fullDisplayName(e){let t=e.parentURL().replace(/^(?:https?|file)\:\/\//,"");try{t=decodeURI(t)}catch(e){}return t+"/"+e.displayName(!0)}mimeType(e){const{mimeType:t}=this._uiSourceCodeToData.get(e);return t}canRename(){return!1}rename(e,t,o){const s=e.url();this.performRename(s,t,function(t,r){if(t&&r){const t=s.split("/");t[t.length-1]=r;const o=t.join("/"),i=this._contentProviders.get(s);this._contentProviders.set(o,i),this._contentProviders.delete(s),this.renameUISourceCode(e,r)}o(t,r)}.bind(this))}excludeFolder(e){}canExcludeFolder(e){return!1}async createFile(e,t,o,s){return null}canCreateFile(){return!1}deleteFile(e){}remove(){}performRename(e,t,o){o(!1)}searchInFileContent(e,t,o,s){return this._contentProviders.get(e.url()).searchInContent(t,o,s)}async findFilesMatchingSearchRequest(e,t,o){const s=[];return o.setTotalWork(t.length),await Promise.all(t.map(async function(t){const r=this._contentProviders.get(t);let i=!0;for(const t of e.queries().slice()){if(!(await r.searchInContent(t,!e.ignoreCase(),e.isRegex())).length){i=!1;break}}i&&s.push(t);o.worked(1)}.bind(this))),o.done(),s}indexContent(e){Promise.resolve().then(e.done.bind(e))}addUISourceCodeWithProvider(e,t,o,s){this._contentProviders.set(e.url(),t),this._uiSourceCodeToData.set(e,{mimeType:s,metadata:o}),this.addUISourceCode(e)}addContentProvider(e,t,o){const s=this.createUISourceCode(e,t.contentType());return this.addUISourceCodeWithProvider(s,t,null,o),s}removeFile(e){this._contentProviders.delete(e),this.removeUISourceCode(e)}reset(){this._contentProviders.clear(),this.removeProject(),this.workspace().addProject(this)}dispose(){this._contentProviders.clear(),this.removeProject()}}var U=Object.freeze({__proto__:null,ContentProviderBasedProject:F});let E;class N{constructor(t){this._debuggerWorkspaceBinding=t,u.TargetManager.instance().addModelListener(d.DebuggerModel,d.Events.GlobalObjectCleared,this._clearCacheIfNeeded.bind(this),this),e.Settings.instance().moduleSetting("skipStackFramesPattern").addChangeListener(this._patternChanged.bind(this)),e.Settings.instance().moduleSetting("skipContentScripts").addChangeListener(this._patternChanged.bind(this)),this._listeners=new Set,this._isIgnoreListedURLCache=new Map,u.TargetManager.instance().observeModels(d.DebuggerModel,this)}static instance(e={forceNew:null,debuggerWorkspaceBinding:null}){const{forceNew:t,debuggerWorkspaceBinding:o}=e;if(!E||t){if(!o)throw new Error("Unable to create settings: targetManager, workspace, and debuggerWorkspaceBinding must be provided: "+(new Error).stack);E=new N(o)}return E}addChangeListener(e){this._listeners.add(e)}removeChangeListener(e){this._listeners.delete(e)}modelAdded(e){this._setIgnoreListPatterns(e);const t=e.sourceMapManager();t.addEventListener(l.Events.SourceMapAttached,this._sourceMapAttached,this),t.addEventListener(l.Events.SourceMapDetached,this._sourceMapDetached,this)}modelRemoved(e){this._clearCacheIfNeeded();const t=e.sourceMapManager();t.removeEventListener(l.Events.SourceMapAttached,this._sourceMapAttached,this),t.removeEventListener(l.Events.SourceMapDetached,this._sourceMapDetached,this)}_clearCacheIfNeeded(){this._isIgnoreListedURLCache.size>1024&&this._isIgnoreListedURLCache.clear()}_getSkipStackFramesPatternSetting(){return e.Settings.instance().moduleSetting("skipStackFramesPattern")}_setIgnoreListPatterns(e){const t=this._getSkipStackFramesPatternSetting().getAsArray(),o=[];for(const e of t)!e.disabled&&e.pattern&&o.push(e.pattern);return e.setBlackboxPatterns(o)}isIgnoreListedUISourceCode(t){if(t.project().type()===L.projectTypes.ContentScripts&&e.Settings.instance().moduleSetting("skipContentScripts").get())return!0;const o=this._uiSourceCodeURL(t);return!!o&&this.isIgnoreListedURL(o)}isIgnoreListedURL(t,o){if(this._isIgnoreListedURLCache.has(t))return Boolean(this._isIgnoreListedURLCache.get(t));if(o&&e.Settings.instance().moduleSetting("skipContentScripts").get())return!0;const s=this._getSkipStackFramesPatternSetting().asRegExp(),r=s&&s.test(t)||!1;return this._isIgnoreListedURLCache.set(t,r),r}_sourceMapAttached(e){const t=e.data.client,o=e.data.sourceMap;this._updateScriptRanges(t,o)}_sourceMapDetached(e){const t=e.data.client;this._updateScriptRanges(t,null)}async _updateScriptRanges(e,t){let o=!1;if(N.instance().isIgnoreListedURL(e.sourceURL,e.isContentScript())||(o=!!t&&t.sourceURLs().some((e=>this.isIgnoreListedURL(e)))),!o)return P.get(e)&&await e.setBlackboxedRanges([])&&P.delete(e),void await this._debuggerWorkspaceBinding.updateLocations(e);if(!t)return;const s=t.mappings(),r=[];if(s.length>0){let e=!1;0===s[0].lineNumber&&0===s[0].columnNumber||(r.push({lineNumber:0,columnNumber:0}),e=!0);for(const t of s)t.sourceURL&&e!==this.isIgnoreListedURL(t.sourceURL)&&(r.push({lineNumber:t.lineNumber,columnNumber:t.columnNumber}),e=!e)}!function(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(e[o].lineNumber!==t[o].lineNumber||e[o].columnNumber!==t[o].columnNumber)return!1;return!0}(P.get(e)||[],r)&&await e.setBlackboxedRanges(r)&&P.set(e,r),this._debuggerWorkspaceBinding.updateLocations(e)}_uiSourceCodeURL(e){return e.project().type()===L.projectTypes.Debugger?null:e.url()}canIgnoreListUISourceCode(e){const t=this._uiSourceCodeURL(e);return!!t&&Boolean(this._urlToRegExpString(t))}ignoreListUISourceCode(e){const t=this._uiSourceCodeURL(e);t&&this._ignoreListURL(t)}unIgnoreListUISourceCode(e){const t=this._uiSourceCodeURL(e);t&&this._unIgnoreListURL(t)}ignoreListContentScripts(){e.Settings.instance().moduleSetting("skipContentScripts").set(!0)}unIgnoreListContentScripts(){e.Settings.instance().moduleSetting("skipContentScripts").set(!1)}_ignoreListURL(e){const t=this._getSkipStackFramesPatternSetting().getAsArray(),o=this._urlToRegExpString(e);if(!o)return;let s=!1;for(let e=0;e<t.length;++e){const r=t[e];if(r.pattern===o){r.disabled=!1,s=!0;break}}s||t.push({pattern:o,disabled:void 0}),this._getSkipStackFramesPatternSetting().setAsArray(t)}_unIgnoreListURL(e){let t=this._getSkipStackFramesPatternSetting().getAsArray();const o=N.instance()._urlToRegExpString(e);if(o){t=t.filter((function(e){return e.pattern!==o}));for(let o=0;o<t.length;++o){const s=t[o];if(!s.disabled)try{new RegExp(s.pattern).test(e)&&(s.disabled=!0)}catch(e){}}this._getSkipStackFramesPatternSetting().setAsArray(t)}}async _patternChanged(){this._isIgnoreListedURLCache.clear();const e=[];for(const t of u.TargetManager.instance().models(d.DebuggerModel)){e.push(this._setIgnoreListPatterns(t));const o=t.sourceMapManager();for(const s of t.scripts())e.push(this._updateScriptRanges(s,o.sourceMapForClient(s)))}await Promise.all(e);const t=Array.from(this._listeners);for(const e of t)e();this._patternChangeFinishedForTests()}_patternChangeFinishedForTests(){}_urlToRegExpString(e){const o=new t.ParsedURL(e);if(o.isAboutBlank()||o.isDataURL())return"";if(!o.isValid)return"^"+C.escapeForRegExp(e)+"$";let s=o.lastPathComponent;if(s?s="/"+s:o.folderPathComponents&&(s=o.folderPathComponents+"/"),s||(s=o.host),!s)return"";const r=o.scheme;let i="";return r&&"http"!==r&&"https"!==r&&(i="^"+r+"://","chrome-extension"===r&&(i+=o.host+"\\b"),i+=".*"),i+C.escapeForRegExp(s)+(e.endsWith(s)?"$":"\\b")}}const P=new WeakMap;var j=Object.freeze({__proto__:null,IgnoreListManager:N,SourceRange:undefined});const A=new WeakMap,B=new WeakMap;let D;class O extends o.ObjectWrapper{constructor(){super()}static instance({forceNew:e}={forceNew:!1}){return D&&!e||(D=new O),D}}const x={FrameAttributionAdded:Symbol("FrameAttributionAdded"),FrameAttributionRemoved:Symbol("FrameAttributionRemoved")};class W{static _resolveFrame(e,t){const o=W.targetForUISourceCode(e),s=o&&o.model(h.ResourceTreeModel);return s?s.frameForId(t):null}static setInitialFrameAttribution(e,t){const o=W._resolveFrame(e,t);if(!o)return;const s=new Map;s.set(t,{frame:o,count:1}),A.set(e,s)}static cloneInitialFrameAttribution(e,t){const o=A.get(e);if(!o)return;const s=new Map;for(const e of o.keys()){const t=o.get(e);void 0!==t&&s.set(e,{frame:t.frame,count:t.count})}A.set(t,s)}static addFrameAttribution(e,t){const o=W._resolveFrame(e,t);if(!o)return;const s=A.get(e);if(!s)return;const r=s.get(t)||{frame:o,count:0};if(r.count+=1,s.set(t,r),1!==r.count)return;const i={uiSourceCode:e,frame:o};O.instance().dispatchEventToListeners(x.FrameAttributionAdded,i)}static removeFrameAttribution(e,t){const o=A.get(e);if(!o)return;const s=o.get(t);if(console.assert(Boolean(s),"Failed to remove frame attribution for url: "+e.url()),!s)return;if(s.count-=1,s.count>0)return;o.delete(t);const r={uiSourceCode:e,frame:s.frame};O.instance().dispatchEventToListeners(x.FrameAttributionRemoved,r)}static targetForUISourceCode(e){return B.get(e.project())||null}static setTargetForProject(e,t){B.set(e,t)}static getTargetForProject(e){return B.get(e)||null}static framesForUISourceCode(e){const t=W.targetForUISourceCode(e),o=t&&t.model(h.ResourceTreeModel),s=A.get(e);if(!o||!s)return[];return Array.from(s.keys()).map((e=>o.frameForId(e))).filter((e=>Boolean(e)))}}var z=Object.freeze({__proto__:null,NetworkProjectManager:O,Events:x,NetworkProject:W});class V{constructor(e,t,o){this._debuggerModel=e,this._sourceMapManager=this._debuggerModel.sourceMapManager(),this._workspace=t,this._debuggerWorkspaceBinding=o;const s=e.target();this._regularProject=new F(t,"jsSourceMaps::"+s.id(),L.projectTypes.Network,"",!1),this._contentScriptsProject=new F(t,"jsSourceMaps:extensions:"+s.id(),L.projectTypes.ContentScripts,"",!1),W.setTargetForProject(this._regularProject,s),W.setTargetForProject(this._contentScriptsProject,s),this._regularBindings=new Map,this._contentScriptsBindings=new Map,this._stubUISourceCodes=new Map,this._stubProject=new F(t,"jsSourceMaps:stub:"+s.id(),L.projectTypes.Service,"",!0),this._eventListeners=[this._sourceMapManager.addEventListener(l.Events.SourceMapWillAttach,(e=>{this._sourceMapWillAttach(e)}),this),this._sourceMapManager.addEventListener(l.Events.SourceMapFailedToAttach,(e=>{this._sourceMapFailedToAttach(e)}),this),this._sourceMapManager.addEventListener(l.Events.SourceMapAttached,(e=>{this._sourceMapAttached(e)}),this),this._sourceMapManager.addEventListener(l.Events.SourceMapDetached,(e=>{this._sourceMapDetached(e)}),this)]}_addStubUISourceCode(e){const t=this._stubProject.addContentProvider(e.sourceURL+":sourcemap",R.StaticContentProvider.fromString(e.sourceURL,s.resourceTypes.Script,"\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source map is being loaded!"),"text/javascript");this._stubUISourceCodes.set(e,t)}async _removeStubUISourceCode(e){const t=this._stubUISourceCodes.get(e);this._stubUISourceCodes.delete(e),t&&this._stubProject.removeFile(t.url()),await this._debuggerWorkspaceBinding.updateLocations(e)}static uiSourceCodeOrigin(e){const t=H.get(e);return t?t.compiledURL():null}mapsToSourceCode(e){const t=e.script(),o=t?this._sourceMapManager.sourceMapForClient(t):null;if(!o)return!0;const s=o.findEntry(e.lineNumber,e.columnNumber);return null!==s&&s.lineNumber===e.lineNumber&&s.columnNumber===e.columnNumber}uiSourceCodeForURL(e,t){return t?this._contentScriptsProject.uiSourceCodeForURL(e):this._regularProject.uiSourceCodeForURL(e)}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const o=e.lineNumber-t.lineOffset;let s=e.columnNumber;o||(s-=t.columnOffset);const r=this._stubUISourceCodes.get(t);if(r)return new M.UILocation(r,o,s);const i=this._sourceMapManager.sourceMapForClient(t);if(!i)return null;const n=i.findEntry(o,s);if(!n||!n.sourceURL)return null;const a=t.isContentScript()?this._contentScriptsProject.uiSourceCodeForURL(n.sourceURL):this._regularProject.uiSourceCodeForURL(n.sourceURL);return a?a.uiLocation(n.sourceLineNumber,n.sourceColumnNumber):null}uiLocationToRawLocations(e,t,o){const s=H.get(e);if(!s)return[];const r=this._sourceMapManager.clientsForSourceMap(s);if(!r.length)return[];const i=s.sourceLineMapping(e.url(),t,o);return i?r.map((e=>this._debuggerModel.createRawLocation(e,i.lineNumber+e.lineOffset,i.lineNumber?i.columnNumber:i.columnNumber+e.columnOffset))):[]}async _sourceMapWillAttach(e){const t=e.data;this._addStubUISourceCode(t),await this._debuggerWorkspaceBinding.updateLocations(t)}async _sourceMapFailedToAttach(e){const t=e.data;await this._removeStubUISourceCode(t)}async _sourceMapAttached(e){const t=e.data.client,o=e.data.sourceMap;await this._removeStubUISourceCode(t),N.instance().isIgnoreListedURL(t.sourceURL,t.isContentScript())||await this._populateSourceMapSources(t,o),this._sourceMapAttachedForTest(o)}async _sourceMapDetached(e){const t=e.data.client,o=e.data.sourceMap,s=t.isContentScript()?this._contentScriptsBindings:this._regularBindings;for(const e of o.sourceURLs()){const r=s.get(e);r&&(r.removeSourceMap(o,t.frameId),r._uiSourceCode||s.delete(e))}await this._debuggerWorkspaceBinding.updateLocations(t)}sourceMapForScript(e){return this._sourceMapManager.sourceMapForClient(e)}scriptsForUISourceCode(e){const t=H.get(e);return t?this._sourceMapManager.clientsForSourceMap(t):[]}_sourceMapAttachedForTest(e){}async _populateSourceMapSources(e,t){const o=e.isContentScript()?this._contentScriptsProject:this._regularProject,s=e.isContentScript()?this._contentScriptsBindings:this._regularBindings;for(const r of t.sourceURLs()){let i=s.get(r);i||(i=new $(o,r),s.set(r,i)),i.addSourceMap(t,e.frameId)}await this._debuggerWorkspaceBinding.updateLocations(e)}static uiLineHasMapping(e,t){const o=H.get(e);return!o||Boolean(o.sourceLineMapping(e.url(),t,0))}dispose(){r.EventTarget.removeEventListeners(this._eventListeners),this._regularProject.dispose(),this._contentScriptsProject.dispose(),this._stubProject.dispose()}}const H=new WeakMap;class ${constructor(e,t){this._project=e,this._url=t,this._referringSourceMaps=[],this._activeSourceMap=null,this._uiSourceCode=null}_recreateUISourceCodeIfNeeded(e){const t=this._referringSourceMaps[this._referringSourceMaps.length-1];if(!t||this._activeSourceMap===t)return;this._activeSourceMap=t;const o=this._project.createUISourceCode(this._url,s.resourceTypes.SourceMapScript);H.set(o,t);const r=t.sourceContentProvider(this._url,s.resourceTypes.SourceMapScript),i=s.ResourceType.mimeFromURL(this._url)||"text/javascript",n=t.embeddedContentByURL(this._url),a="string"==typeof n?new M.UISourceCodeMetadata(null,n.length):null;this._uiSourceCode?(W.cloneInitialFrameAttribution(this._uiSourceCode,o),this._project.removeFile(this._uiSourceCode.url())):W.setInitialFrameAttribution(o,e),this._uiSourceCode=o,this._project.addUISourceCodeWithProvider(this._uiSourceCode,r,a,i)}addSourceMap(e,t){this._uiSourceCode&&W.addFrameAttribution(this._uiSourceCode,t),this._referringSourceMaps.push(e),this._recreateUISourceCodeIfNeeded(t)}removeSourceMap(e,t){const o=this._uiSourceCode;W.removeFrameAttribution(o,t);const s=this._referringSourceMaps.lastIndexOf(e);-1!==s&&this._referringSourceMaps.splice(s,1),this._referringSourceMaps.length?this._recreateUISourceCodeIfNeeded(t):(this._project.removeFile(o.url()),this._uiSourceCode=null)}}var G=Object.freeze({__proto__:null,CompilerScriptMapping:V});class q{constructor(e,t,o){this.typeInfo=e,this.members=t,this.typeMap=o}static create(e){if(0===e.length)return null;const t=new Map;for(const o of e)t.set(o.typeId,new q(o,[],t));for(const o of t.values())o.members=o.typeInfo.members.map((({typeId:o})=>{const s=t.get(o);if(!s)throw new Error("Incomplete type information for type "+(e[0].typeNames[0]||"<anonymous>"));return s}));return t.get(e[0].typeId)||null}}function J(e){return`${e.sourceURL}@${e.hash}`}function K(e){const{script:t}=e;return{rawModuleId:J(t),codeOffset:e.location().columnNumber-(t.codeOffset()||0),inlineFrameIndex:e.inlineFrameIndex}}async function Q(e,t,o,s){const r=K(e);let i;try{i=await t.getTypeInfo(o,r)}catch(t){Z.throwLocal(e,t.message)}if(!i)return new p.LocalJSONObject(void 0);const{base:n,typeInfos:a}=i,c=q.create(a);return c?c.typeInfo.hasValue&&!c.typeInfo.canExpand&&n?X(e,t,c,n,[],s):new ee(e,t,c,n,[],s):new p.LocalJSONObject(void 0)}async function X(e,t,o,s,r,i){const n=K(e);let a=await t.getFormatter({base:s,field:r},n);a||(a={js:""});const c=await e.debuggerModel.target().debuggerAgent().invoke_evaluateOnCallFrame({callFrameId:e.id,expression:a.js,objectGroup:i.objectGroup,includeCommandLineAPI:i.includeCommandLineAPI,silent:i.silent,returnByValue:i.returnByValue,generatePreview:i.generatePreview,throwOnSideEffect:i.throwOnSideEffect,timeout:i.timeout}),u=c.getError();if(u)throw new Error(u);const{result:d,exceptionDetails:l}=c;if(l)throw new Z(e.debuggerModel.runtimeModel().createRemoteObject(d),l);const h=new Y(e,o,t,d,null,i),p=await async function(e){const{tag:t,value:o}=await e.findProperties("tag","value");if(!t||!o)return null;const{className:s,symbol:r}=await t.findProperties("className","symbol");if(!s||!r)return null;const i=s.value;if("string"!=typeof i||void 0===r.objectId)return null;return o.formatterTag={symbol:r.objectId,className:i},o}(h)||h;return void 0===p.value&&"undefined"!==p.type&&(p.description=o.typeInfo.typeNames[0]),p}class Y extends p.RemoteObjectImpl{constructor(e,t,o,s,r,i){super(e.debuggerModel.runtimeModel(),s.objectId,s.type,s.subtype,s.value,s.unserializableValue,s.description,s.preview,s.customPreview,s.className),this._plugin=o,this._sourceType=t,this._callFrame=e,this.formatterTag=r,this._evalOptions=i}async findProperties(...e){const t={};for(const o of(await this.getOwnProperties(!1)).properties||[])e.indexOf(o.name)>=0&&o.value&&(t[o.name]=o.value);return t}async _createRemoteObject(e){const t=await this._getEvalBaseFromObject(e);if(!t)return new Y(this._callFrame,this._sourceType,this._plugin,e,this.formatterTag,this._evalOptions);const o=this._sourceType.typeMap.get(t.rootType.typeId);if(!o)throw new Error("Unknown typeId in eval base");return t.rootType.hasValue&&!t.rootType.canExpand&&t?X(this._callFrame,this._plugin,o,t,[],this._evalOptions):new ee(this._callFrame,this._plugin,o,t,[],this._evalOptions)}async _getEvalBaseFromObject(e){const{objectId:t}=e;if(!e||!this.formatterTag)return null;const{className:o,symbol:s}=this.formatterTag;if(o!==e.className)return null;const r=await this.debuggerModel().target().runtimeAgent().invoke_callFunctionOn({functionDeclaration:"function(sym) { return this[sym]; }",objectId:t,arguments:[{objectId:s}]}),{result:i}=r;if(!i||"undefined"===i.type)return null;const n=new Y(this._callFrame,this._sourceType,this._plugin,i,null,this._evalOptions),{payload:a,rootType:c}=await n.findProperties("payload","rootType");if(void 0===a||void 0===c)return null;const u=await async function(e,t){if(void 0!==t.value)return t.value;const o=await e.debuggerModel.target().runtimeAgent().invoke_callFunctionOn({functionDeclaration:"function() { return this; }",objectId:t.objectId,returnByValue:!0}),{result:s}=o;return s?s.value:void 0}(this._callFrame,a),{typeId:d}=await c.findProperties("typeId","rootType");if(void 0===u||void 0===d)return null;const l=this._sourceType.typeMap.get(d.value);return l?{payload:u,rootType:l.typeInfo}:null}}class Z extends Error{constructor(e,t){const{description:o}=t.exception||{};super(o||t.text),this.exception=e,this.exceptionDetails=t}static throwLocal(e,t){const o={type:Protocol.Runtime.RemoteObjectType.Object,subtype:Protocol.Runtime.RemoteObjectSubtype.Error,description:t},s={text:"Uncaught",exceptionId:-1,columnNumber:0,lineNumber:0,exception:o},r=e.debuggerModel.runtimeModel().createRemoteObject(o);throw new Z(r,s)}}class ee extends p.RemoteObjectImpl{constructor(e,t,o,s,r,i){const n=o.typeInfo.typeNames[0]||"<anonymous>",a="object";super(e.debuggerModel.runtimeModel(),void 0,a,void 0,null,void 0,n,void 0,void 0,n),this._variableType=a,this._callFrame=e,this._plugin=t,this._sourceType=o,this._base=s,this._fieldChain=r,this._hasChildren=!0,this._evalOptions=i}get type(){return this._variableType}async _expandMember(e,t){return e.typeInfo.hasValue&&!e.typeInfo.canExpand&&this._base?X(this._callFrame,this._plugin,e,this._base,this._fieldChain.concat(t),this._evalOptions):new ee(this._callFrame,this._plugin,e,this._base,this._fieldChain.concat(t),this._evalOptions)}async doGetProperties(e,t,o){const{typeInfo:s}=this._sourceType;if(t||!s.canExpand)return{properties:[],internalProperties:[]};if(s.members.length>0){if(s.arraySize>0){const{typeId:e}=this._sourceType.typeInfo.members[0],t=[],o=this._sourceType.members[0];for(let r=0;r<s.arraySize;++r){const s=""+r,i={name:s,typeId:e,offset:o.typeInfo.size*r};t.push(new p.RemoteObjectProperty(s,await this._expandMember(o,i),!1,!1,!0,!1))}return{properties:t,internalProperties:[]}}const e=Promise.all(this._sourceType.members.map((async(e,t)=>{const o=this._sourceType.typeInfo.members[t],s=await this._expandMember(e,o),r=o.name||"";return new p.RemoteObjectProperty(r,s,!1,!1,!0,!1)})));return{properties:await e,internalProperties:[]}}return{properties:[],internalProperties:[]}}}class te extends p.LocalJSONObject{constructor(e){super(e)}get description(){return this.type}get type(){return"namespace"}}class oe extends p.RemoteObjectImpl{constructor(e,t,o){super(e.debuggerModel.runtimeModel(),void 0,"object",void 0,null),this.variables=[],this._callFrame=e,this._plugin=t,this._location=o}async doGetProperties(e,t,o){if(t)return{properties:[],internalProperties:[]};const s=[],r={};function i(e,t){return new p.RemoteObjectProperty(e,t,!1,!1,!0,!1)}for(const e of this.variables){let t;try{t=await Q(this._callFrame,this._plugin,e.name,{generatePreview:!1,includeCommandLineAPI:!0,objectGroup:"backtrace",returnByValue:!1,silent:!1})}catch(e){console.warn(e),t=new p.LocalJSONObject(void 0)}if(e.nestedName&&e.nestedName.length>1){let o=r;for(let t=0;t<e.nestedName.length-1;t++){const s=e.nestedName[t];let r=o[s];r||(r=new te({}),o[s]=r),o=r.value}o[e.nestedName[e.nestedName.length-1]]=t}else s.push(i(e.name,t))}for(const e in r)s.push(i(e,r[e]));return{properties:s,internalProperties:[]}}}class se{constructor(e,t,o,s,r,i){this._callFrame=e,this._type=t,this._typeName=o,this._icon=s,this._object=new oe(e,r,i),this._name=t,this._startLocation=null,this._endLocation=null}async getVariableValue(e){for(let t=0;t<this._object.variables.length;++t){if(this._object.variables[t].name!==e)continue;const o=await this._object.getAllProperties(!1,!1);if(!o.properties)continue;const{value:s}=o.properties[t];if(s)return s}return null}callFrame(){return this._callFrame}type(){return this._type}typeName(){return this._typeName}name(){}startLocation(){return this._startLocation}endLocation(){return this._endLocation}object(){return this._object}description(){return""}icon(){return this._icon}}class re{constructor(e,t,o){this._workspace=t,this._debuggerWorkspaceBinding=o,this._plugins=[],this._debuggerModelToData=new Map,e.observeModels(d.DebuggerModel,this),this._rawModuleHandles=new Map}async _evaluateOnCallFrame(e,t){const{script:o}=e,{expression:s}=t,{plugin:r}=await this._rawModuleIdAndPluginForScript(o);if(!r)return null;const i=K(e);if(0===(await r.rawLocationToSourceLocation(i)).length)return null;try{return{object:await Q(e,r,s,t),exceptionDetails:void 0}}catch(e){if(e instanceof Z){const{exception:t,exceptionDetails:o}=e;return{object:t,exceptionDetails:o}}return{error:e.message}}}_expandCallFrames(e){return Promise.all(e.map((async e=>{const{frames:t}=await this.getFunctionInfo(e);return t.length?t.map((({name:t},o)=>e.createVirtualCallFrame(o,t))):e}))).then((e=>e.flat()))}modelAdded(e){this._debuggerModelToData.set(e,new ie(e,this._workspace)),e.addEventListener(d.Events.GlobalObjectCleared,this._globalObjectCleared,this),e.addEventListener(d.Events.ParsedScriptSource,this._parsedScriptSource,this),e.setEvaluateOnCallFrameCallback(this._evaluateOnCallFrame.bind(this)),e.setExpandCallFramesCallback(this._expandCallFrames.bind(this))}modelRemoved(e){e.removeEventListener(d.Events.GlobalObjectCleared,this._globalObjectCleared,this),e.removeEventListener(d.Events.ParsedScriptSource,this._parsedScriptSource,this),e.setEvaluateOnCallFrameCallback(null),e.setExpandCallFramesCallback(null);const t=this._debuggerModelToData.get(e);t&&(t._dispose(),this._debuggerModelToData.delete(e)),this._rawModuleHandles.forEach(((t,o)=>{const s=t.scripts.filter((t=>t.debuggerModel!==e));0===s.length?(t.plugin.removeRawModule(o).catch((e=>{i.Console.instance().error(w`Error in debugger language plugin: ${e.message}`)})),this._rawModuleHandles.delete(o)):t.scripts=s}))}_globalObjectCleared(e){const t=e.data;this.modelRemoved(t),this.modelAdded(t)}addPlugin(e){this._plugins.push(e);for(const e of this._debuggerModelToData.keys())for(const t of e.scripts())this.hasPluginForScript(t)||this._parsedScriptSource({data:t})}removePlugin(e){this._plugins=this._plugins.filter((t=>t!==e));const t=new Set;this._rawModuleHandles.forEach(((o,s)=>{o.plugin===e&&(o.scripts.forEach((e=>t.add(e))),this._rawModuleHandles.delete(s))}));for(const e of t){this._debuggerModelToData.get(e.debuggerModel)._removeScript(e),this._parsedScriptSource({data:e})}}hasPluginForScript(e){const t=J(e),o=this._rawModuleHandles.get(t);return void 0!==o&&o.scripts.includes(e)}async _rawModuleIdAndPluginForScript(e){const t=J(e),o=this._rawModuleHandles.get(t);return o&&(await o.addRawModulePromise,o===this._rawModuleHandles.get(t))?{rawModuleId:t,plugin:o.plugin}:{rawModuleId:t,plugin:null}}async rawLocationToUILocation(e){const t=e.script();if(!t)return null;const{rawModuleId:o,plugin:s}=await this._rawModuleIdAndPluginForScript(t);if(!s)return null;const r={rawModuleId:o,codeOffset:e.columnNumber-(t.codeOffset()||0),inlineFrameIndex:e.inlineFrameIndex};try{const e=await s.rawLocationToSourceLocation(r);for(const o of e){const e=this._debuggerModelToData.get(t.debuggerModel);if(!e)continue;const s=e._project.uiSourceCodeForURL(o.sourceFileURL);if(s)return s.uiLocation(o.lineNumber,o.columnNumber>=0?o.columnNumber:void 0)}}catch(e){i.Console.instance().error(w`Error in debugger language plugin: ${e.message}`)}return null}uiLocationToRawLocationRanges(e,t,o=-1){const s=[];return this.scriptsForUISourceCode(e).forEach((r=>{const i=J(r),n=this._rawModuleHandles.get(i);if(!n)return;const{plugin:a}=n;s.push(async function(s,r,i){const n={rawModuleId:s,sourceFileURL:e.url(),lineNumber:t,columnNumber:o},a=await r.sourceLocationToRawLocation(n);if(!a)return[];return a.map((e=>({start:new d.Location(i.debuggerModel,i.scriptId,0,Number(e.startOffset)+(i.codeOffset()||0)),end:new d.Location(i.debuggerModel,i.scriptId,0,Number(e.endOffset)+(i.codeOffset()||0))})))}(i,a,r))})),0===s.length?Promise.resolve(null):Promise.all(s).then((e=>e.flat())).catch((e=>(i.Console.instance().error(w`Error in debugger language plugin: ${e.message}`),null)))}async uiLocationToRawLocations(e,t,o){const s=await this.uiLocationToRawLocationRanges(e,t,o);return s?s.map((({start:e})=>e)):null}scriptsForUISourceCode(e){for(const t of this._debuggerModelToData.values()){const o=t._uiSourceCodeToScripts.get(e);if(o)return o}return[]}_parsedScriptSource(e){const t=e.data;if(t.sourceURL)for(const e of this._plugins){if(!e.handleScript(t))return;const o=J(t);let s=this._rawModuleHandles.get(o);if(s)s.scripts.push(t);else{const r=(async()=>{const r=i.Console.instance(),n=t.sourceURL,a=t.debugSymbols&&t.debugSymbols.externalURL||"";a?r.log(w`[${e.name}] Loading debug symbols for ${n} (via ${a})...`):r.log(w`[${e.name}] Loading debug symbols for ${n}...`);try{const i=!a&&n.startsWith("wasm://")?await t.getWasmBytecode():void 0,c=await e.addRawModule(o,a,{url:n,code:i});return s!==this._rawModuleHandles.get(o)?[]:(0===c.length?r.warn(w`[${e.name}] Loaded debug symbols for ${n}, but didn't find any source files`):r.log(w`[${e.name}] Loaded debug symbols for ${n}, found ${c.length} source file(s)`),c)}catch(t){return r.error(w`[${e.name}] Failed to load debug symbols for ${n} (${t.message})`),this._rawModuleHandles.delete(o),[]}})();s={rawModuleId:o,plugin:e,scripts:[t],addRawModulePromise:r},this._rawModuleHandles.set(o,s)}return void s.addRawModulePromise.then((e=>{if(t.debuggerModel.scriptForId(t.scriptId)===t){const o=this._debuggerModelToData.get(t.debuggerModel);o&&(o._addSourceFiles(t,e),this._debuggerWorkspaceBinding.updateLocations(t))}}))}}async resolveScopeChain(e){const t=e.script,{rawModuleId:o,plugin:s}=await this._rawModuleIdAndPluginForScript(t);if(!s)return null;const r={rawModuleId:o,codeOffset:e.location().columnNumber-(t.codeOffset()||0),inlineFrameIndex:e.inlineFrameIndex};try{if(0===(await s.rawLocationToSourceLocation(r)).length)return null;const t=new Map,o=await s.listVariablesInScope(r);for(const i of o||[]){let o=t.get(i.scope);if(!o){const{type:n,typeName:a,icon:c}=await s.getScopeInfo(i.scope);o=new se(e,n,a,c,s,r),t.set(i.scope,o)}o.object().variables.push(i)}return Array.from(t.values())}catch(e){return i.Console.instance().error(w`Error in debugger language plugin: ${e.message}`),null}}async getFunctionInfo(e){const t={frames:[]};if(!e)return t;const o=e.script,{rawModuleId:s,plugin:r}=await this._rawModuleIdAndPluginForScript(o);if(!r)return t;const n={rawModuleId:s,codeOffset:e.location().columnNumber-(o.codeOffset()||0)};try{return await r.getFunctionInfo(n)}catch(e){return i.Console.instance().warn(w`Error in debugger language plugin: ${e.message}`),t}}async getInlinedFunctionRanges(e){const t=e.script();if(!t)return[];const{rawModuleId:o,plugin:s}=await this._rawModuleIdAndPluginForScript(t);if(!s)return[];const r={rawModuleId:o,codeOffset:e.columnNumber-(t.codeOffset()||0)};try{return(await s.getInlinedFunctionRanges(r)).map((e=>({start:new d.Location(t.debuggerModel,t.scriptId,0,Number(e.startOffset)+(t.codeOffset()||0)),end:new d.Location(t.debuggerModel,t.scriptId,0,Number(e.endOffset)+(t.codeOffset()||0))})))}catch(e){return i.Console.instance().warn(w`Error in debugger language plugin: ${e.message}`),[]}}async getInlinedCalleesRanges(e){const t=e.script();if(!t)return[];const{rawModuleId:o,plugin:s}=await this._rawModuleIdAndPluginForScript(t);if(!s)return[];const r={rawModuleId:o,codeOffset:e.columnNumber-(t.codeOffset()||0)};try{return(await s.getInlinedCalleesRanges(r)).map((e=>({start:new d.Location(t.debuggerModel,t.scriptId,0,Number(e.startOffset)+(t.codeOffset()||0)),end:new d.Location(t.debuggerModel,t.scriptId,0,Number(e.endOffset)+(t.codeOffset()||0))})))}catch(e){return i.Console.instance().warn(w`Error in debugger language plugin: ${e.message}`),[]}}async getMappedLines(e){const t=await Promise.all(this.scriptsForUISourceCode(e).map((e=>this._rawModuleIdAndPluginForScript(e))));let o;for(const{rawModuleId:s,plugin:r}of t){if(!r)continue;const t=await r.getMappedLines(s,e.url());void 0!==t&&(void 0===o?o=new Set(t):t.forEach((e=>o.add(e))))}return o}}class ie{constructor(e,t){this._debuggerModel=e,this._project=new F(t,"language_plugins::"+e.target().id(),L.projectTypes.Network,"",!1),W.setTargetForProject(this._project,e.target()),this._uiSourceCodeToScripts=new Map}_addSourceFiles(e,t){const o=e.createPageResourceLoadInitiator();for(const r of t){let t=this._project.uiSourceCodeForURL(r);if(t){const o=this._uiSourceCodeToScripts.get(t);o.includes(e)||o.push(e)}else{t=this._project.createUISourceCode(r,s.resourceTypes.SourceMapScript),W.setInitialFrameAttribution(t,e.frameId),this._uiSourceCodeToScripts.set(t,[e]);const i=new _.CompilerSourceMappingContentProvider(r,s.resourceTypes.SourceMapScript,o),n=s.ResourceType.mimeFromURL(r)||"text/javascript";this._project.addUISourceCodeWithProvider(t,i,null,n)}}}_removeScript(e){this._uiSourceCodeToScripts.forEach(((t,o)=>{0===(t=t.filter((t=>t!==e))).length?(this._uiSourceCodeToScripts.delete(o),this._project.removeUISourceCode(o.url())):this._uiSourceCodeToScripts.set(o,t)}))}_dispose(){this._project.dispose()}}var ne=Object.freeze({__proto__:null,SourceScope:se,DebuggerLanguagePluginManager:re,RawModule:undefined,RawLocationRange:undefined,RawLocation:undefined,SourceLocation:undefined,Variable:undefined,VariableValue:undefined,EvaluatorModule:undefined,ScopeInfo:undefined,FunctionInfo:undefined,FieldInfo:undefined,TypeInfo:undefined,EvalBase:undefined,DebuggerLanguagePlugin:class{constructor(e){this.name=e}handleScript(e){throw new Error("Not implemented yet")}dispose(){}async addRawModule(e,t,o){throw new Error("Not implemented yet")}async sourceLocationToRawLocation(e){throw new Error("Not implemented yet")}async rawLocationToSourceLocation(e){throw new Error("Not implemented yet")}async getScopeInfo(e){throw new Error("Not implemented yet")}async listVariablesInScope(e){throw new Error("Not implemented yet")}async evaluateVariable(e,t){throw new Error("Not implemented yet")}removeRawModule(e){throw new Error("Not implemented yet")}getTypeInfo(e,t){throw new Error("Not implemented yet")}getFormatter(e,t){throw new Error("Not implemented yet")}async getFunctionInfo(e){throw new Error("Not implemented yet")}async getInlinedFunctionRanges(e){throw new Error("Not implemented yet")}async getInlinedCalleesRanges(e){throw new Error("Not implemented yet")}async getMappedLines(e,t){throw new Error("Not implemented yet")}}});const ae=new WeakMap,ce=new WeakMap;class ue{constructor(e,t,o){this._debuggerModel=e,this._debuggerWorkspaceBinding=o,this._project=new F(t,"debugger:"+e.target().id(),L.projectTypes.Debugger,"",!0),this._eventListeners=[e.addEventListener(d.Events.GlobalObjectCleared,this._debuggerReset,this),e.addEventListener(d.Events.ParsedScriptSource,this._parsedScriptSource,this),e.addEventListener(d.Events.DiscardedAnonymousScriptSource,this._discardedScriptSource,this)],this._uiSourceCodeToScriptsMap=new WeakMap}static scriptForUISourceCode(e){const t=ae.get(e);return t?t.values().next().value:null}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const o=ce.get(t);if(!o)return null;const s=e.lineNumber-(t.isInlineScriptWithSourceURL()?t.lineOffset:0);let r=e.columnNumber||0;return t.isInlineScriptWithSourceURL()&&!s&&r&&(r-=t.columnOffset),o.uiLocation(s,r)}uiLocationToRawLocations(e,t,o){const s=this._uiSourceCodeToScriptsMap.get(e);return s?s.isInlineScriptWithSourceURL()?[this._debuggerModel.createRawLocation(s,t+s.lineOffset,t?o:o+s.columnOffset)]:[this._debuggerModel.createRawLocation(s,t,o)]:[]}_parsedScriptSource(e){const o=e.data,r=t.ParsedURL.extractName(o.sourceURL),i="debugger:///VM"+o.scriptId+(r?" "+r:""),n=this._project.createUISourceCode(i,s.resourceTypes.Script);this._uiSourceCodeToScriptsMap.set(n,o);const a=ae.get(n);a?a.add(o):ae.set(n,new Set([o])),ce.set(o,n),this._project.addUISourceCodeWithProvider(n,o,null,"text/javascript"),this._debuggerWorkspaceBinding.updateLocations(o)}_discardedScriptSource(e){const t=e.data,o=ce.get(t);if(!o)return;ce.delete(t),this._uiSourceCodeToScriptsMap.delete(o);const s=ae.get(o);s&&(s.delete(t),s.size||ae.delete(o)),this._project.removeUISourceCode(o.url())}_debuggerReset(){this._project.reset()}dispose(){r.EventTarget.removeEventListeners(this._eventListeners),this._debuggerReset(),this._project.dispose()}}var de=Object.freeze({__proto__:null,DefaultScriptMapping:ue});class le{constructor(e,t){this._updateDelegate=e,this._locationPool=t,this._locationPool._add(this),this._updatePromise=null}async update(){this._updateDelegate&&(this._updatePromise?await this._updatePromise.then((()=>this.update())):(this._updatePromise=this._updateDelegate(this),await this._updatePromise,this._updatePromise=null))}async uiLocation(){throw"Not implemented"}dispose(){this._locationPool._delete(this),this._updateDelegate=null}async isIgnoreListed(){throw"Not implemented"}}class he{constructor(){this._locations=new Set}_add(e){this._locations.add(e)}_delete(e){this._locations.delete(e)}disposeAll(){for(const e of this._locations)e.dispose()}}var pe=Object.freeze({__proto__:null,LiveLocation:class{update(){throw new Error("not implemented")}uiLocation(){throw new Error("not implemented")}dispose(){}isIgnoreListed(){throw new Error("not implemented")}},LiveLocationWithPool:le,LiveLocationPool:he});const _e=new WeakMap;class ge{constructor(e,t,o){this._sourceMapManager=t,this._project=new F(o,"cssSourceMaps:"+e.id(),L.projectTypes.Network,"",!1),W.setTargetForProject(this._project,e),this._eventListeners=[this._sourceMapManager.addEventListener(l.Events.SourceMapAttached,(e=>{this._sourceMapAttached(e)}),this),this._sourceMapManager.addEventListener(l.Events.SourceMapDetached,(e=>{this._sourceMapDetached(e)}),this),this._sourceMapManager.addEventListener(l.Events.SourceMapChanged,(e=>{this._sourceMapChanged(e)}),this)]}_sourceMapAttachedForTest(e){}async _sourceMapAttached(e){const t=e.data.client,o=e.data.sourceMap;for(const e of o.sourceURLs()){let r=this._project.uiSourceCodeForURL(e);if(r){W.addFrameAttribution(r,t.frameId);continue}const i=o.sourceContentProvider(e,s.resourceTypes.SourceMapStyleSheet),n=s.ResourceType.mimeFromURL(e)||i.contentType().canonicalMimeType(),a=o.embeddedContentByURL(e),c="string"==typeof a?new M.UISourceCodeMetadata(null,a.length):null;r=this._project.createUISourceCode(e,i.contentType()),W.setInitialFrameAttribution(r,t.frameId),_e.set(r,o),this._project.addUISourceCodeWithProvider(r,i,c,n)}await Ie.instance().updateLocations(t),this._sourceMapAttachedForTest(o)}async _sourceMapDetached(e){const t=e.data.client,o=e.data.sourceMap,s=this._sourceMapManager.clientsForSourceMap(o);for(const e of o.sourceURLs())if(s.length){const o=this._project.uiSourceCodeForURL(e);if(!o)continue;W.removeFrameAttribution(o,t.frameId)}else this._project.removeFile(e);await Ie.instance().updateLocations(t)}async _sourceMapChanged(e){const t=e.data.sourceMap,o=e.data.newSources,s=this._sourceMapManager.clientsForSourceMap(t);for(const e of o.keys()){const t=this._project.uiSourceCodeForURL(e);if(!t){console.error("Failed to update source for "+e);continue}const s=o.get(e);t.setWorkingCopy(s)}const r=s.map((e=>Ie.instance().updateLocations(e)));await Promise.all(r)}rawLocationToUILocation(e){const t=e.header();if(!t)return null;const o=this._sourceMapManager.sourceMapForClient(t);if(!o)return null;const s=o.findEntry(e.lineNumber,e.columnNumber);if(!s||!s.sourceURL)return null;const r=this._project.uiSourceCodeForURL(s.sourceURL);return r?r.uiLocation(s.sourceLineNumber||0,s.sourceColumnNumber):null}uiLocationToRawLocations(e){const t=_e.get(e.uiSourceCode);if(!t)return[];const o=t.findReverseEntries(e.uiSourceCode.url(),e.lineNumber,e.columnNumber||0),s=[];for(const e of this._sourceMapManager.clientsForSourceMap(t))s.push(...o.map((t=>new g.CSSLocation(e,t.lineNumber,t.columnNumber))));return s}dispose(){this._project.dispose(),r.EventTarget.removeEventListeners(this._eventListeners)}}var me=Object.freeze({__proto__:null,SASSSourceMapping:ge});function fe(e){for(const t of u.TargetManager.instance().models(h.ResourceTreeModel)){const o=t.resourceForURL(e);if(o)return o}return null}function be(e,t,o){const s=e.model(h.ResourceTreeModel);if(!s)return null;const r=s.frameForId(t);return r?Se(r.resourceForURL(o)):null}function Se(e){return!e||"number"!=typeof e.contentSize()&&!e.lastModified()?null:new M.UISourceCodeMetadata(e.lastModified(),e.contentSize())}var Le=Object.freeze({__proto__:null,resourceForURL:fe,displayNameForURL:function(e){if(!e)return"";const o=fe(e);if(o)return o.displayName;const s=L.WorkspaceImpl.instance().uiSourceCodeForURL(e);if(s)return s.displayName();const r=u.TargetManager.instance().mainTarget(),i=r&&r.inspectedURL();if(!i)return C.trimURL(e,"");const n=t.ParsedURL.fromString(i);if(!n)return e;const a=n.lastPathComponent,c=i.indexOf(a);if(-1!==c&&c+a.length===i.length){const t=i.substring(0,c);if(e.startsWith(t))return e.substring(c)}const d=C.trimURL(e,n.host);return"/"===d?n.host+"/":d},metadataForURL:be,resourceMetadata:Se});const Me=new WeakMap;class ve{constructor(e,t){this._cssModel=e;const o=this._cssModel.target();this._project=new F(t,"css:"+o.id(),L.projectTypes.Network,"",!1),W.setTargetForProject(this._project,o),this._styleFiles=new Map,this._eventListeners=[this._cssModel.addEventListener(g.Events.StyleSheetAdded,this._styleSheetAdded,this),this._cssModel.addEventListener(g.Events.StyleSheetRemoved,this._styleSheetRemoved,this),this._cssModel.addEventListener(g.Events.StyleSheetChanged,this._styleSheetChanged,this)]}rawLocationToUILocation(e){const t=e.header();if(!t||!this._acceptsHeader(t))return null;const o=this._styleFiles.get(t.resourceURL());if(!o)return null;let s=e.lineNumber,r=e.columnNumber;if(t.isInline&&t.hasSourceURL){s-=t.lineNumberInSource(0);const e=t.columnNumberInSource(s,0);void 0===e?r=e:r-=e}return o._uiSourceCode.uiLocation(s,r)}uiLocationToRawLocations(e){const t=Me.get(e.uiSourceCode);if(!t)return[];const o=[];for(const s of t._headers){let t=e.lineNumber,r=e.columnNumber;s.isInline&&s.hasSourceURL&&(r=s.columnNumberInSource(t,e.columnNumber||0),t=s.lineNumberInSource(t)),o.push(new g.CSSLocation(s,t,r))}return o}_acceptsHeader(e){return!e.isConstructed&&(!(e.isInline&&!e.hasSourceURL&&"inspector"!==e.origin)&&!!e.resourceURL())}_styleSheetAdded(e){const t=e.data;if(!this._acceptsHeader(t))return;const o=t.resourceURL();let s=this._styleFiles.get(o);s?s.addHeader(t):(s=new we(this._cssModel,this._project,t),this._styleFiles.set(o,s))}_styleSheetRemoved(e){const t=e.data;if(!this._acceptsHeader(t))return;const o=t.resourceURL(),s=this._styleFiles.get(o);s&&(1===s._headers.size?(s.dispose(),this._styleFiles.delete(o)):s.removeHeader(t))}_styleSheetChanged(e){const t=this._cssModel.styleSheetHeaderForId(e.data.styleSheetId);if(!t||!this._acceptsHeader(t))return;const o=this._styleFiles.get(t.resourceURL());o&&o._styleSheetChanged(t)}dispose(){for(const e of this._styleFiles.values())e.dispose();this._styleFiles.clear(),r.EventTarget.removeEventListeners(this._eventListeners),this._project.removeProject()}}class we{constructor(e,t,o){this._cssModel=e,this._project=t,this._headers=new Set([o]);const s=e.target(),r=o.resourceURL(),i=be(s,o.frameId,r);this._uiSourceCode=this._project.createUISourceCode(r,o.contentType()),Me.set(this._uiSourceCode,this),W.setInitialFrameAttribution(this._uiSourceCode,o.frameId),this._project.addUISourceCodeWithProvider(this._uiSourceCode,this,i,"text/css"),this._eventListeners=[this._uiSourceCode.addEventListener(M.Events.WorkingCopyChanged,this._workingCopyChanged,this),this._uiSourceCode.addEventListener(M.Events.WorkingCopyCommitted,this._workingCopyCommitted,this)],this._throttler=new n.Throttler(we.updateTimeout),this._terminated=!1}addHeader(e){this._headers.add(e),W.addFrameAttribution(this._uiSourceCode,e.frameId)}removeHeader(e){this._headers.delete(e),W.removeFrameAttribution(this._uiSourceCode,e.frameId)}_styleSheetChanged(e){if(console.assert(this._headers.has(e)),this._isUpdatingHeaders||!this._headers.has(e))return;const t=this._mirrorContent.bind(this,e,!0);this._throttler.schedule(t,!1)}_workingCopyCommitted(e){if(this._isAddingRevision)return;const t=this._mirrorContent.bind(this,this._uiSourceCode,!0);this._throttler.schedule(t,!0)}_workingCopyChanged(e){if(this._isAddingRevision)return;const t=this._mirrorContent.bind(this,this._uiSourceCode,!1);this._throttler.schedule(t,!1)}async _mirrorContent(e,t){if(this._terminated)return void this._styleFileSyncedForTest();let o=null;if(e===this._uiSourceCode)o=this._uiSourceCode.workingCopy();else{o=(await e.requestContent()).content}if(null===o||this._terminated)return void this._styleFileSyncedForTest();e!==this._uiSourceCode&&(this._isAddingRevision=!0,this._uiSourceCode.addRevision(o),this._isAddingRevision=!1),this._isUpdatingHeaders=!0;const s=[];for(const r of this._headers)r!==e&&s.push(this._cssModel.setStyleSheetText(r.id,o,t));await Promise.all(s),this._isUpdatingHeaders=!1,this._styleFileSyncedForTest()}_styleFileSyncedForTest(){}dispose(){this._terminated||(this._terminated=!0,this._project.removeFile(this._uiSourceCode.url()),r.EventTarget.removeEventListeners(this._eventListeners))}contentURL(){return console.assert(this._headers.size>0),this._headers.values().next().value.originalContentProvider().contentURL()}contentType(){return console.assert(this._headers.size>0),this._headers.values().next().value.originalContentProvider().contentType()}contentEncoded(){return console.assert(this._headers.size>0),this._headers.values().next().value.originalContentProvider().contentEncoded()}requestContent(){return console.assert(this._headers.size>0),this._headers.values().next().value.originalContentProvider().requestContent()}searchInContent(e,t,o){return console.assert(this._headers.size>0),this._headers.values().next().value.originalContentProvider().searchInContent(e,t,o)}}we.updateTimeout=200;var Ce=Object.freeze({__proto__:null,StylesSourceMapping:ve,StyleFile:we});let ye;class Ie{constructor(e,t){this._workspace=t,this._modelToInfo=new Map,this._sourceMappings=[],e.observeModels(g.CSSModel,this),this._liveLocationPromises=new Set}static instance(e={forceNew:null,targetManager:null,workspace:null}){const{forceNew:t,targetManager:o,workspace:s}=e;if(!ye||t){if(!o||!s)throw new Error("Unable to create CSSWorkspaceBinding: targetManager and workspace must be provided: "+(new Error).stack);ye=new Ie(o,s)}return ye}_getCSSModelInfo(e){return this._modelToInfo.get(e)}modelAdded(e){this._modelToInfo.set(e,new Re(e,this._workspace))}modelRemoved(e){this._getCSSModelInfo(e)._dispose(),this._modelToInfo.delete(e)}async pendingLiveLocationChangesPromise(){await Promise.all(this._liveLocationPromises)}_recordLiveLocationChange(e){e.then((()=>{this._liveLocationPromises.delete(e)})),this._liveLocationPromises.add(e)}async updateLocations(e){const t=this._getCSSModelInfo(e.cssModel())._updateLocations(e);this._recordLiveLocationChange(t),await t}createLiveLocation(e,t,o){const s=this._getCSSModelInfo(e.cssModel())._createLiveLocation(e,t,o);return this._recordLiveLocationChange(s),s}propertyUILocation(e,t){const o=e.ownerStyle;if(!o||o.type!==m.Type.Regular||!o.styleSheetId)return null;const s=o.cssModel().styleSheetHeaderForId(o.styleSheetId);if(!s)return null;const r=t?e.nameRange():e.valueRange();if(!r)return null;const i=r.startLine,n=r.startColumn,a=new g.CSSLocation(s,s.lineNumberInSource(i),s.columnNumberInSource(i,n));return this.rawLocationToUILocation(a)}rawLocationToUILocation(e){for(let t=this._sourceMappings.length-1;t>=0;--t){const o=this._sourceMappings[t].rawLocationToUILocation(e);if(o)return o}return this._getCSSModelInfo(e.cssModel())._rawLocationToUILocation(e)}uiLocationToRawLocations(e){for(let t=this._sourceMappings.length-1;t>=0;--t){const o=this._sourceMappings[t].uiLocationToRawLocations(e);if(o.length)return o}const t=[];for(const o of this._modelToInfo.values())t.push(...o._uiLocationToRawLocations(e));return t}addSourceMapping(e){this._sourceMappings.push(e)}}class Re{constructor(e,t){this._eventListeners=[e.addEventListener(g.Events.StyleSheetAdded,(e=>{this._styleSheetAdded(e)}),this),e.addEventListener(g.Events.StyleSheetRemoved,(e=>{this._styleSheetRemoved(e)}),this)],this._stylesSourceMapping=new ve(e,t);const o=e.sourceMapManager();this._sassSourceMapping=new ge(e.target(),o,t),this._locations=new y.Multimap,this._unboundLocations=new y.Multimap}async _createLiveLocation(e,t,o){const s=new ke(e,this,t,o),r=e.header();return r?(s._header=r,this._locations.set(r,s),await s.update()):this._unboundLocations.set(e.url,s),s}_disposeLocation(e){e._header?this._locations.delete(e._header,e):this._unboundLocations.delete(e._url,e)}_updateLocations(e){const t=[];for(const o of this._locations.get(e))t.push(o.update());return Promise.all(t)}async _styleSheetAdded(e){const t=e.data;if(!t.sourceURL)return;const o=[];for(const e of this._unboundLocations.get(t.sourceURL))e._header=t,this._locations.set(t,e),o.push(e.update());await Promise.all(o),this._unboundLocations.deleteAll(t.sourceURL)}async _styleSheetRemoved(e){const t=e.data,o=[];for(const e of this._locations.get(t))e._header=null,this._unboundLocations.set(e._url,e),o.push(e.update());await Promise.all(o),this._locations.deleteAll(t)}_rawLocationToUILocation(e){let t=null;return t=t||this._sassSourceMapping.rawLocationToUILocation(e),t=t||this._stylesSourceMapping.rawLocationToUILocation(e),t=t||Pe.instance().cssLocationToUILocation(e),t}_uiLocationToRawLocations(e){let t=this._sassSourceMapping.uiLocationToRawLocations(e);return t.length?t:(t=this._stylesSourceMapping.uiLocationToRawLocations(e),t.length?t:Pe.instance().uiLocationToCSSLocations(e))}_dispose(){r.EventTarget.removeEventListeners(this._eventListeners),this._stylesSourceMapping.dispose(),this._sassSourceMapping.dispose()}}class ke extends le{constructor(e,t,o,s){super(o,s),this._url=e.url,this._lineNumber=e.lineNumber,this._columnNumber=e.columnNumber,this._info=t,this._header=null}header(){return this._header}async uiLocation(){if(!this._header)return null;const e=new g.CSSLocation(this._header,this._lineNumber,this._columnNumber);return Ie.instance().rawLocationToUILocation(e)}dispose(){super.dispose(),this._info._disposeLocation(this)}async isIgnoreListed(){return!1}}var Te=Object.freeze({__proto__:null,CSSWorkspaceBinding:Ie,SourceMapping:class{rawLocationToUILocation(e){throw new Error("Not implemented yet")}uiLocationToRawLocations(e){throw new Error("Not implemented yet")}},ModelInfo:Re,LiveLocation:ke});let Fe;const Ue=new WeakMap,Ee=new WeakMap,Ne=new WeakSet;class Pe{constructor(e,t){this._workspace=t,this._modelToInfo=new Map,e.observeModels(h.ResourceTreeModel,this)}static instance(e={forceNew:null,targetManager:null,workspace:null}){const{forceNew:t,targetManager:o,workspace:s}=e;if(!Fe||t){if(!o||!s)throw new Error("Unable to create ResourceMapping: targetManager and workspace must be provided: "+(new Error).stack);Fe=new Pe(o,s)}return Fe}modelAdded(e){const t=new je(this._workspace,e);this._modelToInfo.set(e,t)}modelRemoved(e){const t=this._modelToInfo.get(e);t&&(t.dispose(),this._modelToInfo.delete(e))}_infoForTarget(e){const t=e.model(h.ResourceTreeModel);return t&&this._modelToInfo.get(t)||null}cssLocationToUILocation(e){const t=e.header();if(!t)return null;const o=this._infoForTarget(e.cssModel().target());if(!o)return null;const s=o._project.uiSourceCodeForURL(e.url);if(!s)return null;const r=Ue.get(t)||k.TextRange.createFromLocation(t.startLine,t.startColumn),i=e.lineNumber+r.startLine-t.startLine;let n=e.columnNumber;return e.lineNumber===t.startLine&&(n+=r.startColumn-t.startColumn),s.uiLocation(i,n)}jsLocationToUILocation(e){const t=e.script();if(!t)return null;const o=this._infoForTarget(e.debuggerModel.target());if(!o)return null;const s=o._project.uiSourceCodeForURL(t.sourceURL);if(!s)return null;const r=Ee.get(t)||k.TextRange.createFromLocation(t.lineOffset,t.columnOffset),i=e.lineNumber+r.startLine-t.lineOffset;let n=e.columnNumber;return e.lineNumber===t.lineOffset&&(n+=r.startColumn-t.columnOffset),s.uiLocation(i,n)}uiLocationToJSLocations(e,t,o){if(!Ne.has(e))return[];const s=W.targetForUISourceCode(e);if(!s)return[];const r=s.model(d.DebuggerModel);if(!r)return[];const i=r.createRawLocationByURL(e.url(),t,o);if(i){const e=i.script();if(e&&e.containsLocation(t,o))return[i]}return[]}uiLocationToCSSLocations(e){if(!Ne.has(e.uiSourceCode))return[];const t=W.targetForUISourceCode(e.uiSourceCode);if(!t)return[];const o=t.model(g.CSSModel);return o?o.createRawLocationsByURL(e.uiSourceCode.url(),e.lineNumber,e.columnNumber):[]}_resetForTest(e){const t=e.model(h.ResourceTreeModel),o=t?this._modelToInfo.get(t):null;o&&o._resetForTest()}}class je{constructor(e,t){const o=t.target();this._project=new F(e,"resources:"+o.id(),L.projectTypes.Network,"",!1),W.setTargetForProject(this._project,o),this._bindings=new Map;const s=o.model(g.CSSModel);console.assert(Boolean(s)),this._cssModel=s,this._eventListeners=[t.addEventListener(h.Events.ResourceAdded,this._resourceAdded,this),t.addEventListener(h.Events.FrameWillNavigate,this._frameWillNavigate,this),t.addEventListener(h.Events.FrameDetached,this._frameDetached,this),this._cssModel.addEventListener(g.Events.StyleSheetChanged,(e=>{this._styleSheetChanged(e)}),this)]}async _styleSheetChanged(e){const t=this._cssModel.styleSheetHeaderForId(e.data.styleSheetId);if(!t||!t.isInline||t.isInline&&t.isMutable)return;const o=this._bindings.get(t.resourceURL());o&&await o._styleSheetChanged(t,e.data.edit)}_acceptsResource(e){const t=e.resourceType();return(t===s.resourceTypes.Image||t===s.resourceTypes.Font||t===s.resourceTypes.Document||t===s.resourceTypes.Manifest)&&(!(t===s.resourceTypes.Image&&e.mimeType&&!e.mimeType.startsWith("image"))&&(!(t===s.resourceTypes.Font&&e.mimeType&&!e.mimeType.includes("font"))&&(t!==s.resourceTypes.Image&&t!==s.resourceTypes.Font||!e.contentURL().startsWith("data:"))))}_resourceAdded(e){const t=e.data;if(!this._acceptsResource(t))return;let o=this._bindings.get(t.url);o?o.addResource(t):(o=new Ae(this._project,t),this._bindings.set(t.url,o))}_removeFrameResources(e){for(const t of e.resources()){if(!this._acceptsResource(t))continue;const e=this._bindings.get(t.url);e&&(1===e._resources.size?(e.dispose(),this._bindings.delete(t.url)):e.removeResource(t))}}_frameWillNavigate(e){const t=e.data;this._removeFrameResources(t)}_frameDetached(e){const t=e.data;this._removeFrameResources(t)}_resetForTest(){for(const e of this._bindings.values())e.dispose();this._bindings.clear()}dispose(){r.EventTarget.removeEventListeners(this._eventListeners);for(const e of this._bindings.values())e.dispose();this._bindings.clear(),this._project.removeProject()}}class Ae{constructor(e,t){this._resources=new Set([t]),this._project=e,this._uiSourceCode=this._project.createUISourceCode(t.url,t.contentType()),Ne.add(this._uiSourceCode),W.setInitialFrameAttribution(this._uiSourceCode,t.frameId),this._project.addUISourceCodeWithProvider(this._uiSourceCode,this,Se(t),t.mimeType),this._edits=[]}_inlineStyles(){const e=W.targetForUISourceCode(this._uiSourceCode),t=[];if(!e)return t;const o=e.model(g.CSSModel);if(o)for(const e of o.styleSheetIdsForURL(this._uiSourceCode.url())){const s=o.styleSheetHeaderForId(e);s&&t.push(s)}return t}_inlineScripts(){const e=W.targetForUISourceCode(this._uiSourceCode);if(!e)return[];const t=e.model(d.DebuggerModel);return t?t.scriptsForSourceURL(this._uiSourceCode.url()):[]}async _styleSheetChanged(e,t){if(this._edits.push({stylesheet:e,edit:t}),this._edits.length>1)return;const{content:o}=await this._uiSourceCode.requestContent();null!==o&&await this._innerStyleSheetChanged(o),this._edits=[]}async _innerStyleSheetChanged(e){const t=this._inlineScripts(),o=this._inlineStyles();let s=new T.Text(e);for(const e of this._edits){const r=e.edit;if(!r)continue;const i=e.stylesheet,n=Ue.get(i)||k.TextRange.createFromLocation(i.startLine,i.startColumn),a=r.oldRange.relativeFrom(n.startLine,n.startColumn),c=r.newRange.relativeFrom(n.startLine,n.startColumn);s=new T.Text(s.replaceRange(a,r.newText));const u=[];for(const e of t){const t=Ee.get(e)||k.TextRange.createFromLocation(e.lineOffset,e.columnOffset);t.follows(a)&&(Ee.set(e,t.rebaseAfterTextEdit(a,c)),u.push(ze.instance().updateLocations(e)))}for(const e of o){const t=Ue.get(e)||k.TextRange.createFromLocation(e.startLine,e.startColumn);t.follows(a)&&(Ue.set(e,t.rebaseAfterTextEdit(a,c)),u.push(Ie.instance().updateLocations(e)))}await Promise.all(u)}this._uiSourceCode.addRevision(s.value())}addResource(e){this._resources.add(e),W.addFrameAttribution(this._uiSourceCode,e.frameId)}removeResource(e){this._resources.delete(e),W.removeFrameAttribution(this._uiSourceCode,e.frameId)}dispose(){this._project.removeFile(this._uiSourceCode.url())}_firstResource(){return console.assert(this._resources.size>0),this._resources.values().next().value}contentURL(){return this._firstResource().contentURL()}contentType(){return this._firstResource().contentType()}contentEncoded(){return this._firstResource().contentEncoded()}requestContent(){return this._firstResource().requestContent()}searchInContent(e,t,o){return this._firstResource().searchInContent(e,t,o)}}var Be=Object.freeze({__proto__:null,ResourceMapping:Pe});class De{constructor(e,t,o){this._debuggerModel=e,this._workspace=t,this._debuggerWorkspaceBinding=o,this._uiSourceCodeToScriptFile=new Map,this._projects=new Map,this._acceptedScripts=new Set;const s=e.runtimeModel();this._eventListeners=[this._debuggerModel.addEventListener(d.Events.ParsedScriptSource,(e=>{this._parsedScriptSource(e)}),this),this._debuggerModel.addEventListener(d.Events.GlobalObjectCleared,this._globalObjectCleared,this),s.addEventListener(f.Events.ExecutionContextDestroyed,this._executionContextDestroyed,this)]}_project(e){const t=(e.isContentScript()?"js:extensions:":"js::")+this._debuggerModel.target().id()+":"+e.frameId;let o=this._projects.get(t);if(!o){const s=e.isContentScript()?L.projectTypes.ContentScripts:L.projectTypes.Network;o=new F(this._workspace,t,s,"",!1),W.setTargetForProject(o,this._debuggerModel.target()),this._projects.set(t,o)}return o}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const o=this._project(t).uiSourceCodeForURL(t.sourceURL);if(!o)return null;const s=this._uiSourceCodeToScriptFile.get(o);if(!s)return null;if(s.hasDivergedFromVM()&&!s.isMergingToVM()||s.isDivergingFromVM())return null;if(!s._hasScripts([t]))return null;const r=e.lineNumber-(t.isInlineScriptWithSourceURL()?t.lineOffset:0);let i=e.columnNumber||0;return t.isInlineScriptWithSourceURL()&&!r&&i&&(i-=t.columnOffset),o.uiLocation(r,i)}uiLocationToRawLocations(e,t,o){const s=this._uiSourceCodeToScriptFile.get(e);if(!s||void 0===s._script)return[];const r=s._script;return r.isInlineScriptWithSourceURL()?[this._debuggerModel.createRawLocation(r,t+r.lineOffset,t?o:o+r.columnOffset)]:[this._debuggerModel.createRawLocation(r,t,o)]}_acceptsScript(e){if(!e.sourceURL||e.isLiveEdit()||e.isInlineScript()&&!e.hasSourceURL)return!1;if(e.isContentScript()&&!e.hasSourceURL){if(!new t.ParsedURL(e.sourceURL).isValid)return!1}return!0}async _parsedScriptSource(e){const t=e.data;if(!this._acceptsScript(t))return;this._acceptedScripts.add(t);const o=t.originalContentProvider(),s=t.sourceURL,r=this._project(t),i=r.uiSourceCodeForURL(s);if(i){const e=this._uiSourceCodeToScriptFile.get(i);e&&void 0!==e._script&&await this._removeScript(e._script)}const n=r.createUISourceCode(s,o.contentType());W.setInitialFrameAttribution(n,t.frameId);const a=be(this._debuggerModel.target(),t.frameId,s),c=new Oe(this,n,[t]);this._uiSourceCodeToScriptFile.set(n,c);const u=t.isWasm()?"application/wasm":"text/javascript";r.addUISourceCodeWithProvider(n,o,a,u),await this._debuggerWorkspaceBinding.updateLocations(t)}scriptFile(e){return this._uiSourceCodeToScriptFile.get(e)||null}async _removeScript(e){if(!this._acceptedScripts.has(e))return;this._acceptedScripts.delete(e);const t=this._project(e),o=t.uiSourceCodeForURL(e.sourceURL),s=this._uiSourceCodeToScriptFile.get(o);s&&s.dispose(),this._uiSourceCodeToScriptFile.delete(o),t.removeFile(e.sourceURL),await this._debuggerWorkspaceBinding.updateLocations(e)}_executionContextDestroyed(e){const t=e.data,o=this._debuggerModel.scriptsForExecutionContext(t);for(const e of o)this._removeScript(e)}_globalObjectCleared(e){const t=Array.from(this._acceptedScripts);for(const e of t)this._removeScript(e)}resetForTest(){const e=Array.from(this._acceptedScripts);for(const t of e)this._removeScript(t)}dispose(){r.EventTarget.removeEventListeners(this._eventListeners);const e=Array.from(this._acceptedScripts);for(const t of e)this._removeScript(t);for(const e of this._projects.values())e.removeProject();this._projects.clear()}}class Oe extends o.ObjectWrapper{constructor(e,t,o){super(),console.assert(o.length>0),this._resourceScriptMapping=e,this._uiSourceCode=t,this._uiSourceCode.contentType().isScript()&&(this._script=o[o.length-1]),this._uiSourceCode.addEventListener(M.Events.WorkingCopyChanged,this._workingCopyChanged,this),this._uiSourceCode.addEventListener(M.Events.WorkingCopyCommitted,this._workingCopyCommitted,this)}_hasScripts(e){return Boolean(this._script)&&this._script===e[0]}_isDiverged(){if(this._uiSourceCode.isDirty())return!0;if(!this._script)return!1;if(void 0===this._scriptSource||null===this._scriptSource)return!1;const e=this._uiSourceCode.workingCopy();if(!e)return!1;if(!e.startsWith(this._scriptSource.trimRight()))return!0;const t=this._uiSourceCode.workingCopy().substr(this._scriptSource.length);return Boolean(t.length)&&!t.match(b.sourceURLRegex)}_workingCopyChanged(e){this._update()}_workingCopyCommitted(e){if(this._uiSourceCode.project().canSetFileContent())return;if(!this._script)return;const t=this._resourceScriptMapping._debuggerModel,o=Je.instance().breakpointLocationsForUISourceCode(this._uiSourceCode).map((e=>e.breakpoint)),s=this._uiSourceCode.workingCopy();t.setScriptSource(this._script.scriptId,s,((e,t)=>{this.scriptSourceWasSet(s,o,e,t)}))}async scriptSourceWasSet(e,t,o,s){if(o||s||(this._scriptSource=e),await this._update(),!o&&!s)return void await Promise.all(t.map((e=>e.refreshInDebugger())));if(!s)return void i.Console.instance().addMessage(a.UIString("LiveEdit failed: %s",o),i.MessageLevel.Warning);const r=a.UIString("LiveEdit compile failed: %s",s.text);this._uiSourceCode.addLineMessage(M.Message.Level.Error,r,s.lineNumber,s.columnNumber)}async _update(){this._isDiverged()&&!this._hasDivergedFromVM?await this._divergeFromVM():!this._isDiverged()&&this._hasDivergedFromVM&&await this._mergeToVM()}async _divergeFromVM(){this._script&&(this._isDivergingFromVM=!0,await this._resourceScriptMapping._debuggerWorkspaceBinding.updateLocations(this._script),delete this._isDivergingFromVM,this._hasDivergedFromVM=!0,this.dispatchEventToListeners(Oe.Events.DidDivergeFromVM,this._uiSourceCode))}async _mergeToVM(){this._script&&(delete this._hasDivergedFromVM,this._isMergingToVM=!0,await this._resourceScriptMapping._debuggerWorkspaceBinding.updateLocations(this._script),delete this._isMergingToVM,this.dispatchEventToListeners(Oe.Events.DidMergeToVM,this._uiSourceCode))}hasDivergedFromVM(){return Boolean(this._hasDivergedFromVM)}isDivergingFromVM(){return Boolean(this._isDivergingFromVM)}isMergingToVM(){return Boolean(this._isMergingToVM)}checkMapping(){this._script&&void 0===this._scriptSource?this._script.requestContent().then((e=>{this._scriptSource=e.content,this._update().then((()=>this._mappingCheckedForTest()))})):this._mappingCheckedForTest()}_mappingCheckedForTest(){}dispose(){this._uiSourceCode.removeEventListener(M.Events.WorkingCopyChanged,this._workingCopyChanged,this),this._uiSourceCode.removeEventListener(M.Events.WorkingCopyCommitted,this._workingCopyCommitted,this)}addSourceMapURL(e){this._script&&this._script.debuggerModel.setSourceMapURL(this._script,e)}hasSourceMapURL(){return void 0!==this._script&&Boolean(this._script.sourceMapURL)}get script(){return this._script||null}get uiSourceCode(){return this._uiSourceCode}}Oe.Events={DidMergeToVM:Symbol("DidMergeToVM"),DidDivergeFromVM:Symbol("DidDivergeFromVM")};var xe=Object.freeze({__proto__:null,ResourceScriptMapping:De,ResourceScriptFile:Oe});let We;class ze{constructor(e,t){this._workspace=t,this._sourceMappings=[],this._debuggerModelToData=new Map,e.addModelListener(d.DebuggerModel,d.Events.GlobalObjectCleared,this._globalObjectCleared,this),e.addModelListener(d.DebuggerModel,d.Events.DebuggerResumed,this._debuggerResumed,this),e.observeModels(d.DebuggerModel,this),this._liveLocationPromises=new Set,this.pluginManager=I.experiments.isEnabled("wasmDWARFDebugging")?new re(e,t,this):null}static instance(e={forceNew:null,targetManager:null,workspace:null}){const{forceNew:t,targetManager:o,workspace:s}=e;if(!We||t){if(!o||!s)throw new Error("Unable to create DebuggerWorkspaceBinding: targetManager and workspace must be provided: "+(new Error).stack);We=new ze(o,s)}return We}addSourceMapping(e){this._sourceMappings.push(e)}async _computeAutoStepRanges(e,t){const o=this.pluginManager;if(o){const s=t.location();if(e===d.StepMode.StepOut)return await o.getInlinedFunctionRanges(s);let r=[];const i=await o.rawLocationToUILocation(s);return i&&(r=await o.uiLocationToRawLocationRanges(i.uiSourceCode,i.lineNumber,i.columnNumber)||[],r=r.filter((e=>function(e,t){const{start:o,end:s}=t;return!(o.scriptId!==e.scriptId||e.lineNumber<o.lineNumber||e.lineNumber>s.lineNumber||e.lineNumber===o.lineNumber&&e.columnNumber<o.columnNumber||e.lineNumber===s.lineNumber&&e.columnNumber>=s.columnNumber)}(s,e)))),e===d.StepMode.StepOver&&(r=r.concat(await o.getInlinedCalleesRanges(s))),r}return[]}modelAdded(e){this._debuggerModelToData.set(e,new Ve(e,this)),e.setComputeAutoStepRangesCallback(this._computeAutoStepRanges.bind(this))}modelRemoved(e){e.setComputeAutoStepRangesCallback(null);const t=this._debuggerModelToData.get(e);t&&(t._dispose(),this._debuggerModelToData.delete(e))}async pendingLiveLocationChangesPromise(){await Promise.all(this._liveLocationPromises)}_recordLiveLocationChange(e){e.then((()=>{this._liveLocationPromises.delete(e)})),this._liveLocationPromises.add(e)}async updateLocations(e){const t=this._debuggerModelToData.get(e.debuggerModel);if(t){const o=t._updateLocations(e);this._recordLiveLocationChange(o),await o}}async createLiveLocation(e,t,o){const s=this._debuggerModelToData.get(e.debuggerModel);if(!s)return null;const r=s._createLiveLocation(e,t,o);return this._recordLiveLocationChange(r),r}async createStackTraceTopFrameLiveLocation(e,t,o){console.assert(e.length>0);const s=$e.createStackTraceTopFrameLocation(e,this,t,o);return this._recordLiveLocationChange(s),s}async createCallFrameLiveLocation(e,t,o){if(!e.script())return null;const s=e.debuggerModel,r=this.createLiveLocation(e,t,o);this._recordLiveLocationChange(r);const i=await r;return i?(this._registerCallFrameLiveLocation(s,i),i):null}async rawLocationToUILocation(e){for(const t of this._sourceMappings){const o=t.rawLocationToUILocation(e);if(o)return o}if(this.pluginManager){const t=await this.pluginManager.rawLocationToUILocation(e);if(t)return t}const t=this._debuggerModelToData.get(e.debuggerModel);return t?t._rawLocationToUILocation(e):null}uiSourceCodeForSourceMapSourceURL(e,t,o){const s=this._debuggerModelToData.get(e);return s?s._compilerMapping.uiSourceCodeForURL(t,o):null}async uiLocationToRawLocations(e,t,o){for(const s of this._sourceMappings){const r=s.uiLocationToRawLocations(e,t,o);if(r.length)return r}const s=[];this.pluginManager&&s.push(this.pluginManager.uiLocationToRawLocations(e,t,o).then((e=>e||[])));for(const r of this._debuggerModelToData.values())s.push(Promise.resolve(r._uiLocationToRawLocations(e,t,o)));return(await Promise.all(s)).flat()}uiLocationToRawLocationsForUnformattedJavaScript(e,t,o){console.assert(e.contentType().isScript());const s=[];for(const r of this._debuggerModelToData.values())s.push(...r._uiLocationToRawLocations(e,t,o));return s}async normalizeUILocation(e){const t=await this.uiLocationToRawLocations(e.uiSourceCode,e.lineNumber,e.columnNumber);for(const e of t){const t=await this.rawLocationToUILocation(e);if(t)return t}return e}scriptFile(e,t){const o=this._debuggerModelToData.get(t);return o?o._resourceMapping.scriptFile(e):null}scriptsForUISourceCode(e){const t=new Set;this.pluginManager&&this.pluginManager.scriptsForUISourceCode(e).forEach((e=>t.add(e)));for(const o of this._debuggerModelToData.values()){const s=o._resourceMapping.scriptFile(e);s&&s._script&&t.add(s._script),o._compilerMapping.scriptsForUISourceCode(e).forEach((e=>t.add(e)))}return[...t]}sourceMapForScript(e){const t=this._debuggerModelToData.get(e.debuggerModel);return t?t._compilerMapping.sourceMapForScript(e):null}_globalObjectCleared(e){const t=e.data;this._reset(t)}_reset(e){const t=this._debuggerModelToData.get(e);if(t){for(const e of t.callFrameLocations.values())this._removeLiveLocation(e);t.callFrameLocations.clear()}}_resetForTest(e){const t=e.model(d.DebuggerModel),o=this._debuggerModelToData.get(t);o&&o._resourceMapping.resetForTest()}_registerCallFrameLiveLocation(e,t){const o=this._debuggerModelToData.get(e);if(o){o.callFrameLocations.add(t)}}_removeLiveLocation(e){const t=this._debuggerModelToData.get(e._rawLocation.debuggerModel);t&&t._disposeLocation(e)}_debuggerResumed(e){const t=e.data;this._reset(t)}}class Ve{constructor(e,t){this._debuggerModel=e,this._debuggerWorkspaceBinding=t,this.callFrameLocations=new Set;const o=t._workspace;this._defaultMapping=new ue(e,o,t),this._resourceMapping=new De(e,o,t),this._compilerMapping=new V(e,o,t),this._locations=new y.Multimap,e.setBeforePausedCallback(this._beforePaused.bind(this))}async _createLiveLocation(e,t,o){console.assert(""!==e.scriptId);const s=e.scriptId,r=new He(s,e,this._debuggerWorkspaceBinding,t,o);return this._locations.set(s,r),await r.update(),r}_disposeLocation(e){this._locations.delete(e._scriptId,e)}async _updateLocations(e){const t=[];for(const o of this._locations.get(e.scriptId))t.push(o.update());await Promise.all(t)}_rawLocationToUILocation(e){let t=this._compilerMapping.rawLocationToUILocation(e);return t=t||this._resourceMapping.rawLocationToUILocation(e),t=t||Pe.instance().jsLocationToUILocation(e),t=t||this._defaultMapping.rawLocationToUILocation(e),t}_uiLocationToRawLocations(e,t,o=0){let s=this._compilerMapping.uiLocationToRawLocations(e,t,o);return s=s.length?s:this._resourceMapping.uiLocationToRawLocations(e,t,o),s=s.length?s:Pe.instance().uiLocationToJSLocations(e,t,o),s=s.length?s:this._defaultMapping.uiLocationToRawLocations(e,t,o),s}_beforePaused(e){const t=e.callFrames[0];return!!t&&(!I.experiments.isEnabled("emptySourceMapAutoStepping")||Boolean(this._compilerMapping.mapsToSourceCode(t.location())))}_dispose(){this._debuggerModel.setBeforePausedCallback(null),this._compilerMapping.dispose(),this._resourceMapping.dispose(),this._defaultMapping.dispose()}}class He extends le{constructor(e,t,o,s,r){super(s,r),this._scriptId=e,this._rawLocation=t,this._binding=o}async uiLocation(){const e=this._rawLocation;return this._binding.rawLocationToUILocation(e)}dispose(){super.dispose(),this._binding._removeLiveLocation(this)}async isIgnoreListed(){const e=await this.uiLocation();return!!e&&N.instance().isIgnoreListedUISourceCode(e.uiSourceCode)}}class $e extends le{constructor(e,t){super(e,t),this._updateScheduled=!0,this._current=null,this._locations=null}static async createStackTraceTopFrameLocation(e,t,o,s){const r=new $e(o,s),i=e.map((e=>t.createLiveLocation(e,r._scheduleUpdate.bind(r),s)));return r._locations=(await Promise.all(i)).filter((e=>Boolean(e))),await r._updateLocation(),r}async uiLocation(){return this._current?this._current.uiLocation():null}async isIgnoreListed(){return!!this._current&&this._current.isIgnoreListed()}dispose(){if(super.dispose(),this._locations)for(const e of this._locations)e.dispose();this._locations=null,this._current=null}async _scheduleUpdate(){this._updateScheduled||(this._updateScheduled=!0,queueMicrotask((()=>{this._updateLocation()})))}async _updateLocation(){if(this._updateScheduled=!1,this._locations&&0!==this._locations.length){this._current=this._locations[0];for(const e of this._locations)if(!await e.isIgnoreListed()){this._current=e;break}this.update()}}}var Ge=Object.freeze({__proto__:null,DebuggerWorkspaceBinding:ze,Location:He,DebuggerSourceMapping:class{rawLocationToUILocation(e){throw new Error("Not yet implemented")}uiLocationToRawLocations(e,t,o){throw new Error("Not yet implemented")}}});let qe;class Je extends o.ObjectWrapper{constructor(e,t,o){super(),this._storage=new Ye,this._workspace=t,this._targetManager=e,this._debuggerWorkspaceBinding=o,this._breakpointsForUISourceCode=new Map,this._breakpointByStorageId=new Map,this._workspace.addEventListener(L.Events.UISourceCodeAdded,this._uiSourceCodeAdded,this),this._workspace.addEventListener(L.Events.UISourceCodeRemoved,this._uiSourceCodeRemoved,this),this._workspace.addEventListener(L.Events.ProjectRemoved,this._projectRemoved,this)}static instance(e={forceNew:null,targetManager:null,workspace:null,debuggerWorkspaceBinding:null}){const{forceNew:t,targetManager:o,workspace:s,debuggerWorkspaceBinding:r}=e;if(!qe||t){if(!o||!s||!r)throw new Error("Unable to create settings: targetManager, workspace, and debuggerWorkspaceBinding must be provided: "+(new Error).stack);qe=new Je(o,s,r)}return qe}static _breakpointStorageId(e,t,o){return e?`${e}:${t}`+("number"==typeof o?":"+o:""):""}async copyBreakpoints(e,t){const o=this._storage.breakpointItems(e);for(const e of o)await this.setBreakpoint(t,e.lineNumber,e.columnNumber,e.condition,e.enabled)}_restoreBreakpoints(e){const t=e.url();if(!t)return;this._storage.mute();const o=this._storage.breakpointItems(t);for(const t of o)this._innerSetBreakpoint(e,t.lineNumber,t.columnNumber,t.condition,t.enabled);this._storage.unmute()}_uiSourceCodeAdded(e){const t=e.data;this._restoreBreakpoints(t)}_uiSourceCodeRemoved(e){const t=e.data;this._removeUISourceCode(t)}_projectRemoved(e){const t=e.data;for(const e of t.uiSourceCodes())this._removeUISourceCode(e)}_removeUISourceCode(e){this.breakpointLocationsForUISourceCode(e).forEach((t=>t.breakpoint.removeUISourceCode(e)))}async setBreakpoint(e,t,o,s,r){let i=new M.UILocation(e,t,o);const n=await this._debuggerWorkspaceBinding.normalizeUILocation(i);return n.id()!==i.id()&&(c.reveal(n),i=n),this._innerSetBreakpoint(i.uiSourceCode,i.lineNumber,i.columnNumber,s,r)}_innerSetBreakpoint(e,t,o,s,r){const i=Je._breakpointStorageId(e.url(),t,o);let n=this._breakpointByStorageId.get(i);return n?(n._updateState(s,r),n.addUISourceCode(e),n._updateBreakpoint(),n):(n=new Qe(this,e,e.url(),t,o,s,r),this._breakpointByStorageId.set(i,n),n)}findBreakpoint(e){const t=this._breakpointsForUISourceCode.get(e.uiSourceCode);return t&&t.get(e.id())||null}async possibleBreakpoints(e,t){const{pluginManager:o}=this._debuggerWorkspaceBinding;if(o){const s=await o.uiLocationToRawLocations(e,t.startLine);if(s){const e=[];for(const t of s){const o=await this._debuggerWorkspaceBinding.rawLocationToUILocation(t);o&&e.push(o)}return e}}const s=ze.instance().uiLocationToRawLocations(e,t.startLine,t.startColumn),r=ze.instance().uiLocationToRawLocations(e,t.endLine,t.endColumn),[i,n]=await Promise.all([s,r]),a=new Map;for(const e of n)a.set(e.debuggerModel,e);let c=null,u=null;for(const e of i){const t=a.get(e.debuggerModel);if(t){c=e,u=t;break}}return c&&u?c.debuggerModel.getPossibleBreakpoints(c,u,!1).then(async function(t){const o=t.map((e=>this._debuggerWorkspaceBinding.rawLocationToUILocation(e))),s=(await Promise.all(o)).filter((t=>t&&t.uiSourceCode===e));if(!s.length)return[];s.sort(M.UILocation.comparator);let r=s[0];const i=[r];for(const e of s)e.id()!==r.id()&&(i.push(e),r=e);return i}.bind(this)):[]}breakpointLocationsForUISourceCode(e){const t=this._breakpointsForUISourceCode.get(e);return t?Array.from(t.values()):[]}allBreakpointLocations(){const e=[];for(const t of this._breakpointsForUISourceCode.values())e.push(...t.values());return e}_removeBreakpoint(e,t){t&&this._storage._removeBreakpoint(e),this._breakpointByStorageId.delete(e._breakpointStorageId())}_uiLocationAdded(e,t){let o=this._breakpointsForUISourceCode.get(t.uiSourceCode);o||(o=new Map,this._breakpointsForUISourceCode.set(t.uiSourceCode,o));const s={breakpoint:e,uiLocation:t};o.set(t.id(),s),this.dispatchEventToListeners(Ke.BreakpointAdded,s)}_uiLocationRemoved(e,t){const o=this._breakpointsForUISourceCode.get(t.uiSourceCode);if(!o)return;o.get(t.id())&&(o.delete(t.id()),0===o.size&&this._breakpointsForUISourceCode.delete(t.uiSourceCode),this.dispatchEventToListeners(Ke.BreakpointRemoved,{breakpoint:e,uiLocation:t}))}}const Ke={BreakpointAdded:Symbol("breakpoint-added"),BreakpointRemoved:Symbol("breakpoint-removed")};class Qe{constructor(e,t,o,s,r,i,n){this._breakpointManager=e,this._url=o,this._lineNumber=s,this._columnNumber=r,this._uiLocations=new Set,this._uiSourceCodes=new Set,this._condition,this._enabled,this._isRemoved,this._currentState=null,this._modelBreakpoints=new Map,this._updateState(i,n),this.addUISourceCode(t),this._breakpointManager._targetManager.observeModels(d.DebuggerModel,this)}async refreshInDebugger(){if(!this._isRemoved){const e=Array.from(this._modelBreakpoints.values());await Promise.all(e.map((e=>e._refreshBreakpoint())))}}modelAdded(e){const t=this._breakpointManager._debuggerWorkspaceBinding;this._modelBreakpoints.set(e,new Xe(e,this,t))}modelRemoved(e){const t=this._modelBreakpoints.get(e);this._modelBreakpoints.delete(e),t&&(t._cleanUpAfterDebuggerIsGone(),t._removeEventListeners())}addUISourceCode(e){this._uiSourceCodes.has(e)||(this._uiSourceCodes.add(e),this.bound()||this._breakpointManager._uiLocationAdded(this,this._defaultUILocation(e)))}clearUISourceCodes(){this.bound()||this._removeAllUnboundLocations(),this._uiSourceCodes.clear()}removeUISourceCode(e){if(this._uiSourceCodes.has(e)&&(this._uiSourceCodes.delete(e),this.bound()||this._breakpointManager._uiLocationRemoved(this,this._defaultUILocation(e))),this.bound()){for(const t of this._uiLocations)t.uiSourceCode===e&&(this._uiLocations.delete(t),this._breakpointManager._uiLocationRemoved(this,t));this.bound()||this._isRemoved||this._addAllUnboundLocations()}}url(){return this._url}lineNumber(){return this._lineNumber}columnNumber(){return this._columnNumber}_uiLocationAdded(e){this._isRemoved||(this.bound()||this._removeAllUnboundLocations(),this._uiLocations.add(e),this._breakpointManager._uiLocationAdded(this,e))}_uiLocationRemoved(e){this._uiLocations.has(e)&&(this._uiLocations.delete(e),this._breakpointManager._uiLocationRemoved(this,e),this.bound()||this._isRemoved||this._addAllUnboundLocations())}enabled(){return this._enabled}bound(){return 0!==this._uiLocations.size}hasBoundScript(){for(const e of this._uiSourceCodes)if(e.project().type()===L.projectTypes.Network)return!0;return!1}setEnabled(e){this._updateState(this._condition,e)}condition(){return this._condition}setCondition(e){this._updateState(e,this._enabled)}_updateState(e,t){this._enabled===t&&this._condition===e||(this._enabled=t,this._condition=e,this._breakpointManager._storage._updateBreakpoint(this),this._updateBreakpoint())}_updateBreakpoint(){this.bound()||(this._removeAllUnboundLocations(),this._isRemoved||this._addAllUnboundLocations());for(const e of this._modelBreakpoints.values())e._scheduleUpdateInDebugger()}remove(e){this._isRemoved=!0;const t=!e;for(const e of this._modelBreakpoints.values())e._scheduleUpdateInDebugger(),e._removeEventListeners();this._breakpointManager._removeBreakpoint(this,t),this._breakpointManager._targetManager.unobserveModels(d.DebuggerModel,this),this.clearUISourceCodes()}_breakpointStorageId(){return Je._breakpointStorageId(this._url,this._lineNumber,this._columnNumber)}_resetLocations(){this.clearUISourceCodes();for(const e of this._modelBreakpoints.values())e._resetLocations()}_defaultUILocation(e){return e.uiLocation(this._lineNumber,this._columnNumber)}_removeAllUnboundLocations(){for(const e of this._uiSourceCodes)this._breakpointManager._uiLocationRemoved(this,this._defaultUILocation(e))}_addAllUnboundLocations(){for(const e of this._uiSourceCodes)this._breakpointManager._uiLocationAdded(this,this._defaultUILocation(e))}}class Xe{constructor(e,t,o){this._debuggerModel=e,this._breakpoint=t,this._debuggerWorkspaceBinding=o,this._liveLocations=new he,this._uiLocations=new Map,this._debuggerModel.addEventListener(d.Events.DebuggerWasDisabled,this._cleanUpAfterDebuggerIsGone,this),this._debuggerModel.addEventListener(d.Events.DebuggerWasEnabled,this._scheduleUpdateInDebugger,this),this._hasPendingUpdate=!1,this._isUpdating=!1,this._cancelCallback=!1,this._currentState=null,this._breakpointIds=[],this._debuggerModel.debuggerEnabled()&&this._scheduleUpdateInDebugger()}_resetLocations(){for(const e of this._uiLocations.values())this._breakpoint._uiLocationRemoved(e);this._uiLocations.clear(),this._liveLocations.disposeAll()}_scheduleUpdateInDebugger(){this._isUpdating?this._hasPendingUpdate=!0:(this._isUpdating=!0,this._updateInDebugger(this._didUpdateInDebugger.bind(this)))}_didUpdateInDebugger(){this._isUpdating=!1,this._hasPendingUpdate&&(this._hasPendingUpdate=!1,this._scheduleUpdateInDebugger())}_scriptDiverged(){for(const e of this._breakpoint._uiSourceCodes){const t=this._debuggerWorkspaceBinding.scriptFile(e,this._debuggerModel);if(t&&t.hasDivergedFromVM())return!0}return!1}async _updateInDebugger(e){if(this._debuggerModel.target().isDisposed())return this._cleanUpAfterDebuggerIsGone(),void e();const t=this._breakpoint._lineNumber,o=this._breakpoint._columnNumber,s=this._breakpoint.condition();let r=[];for(const e of this._breakpoint._uiSourceCodes){const{pluginManager:s}=ze.instance();if(s){const i=await s.uiLocationToRawLocationRanges(e,t,o);if(i&&i.length){const e=i[0].start.script();r=i.map((({start:e})=>e)).filter((t=>t.script()===e));break}}if(r=(await ze.instance().uiLocationToRawLocations(e,t,o)).filter((e=>e.debuggerModel===this._debuggerModel)),r.length>0){r=[r[0]];break}}let i=null;if(this._breakpoint._isRemoved||!this._breakpoint.enabled()||this._scriptDiverged())i=null;else if(r.length>0&&r[0].script()){const e=r[0].script();if(!e)return;const t=r.map((e=>({lineNumber:e.lineNumber,columnNumber:e.columnNumber})));i=e.sourceURL?new Qe.State(e.sourceURL,null,null,t,s):new Qe.State(null,e.scriptId,e.hash,t,s)}else if(this._breakpoint._currentState&&this._breakpoint._currentState.url){const e=this._breakpoint._currentState;i=new Qe.State(e.url,null,null,e.positions,s)}else this._breakpoint._uiSourceCodes.size>0&&(i=new Qe.State(this._breakpoint.url(),null,null,[{lineNumber:t,columnNumber:o}],s));if(this._breakpointIds.length&&Qe.State.equals(i,this._currentState))return void e();if(this._breakpoint._currentState=i,this._breakpointIds.length)return await this._refreshBreakpoint(),void e();if(!i)return void e();this._currentState=i;const{url:n,scriptId:a,scriptHash:c}=i;let u;if(n?u=i.positions.map((({lineNumber:e,columnNumber:t})=>this._debuggerModel.setBreakpointByURL(n,e,t,s))):a&&c&&(u=i.positions.map((({lineNumber:e,columnNumber:t})=>this._debuggerModel.setBreakpointInAnonymousScript(a,c,e,t,s)))),u){const t=await Promise.all(u),o=[];let s=[];for(const{breakpointId:e,locations:r}of t)e&&(o.push(e),s=s.concat(r));await this._didSetBreakpointInDebugger(e,o,s)}}async _refreshBreakpoint(){this._breakpointIds.length&&(this._resetLocations(),await Promise.all(this._breakpointIds.map((e=>this._debuggerModel.removeBreakpoint(e)))),this._didRemoveFromDebugger(),this._currentState=null,this._scheduleUpdateInDebugger())}async _didSetBreakpointInDebugger(e,t,o){if(this._cancelCallback)return this._cancelCallback=!1,void e();if(!t.length)return this._breakpoint.remove(!0),void e();this._breakpointIds=t;for(const e of this._breakpointIds)this._debuggerModel.addBreakpointListener(e,(e=>this._breakpointResolved(e)),this);for(const e of o)if(!await this._addResolvedLocation(e))break;e()}_didRemoveFromDebugger(){if(this._cancelCallback)this._cancelCallback=!1;else{this._resetLocations();for(const e of this._breakpointIds)this._debuggerModel.removeBreakpointListener(e,(e=>this._breakpointResolved(e)),this);this._breakpointIds=[]}}async _breakpointResolved(e){await this._addResolvedLocation(e.data)}async _locationUpdated(e){const t=this._uiLocations.get(e),o=await e.uiLocation();t&&this._breakpoint._uiLocationRemoved(t),o?(this._uiLocations.set(e,o),this._breakpoint._uiLocationAdded(o)):this._uiLocations.delete(e)}async _addResolvedLocation(e){const t=await this._debuggerWorkspaceBinding.rawLocationToUILocation(e);if(!t)return!1;const o=this._breakpoint._breakpointManager.findBreakpoint(t);return o&&o.breakpoint!==this._breakpoint?(this._breakpoint.remove(!1),!1):(await this._debuggerWorkspaceBinding.createLiveLocation(e,this._locationUpdated.bind(this),this._liveLocations),!0)}_cleanUpAfterDebuggerIsGone(){this._isUpdating&&(this._cancelCallback=!0),this._resetLocations(),this._currentState=null,this._breakpointIds.length&&this._didRemoveFromDebugger()}_removeEventListeners(){this._debuggerModel.removeEventListener(d.Events.DebuggerWasDisabled,this._cleanUpAfterDebuggerIsGone,this),this._debuggerModel.removeEventListener(d.Events.DebuggerWasEnabled,this._scheduleUpdateInDebugger,this)}}Qe.State=class{constructor(e,t,o,s,r){this.url=e,this.scriptId=t,this.scriptHash=o,this.positions=s,this.condition=r}static equals(e,t){if(!e||!t)return!1;if(e.url===t.url&&e.scriptId===t.scriptId&&e.scriptHash===t.scriptHash&&e.positions.length===t.positions.length&&e.condition===t.condition){for(let o=0;o<e.positions.length;o++)if(e.positions[o].lineNumber!==t.positions[o].lineNumber||e.positions[o].columnNumber!==t.positions[o].columnNumber)return!1;return!0}return!1}};class Ye{constructor(){this._setting=e.Settings.instance().createLocalSetting("breakpoints",[]),this._breakpoints=new Map;const t=this._setting.get();for(const e of t)this._breakpoints.set(Je._breakpointStorageId(e.url,e.lineNumber,e.columnNumber),e);this._muted}mute(){this._muted=!0}unmute(){delete this._muted}breakpointItems(e){return Array.from(this._breakpoints.values()).filter((t=>t.url===e))}_updateBreakpoint(e){!this._muted&&e._breakpointStorageId()&&(this._breakpoints.set(e._breakpointStorageId(),new Ye.Item(e)),this._save())}_removeBreakpoint(e){this._muted||(this._breakpoints.delete(e._breakpointStorageId()),this._save())}_save(){this._setting.set(Array.from(this._breakpoints.values()))}}Ye.Item=class{constructor(e){this.url=e._url,this.lineNumber=e.lineNumber(),this.columnNumber=e.columnNumber(),this.condition=e.condition(),this.enabled=e.enabled()}};var Ze=Object.freeze({__proto__:null,BreakpointManager:Je,Events:Ke,Breakpoint:Qe,ModelBreakpoint:Xe,BreakpointLocation:undefined});class et{constructor(e,t,o){this._file=e,this._fileSize=e.size,this._loadedSize=0,this._chunkSize=t,this._chunkTransferredCallback=o,this._decoder=new TextDecoder,this._isCanceled=!1,this._error=null,this._transferFinished}read(e){return this._chunkTransferredCallback&&this._chunkTransferredCallback(this),this._output=e,this._reader=new FileReader,this._reader.onload=this._onChunkLoaded.bind(this),this._reader.onerror=this._onError.bind(this),this._loadChunk(),new Promise((e=>{this._transferFinished=e}))}cancel(){this._isCanceled=!0}loadedSize(){return this._loadedSize}fileSize(){return this._fileSize}fileName(){return this._file?this._file.name:""}error(){return this._error}_onChunkLoaded(e){if(this._isCanceled)return;if(e.target.readyState!==FileReader.DONE)return;if(!this._output||!this._reader)return;const t=this._reader.result;this._loadedSize+=t.byteLength;const o=this._loadedSize===this._fileSize,s=this._decoder.decode(t,{stream:!o});if(this._output.write(s),!this._isCanceled){if(this._chunkTransferredCallback&&this._chunkTransferredCallback(this),o)return this._file=null,this._reader=null,this._output.close(),void this._transferFinished(!this._error);this._loadChunk()}}_loadChunk(){if(!this._output||!this._reader||!this._file)return;const e=this._loadedSize,t=Math.min(this._fileSize,e+this._chunkSize),o=this._file.slice(e,t);this._reader.readAsArrayBuffer(o)}_onError(e){const t=e.target;this._error=t.error,this._transferFinished(!1)}}var tt=Object.freeze({__proto__:null,ChunkedReader:class{fileSize(){throw new Error("Not implemented yet")}loadedSize(){throw new Error("Not implemented yet")}fileName(){throw new Error("Not implemented yet")}cancel(){}error(){throw new Error("Not implemented yet")}},ChunkedFileReader:et,FileOutputStream:class{constructor(){this._writeCallbacks=[],this._fileName}async open(e){this._closed=!1,this._writeCallbacks=[],this._fileName=e;const t=await v.FileManager.instance().save(this._fileName,"",!0);return t&&v.FileManager.instance().addEventListener(v.Events.AppendedToURL,this._onAppendDone,this),Boolean(t)}write(e){return new Promise((t=>{this._writeCallbacks.push(t),v.FileManager.instance().append(this._fileName,e)}))}async close(){this._closed=!0,this._writeCallbacks.length||(v.FileManager.instance().removeEventListener(v.Events.AppendedToURL,this._onAppendDone,this),v.FileManager.instance().close(this._fileName))}_onAppendDone(e){if(e.data!==this._fileName)return;const t=this._writeCallbacks.shift();t&&t(),this._writeCallbacks.length||this._closed&&(v.FileManager.instance().removeEventListener(v.Events.AppendedToURL,this._onAppendDone,this),v.FileManager.instance().close(this._fileName))}}});const ot=new WeakMap;class st{constructor(e){this._debuggerModel=e,this._pendingConsoleMessages=new Map,this._presentationConsoleMessages=[],e.addEventListener(d.Events.ParsedScriptSource,(e=>{queueMicrotask((()=>{this._parsedScriptSource(e)}))})),e.addEventListener(d.Events.GlobalObjectCleared,this._debuggerReset,this),this._locationPool=new he}_consoleMessageAdded(e){const t=this._rawLocation(e);t?this._addConsoleMessageToScript(e,t):this._addPendingConsoleMessage(e)}_rawLocation(e){if(e.scriptId)return this._debuggerModel.createRawLocationByScriptId(e.scriptId,e.line,e.column);const t=e.stackTrace&&e.stackTrace.callFrames?e.stackTrace.callFrames[0]:null;return t?this._debuggerModel.createRawLocationByScriptId(t.scriptId,t.lineNumber,t.columnNumber):e.url?this._debuggerModel.createRawLocationByURL(e.url,e.line,e.column):null}_addConsoleMessageToScript(e,t){this._presentationConsoleMessages.push(new rt(e,t,this._locationPool))}_addPendingConsoleMessage(e){if(!e.url)return;const t=this._pendingConsoleMessages.get(e.url);t?t.push(e):this._pendingConsoleMessages.set(e.url,[e])}_parsedScriptSource(e){const t=e.data,o=this._pendingConsoleMessages.get(t.sourceURL);if(!o)return;const s=[];for(const e of o){const o=this._rawLocation(e);o&&t.scriptId===o.scriptId?this._addConsoleMessageToScript(e,o):s.push(e)}s.length?this._pendingConsoleMessages.set(t.sourceURL,s):this._pendingConsoleMessages.delete(t.sourceURL)}_consoleCleared(){this._pendingConsoleMessages=new Map,this._debuggerReset()}_debuggerReset(){for(const e of this._presentationConsoleMessages)e.dispose();this._presentationConsoleMessages=[],this._locationPool.disposeAll()}}class rt{constructor(e,t,o){this._text=e.messageText,this._level=e.level===S.MessageLevel.Error?M.Message.Level.Error:M.Message.Level.Warning,ze.instance().createLiveLocation(t,this._updateLocation.bind(this),o)}async _updateLocation(e){this._uiMessage&&this._uiMessage.remove();const t=await e.uiLocation();t&&(this._uiMessage=t.uiSourceCode.addLineMessage(this._level,this._text,t.lineNumber,t.columnNumber))}dispose(){this._uiMessage&&this._uiMessage.remove()}}var it=Object.freeze({__proto__:null,PresentationConsoleMessageManager:class{constructor(){u.TargetManager.instance().observeModels(d.DebuggerModel,this),S.ConsoleModel.instance().addEventListener(S.Events.ConsoleCleared,this._consoleCleared,this),S.ConsoleModel.instance().addEventListener(S.Events.MessageAdded,(e=>this._consoleMessageAdded(e.data))),S.ConsoleModel.instance().messages().forEach(this._consoleMessageAdded,this)}modelAdded(e){ot.set(e,new st(e))}modelRemoved(e){const t=ot.get(e);t&&t._consoleCleared()}_consoleMessageAdded(e){const t=e.runtimeModel();if(!e.isErrorOrWarning()||!e.runtimeModel()||e.source===S.MessageSource.Violation||!t)return;const o=ot.get(t.debuggerModel());o&&o._consoleMessageAdded(e)}_consoleCleared(){for(const e of u.TargetManager.instance().models(d.DebuggerModel)){const t=ot.get(e);t&&t._consoleCleared()}}},PresentationConsoleMessageHelper:st,PresentationConsoleMessage:rt});class nt{constructor(){this._lastBlob=null}write(e){this._lastBlob&&e.unshift(this._lastBlob),this._lastBlob=new Blob(e,{type:"text/plain"})}read(){return this.readRange()}size(){return this._lastBlob?this._lastBlob.size:0}async readRange(e,t){if(!this._lastBlob)return i.Console.instance().error("Attempt to read a temp file that was never written"),"";const o="number"==typeof e||"number"==typeof t?this._lastBlob.slice(e,t):this._lastBlob,s=new FileReader;try{await new Promise(((e,t)=>{s.onloadend=e,s.onerror=t,s.readAsText(o)}))}catch(e){i.Console.instance().error("Failed to read from temp file: "+e.message)}return s.result}async copyToOutputStream(e,t){if(!this._lastBlob)return e.close(),null;const o=new et(this._lastBlob,1e7,t);return o.read(e).then((e=>e?null:o.error()))}remove(){this._lastBlob=null}}var at=Object.freeze({__proto__:null,TempFile:nt,TempFileBackingStorage:class{constructor(){this._file=null,this._strings,this._stringsLength,this.reset()}appendString(e){this._strings.push(e),this._stringsLength+=e.length;this._stringsLength>10485760&&this._flush()}appendAccessibleString(e){if(this._flush(),!this._file)return async()=>null;const t=this._file.size();return this._strings.push(e),this._flush(),this._file.readRange.bind(this._file,t,this._file.size())}_flush(){this._strings.length&&(this._file||(this._file=new nt),this._stringsLength=0,this._file.write(this._strings.splice(0)))}finishWriting(){this._flush()}reset(){this._file&&this._file.remove(),this._file=null,this._strings=[],this._stringsLength=0}writeToStream(e){return this._file?this._file.copyToOutputStream(e):Promise.resolve(null)}}});export{Ze as BreakpointManager,Te as CSSWorkspaceBinding,G as CompilerScriptMapping,U as ContentProviderBasedProject,ne as DebuggerLanguagePlugins,Ge as DebuggerWorkspaceBinding,de as DefaultScriptMapping,tt as FileUtils,j as IgnoreListManager,pe as LiveLocation,z as NetworkProject,it as PresentationConsoleMessageHelper,Be as ResourceMapping,xe as ResourceScriptMapping,Le as ResourceUtils,me as SASSSourceMapping,Ce as StylesSourceMapping,at as TempFile};
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
|
|
9
|
+
self.BindingsTestRunner = self.BindingsTestRunner || {};
|
|
10
|
+
|
|
11
|
+
BindingsTestRunner.addFiles = function(testFileSystem, files) {
|
|
12
|
+
for (const filePath in files) {
|
|
13
|
+
const file = files[filePath];
|
|
14
|
+
testFileSystem.addFile(filePath, file.content, (file.time ? file.time.getTime() : 0));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
let timeOverrides;
|
|
19
|
+
let originalRequestMetadata;
|
|
20
|
+
|
|
21
|
+
BindingsTestRunner.overrideNetworkModificationTime = function(urlToTime) {
|
|
22
|
+
if (!timeOverrides) {
|
|
23
|
+
timeOverrides = new Map();
|
|
24
|
+
originalRequestMetadata =
|
|
25
|
+
TestRunner.override(Bindings.ContentProviderBasedProject.prototype, 'requestMetadata', overrideTime, true);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
for (const url in urlToTime) {
|
|
29
|
+
timeOverrides.set(url, urlToTime[url]);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function overrideTime(uiSourceCode) {
|
|
33
|
+
if (!timeOverrides.has(uiSourceCode.url())) {
|
|
34
|
+
return originalRequestMetadata.call(this, uiSourceCode);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const override = timeOverrides.get(uiSourceCode.url());
|
|
38
|
+
return originalRequestMetadata.call(this, uiSourceCode).then(onOriginalMetadata.bind(null, override));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function onOriginalMetadata(timeOverride, metadata) {
|
|
42
|
+
if (!timeOverride && !metadata) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return new Workspace.UISourceCodeMetadata(timeOverride, (metadata ? metadata.contentSize : null));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
BindingsTestRunner.AutomappingTest = function(workspace) {
|
|
51
|
+
this._workspace = workspace;
|
|
52
|
+
this._networkProject = new Bindings.ContentProviderBasedProject(
|
|
53
|
+
this._workspace, 'AUTOMAPPING', Workspace.projectTypes.Network, 'simple website');
|
|
54
|
+
|
|
55
|
+
if (workspace !== self.Workspace.workspace) {
|
|
56
|
+
new Persistence.FileSystemWorkspaceBinding(self.Persistence.isolatedFileSystemManager, this._workspace);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
this._failedBindingsCount = 0;
|
|
60
|
+
this._automapping =
|
|
61
|
+
new Persistence.Automapping(this._workspace, this._onStatusAdded.bind(this), this._onStatusRemoved.bind(this));
|
|
62
|
+
TestRunner.addSniffer(this._automapping, '_onBindingFailedForTest', this._onBindingFailed.bind(this), true);
|
|
63
|
+
TestRunner.addSniffer(this._automapping, '_onSweepHappenedForTest', this._onSweepHappened.bind(this), true);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
BindingsTestRunner.AutomappingTest.prototype = {
|
|
67
|
+
removeResources: function(urls) {
|
|
68
|
+
for (const url of urls) {
|
|
69
|
+
this._networkProject.removeFile(url);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
addNetworkResources: function(assets) {
|
|
74
|
+
for (const url in assets) {
|
|
75
|
+
const asset = assets[url];
|
|
76
|
+
const contentType = asset.contentType || Common.resourceTypes.Script;
|
|
77
|
+
const contentProvider = TextUtils.StaticContentProvider.fromString(url, contentType, asset.content);
|
|
78
|
+
const metadata =
|
|
79
|
+
(typeof asset.content === 'string' || asset.time ?
|
|
80
|
+
new Workspace.UISourceCodeMetadata(asset.time, asset.content.length) :
|
|
81
|
+
null);
|
|
82
|
+
const uiSourceCode = this._networkProject.createUISourceCode(url, contentType);
|
|
83
|
+
this._networkProject.addUISourceCodeWithProvider(uiSourceCode, contentProvider, metadata);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
waitUntilMappingIsStabilized: function() {
|
|
88
|
+
const promise = new Promise(x => {
|
|
89
|
+
this._stabilizedCallback = x;
|
|
90
|
+
});
|
|
91
|
+
this._checkStabilized();
|
|
92
|
+
return promise;
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
_onSweepHappened: function() {
|
|
96
|
+
this._failedBindingsCount = 0;
|
|
97
|
+
this._checkStabilized();
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
_onStatusRemoved: function(status) {
|
|
101
|
+
TestRunner.addResult('Binding removed: ' + status);
|
|
102
|
+
this._checkStabilized();
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
_onStatusAdded: function(status) {
|
|
106
|
+
TestRunner.addResult('Binding created: ' + status);
|
|
107
|
+
this._checkStabilized();
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
_onBindingFailed: function() {
|
|
111
|
+
++this._failedBindingsCount;
|
|
112
|
+
this._checkStabilized();
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
_checkStabilized: function() {
|
|
116
|
+
if (!this._stabilizedCallback || this._automapping._sweepThrottler._process) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const networkUISourceCodes = this._workspace.uiSourceCodesForProjectType(Workspace.projectTypes.Network);
|
|
121
|
+
const stabilized = this._failedBindingsCount + this._automapping._statuses.size === networkUISourceCodes.length;
|
|
122
|
+
|
|
123
|
+
if (stabilized) {
|
|
124
|
+
TestRunner.addResult('Mapping has stabilized.');
|
|
125
|
+
const callback = this._stabilizedCallback;
|
|
126
|
+
delete this._stabilizedCallback;
|
|
127
|
+
callback.call(null);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
@@ -0,0 +1,238 @@
|
|
|
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.BindingsTestRunner = self.BindingsTestRunner || {};
|
|
9
|
+
|
|
10
|
+
BindingsTestRunner.cleanupURL = function(url) {
|
|
11
|
+
if (!url.startsWith('debugger://')) {
|
|
12
|
+
return url;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return url.replace(/VM\d+/g, 'VM[XXX]');
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
BindingsTestRunner.dumpWorkspace = function(previousSnapshot) {
|
|
19
|
+
const uiSourceCodes = self.Workspace.workspace.uiSourceCodes().slice();
|
|
20
|
+
let urls = uiSourceCodes.map(code => code.url());
|
|
21
|
+
|
|
22
|
+
urls = urls.map(BindingsTestRunner.cleanupURL);
|
|
23
|
+
|
|
24
|
+
urls.sort(String.caseInsensetiveComparator);
|
|
25
|
+
const isAdded = new Array(urls.length).fill(false);
|
|
26
|
+
let removedLines = [];
|
|
27
|
+
|
|
28
|
+
if (previousSnapshot) {
|
|
29
|
+
const diff = Diff.Diff.lineDiff(previousSnapshot, urls);
|
|
30
|
+
const removedEntries = diff.filter(entry => entry[0] === Diff.Diff.Operation.Delete).map(entry => entry[1]);
|
|
31
|
+
removedLines = [].concat.apply([], removedEntries);
|
|
32
|
+
let index = 0;
|
|
33
|
+
|
|
34
|
+
for (const entry of diff) {
|
|
35
|
+
if (entry[0] === Diff.Diff.Operation.Delete) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (entry[0] === Diff.Diff.Operation.Equal) {
|
|
40
|
+
index += entry[1].length;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// eslint-disable-next-line no-unused-vars
|
|
45
|
+
for (const line of entry[1]) {
|
|
46
|
+
isAdded[index++] = true;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
TestRunner.addResult(`Removed: ${removedLines.length} uiSourceCodes`);
|
|
52
|
+
|
|
53
|
+
for (const url of removedLines) {
|
|
54
|
+
TestRunner.addResult('[-] ' + url);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
TestRunner.addResult(`Workspace: ${urls.length} uiSourceCodes.`);
|
|
58
|
+
|
|
59
|
+
for (let i = 0; i < urls.length; ++i) {
|
|
60
|
+
const url = urls[i];
|
|
61
|
+
const prefix = (isAdded[i] ? '[+] ' : ' ');
|
|
62
|
+
TestRunner.addResult(prefix + url);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return urls;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
BindingsTestRunner.attachFrame = function(frameId, url, evalSourceURL) {
|
|
69
|
+
let evalSource = `(${attachFrame.toString()})('${frameId}', '${url}')`;
|
|
70
|
+
|
|
71
|
+
if (evalSourceURL) {
|
|
72
|
+
evalSource += '//# sourceURL=' + evalSourceURL;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return TestRunner.evaluateInPageAsync(evalSource);
|
|
76
|
+
|
|
77
|
+
function attachFrame(frameId, url) {
|
|
78
|
+
const frame = document.createElement('iframe');
|
|
79
|
+
frame.src = url;
|
|
80
|
+
frame.id = frameId;
|
|
81
|
+
document.body.appendChild(frame);
|
|
82
|
+
return new Promise(x => {
|
|
83
|
+
frame.onload = x;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
BindingsTestRunner.detachFrame = function(frameId, evalSourceURL) {
|
|
89
|
+
let evalSource = `(${detachFrame.toString()})('${frameId}')`;
|
|
90
|
+
|
|
91
|
+
if (evalSourceURL) {
|
|
92
|
+
evalSource += '//# sourceURL=' + evalSourceURL;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return TestRunner.evaluateInPageAnonymously(evalSource);
|
|
96
|
+
|
|
97
|
+
function detachFrame(frameId) {
|
|
98
|
+
const frame = document.getElementById(frameId);
|
|
99
|
+
frame.remove();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
BindingsTestRunner.navigateFrame = function(frameId, navigateURL, evalSourceURL) {
|
|
104
|
+
let evalSource = `(${navigateFrame.toString()})('${frameId}', '${navigateURL}')`;
|
|
105
|
+
|
|
106
|
+
if (evalSourceURL) {
|
|
107
|
+
evalSource += '//# sourceURL=' + evalSourceURL;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return TestRunner.evaluateInPageAsync(evalSource);
|
|
111
|
+
|
|
112
|
+
function navigateFrame(frameId, url) {
|
|
113
|
+
const frame = document.getElementById(frameId);
|
|
114
|
+
frame.src = url;
|
|
115
|
+
return new Promise(x => {
|
|
116
|
+
frame.onload = x;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
BindingsTestRunner.attachShadowDOM = function(id, templateSelector, evalSourceURL) {
|
|
122
|
+
let evalSource = `(${createShadowDOM.toString()})('${id}', '${templateSelector}')`;
|
|
123
|
+
|
|
124
|
+
if (evalSourceURL) {
|
|
125
|
+
evalSource += '//# sourceURL=' + evalSourceURL;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return TestRunner.evaluateInPageAnonymously(evalSource);
|
|
129
|
+
|
|
130
|
+
function createShadowDOM(id, templateSelector) {
|
|
131
|
+
const shadowHost = document.createElement('div');
|
|
132
|
+
shadowHost.setAttribute('id', id);
|
|
133
|
+
|
|
134
|
+
const shadowRoot = shadowHost.attachShadow({mode: 'open'});
|
|
135
|
+
|
|
136
|
+
const t = document.querySelector(templateSelector);
|
|
137
|
+
const instance = t.content.cloneNode(true);
|
|
138
|
+
shadowRoot.appendChild(instance);
|
|
139
|
+
document.body.appendChild(shadowHost);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
BindingsTestRunner.detachShadowDOM = function(id, evalSourceURL) {
|
|
144
|
+
let evalSource = `(${removeShadowDOM.toString()})('${id}')`;
|
|
145
|
+
|
|
146
|
+
if (evalSourceURL) {
|
|
147
|
+
evalSource += '//# sourceURL=' + evalSourceURL;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return TestRunner.evaluateInPageAnonymously(evalSource);
|
|
151
|
+
|
|
152
|
+
function removeShadowDOM(id) {
|
|
153
|
+
document.querySelector('#' + id).remove();
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
BindingsTestRunner.waitForStyleSheetRemoved = function(urlSuffix) {
|
|
158
|
+
let fulfill;
|
|
159
|
+
const promise = new Promise(x => {
|
|
160
|
+
fulfill = x;
|
|
161
|
+
});
|
|
162
|
+
TestRunner.cssModel.addEventListener(SDK.CSSModel.Events.StyleSheetRemoved, onStyleSheetRemoved);
|
|
163
|
+
return promise;
|
|
164
|
+
|
|
165
|
+
function onStyleSheetRemoved(event) {
|
|
166
|
+
const styleSheetHeader = event.data;
|
|
167
|
+
|
|
168
|
+
if (!styleSheetHeader.resourceURL().endsWith(urlSuffix)) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
TestRunner.cssModel.removeEventListener(SDK.CSSModel.Events.StyleSheetRemoved, onStyleSheetRemoved);
|
|
173
|
+
fulfill();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
TestRunner.addSniffer(Bindings.CompilerScriptMapping.prototype, '_sourceMapAttachedForTest', onSourceMap, true);
|
|
178
|
+
TestRunner.addSniffer(Bindings.SASSSourceMapping.prototype, '_sourceMapAttachedForTest', onSourceMap, true);
|
|
179
|
+
const sourceMapCallbacks = new Map();
|
|
180
|
+
|
|
181
|
+
function onSourceMap(sourceMap) {
|
|
182
|
+
for (const urlSuffix of sourceMapCallbacks.keys()) {
|
|
183
|
+
if (sourceMap.url().endsWith(urlSuffix)) {
|
|
184
|
+
const callback = sourceMapCallbacks.get(urlSuffix);
|
|
185
|
+
callback.call(null);
|
|
186
|
+
sourceMapCallbacks.delete(urlSuffix);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
BindingsTestRunner.waitForSourceMap = function(sourceMapURLSuffix) {
|
|
192
|
+
let fulfill;
|
|
193
|
+
const promise = new Promise(x => {
|
|
194
|
+
fulfill = x;
|
|
195
|
+
});
|
|
196
|
+
sourceMapCallbacks.set(sourceMapURLSuffix, fulfill);
|
|
197
|
+
return promise;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const locationPool = new Bindings.LiveLocationPool();
|
|
201
|
+
const nameSymbol = Symbol('LiveLocationNameForTest');
|
|
202
|
+
const createdSymbol = Symbol('LiveLocationCreated');
|
|
203
|
+
|
|
204
|
+
BindingsTestRunner.createDebuggerLiveLocation = function(name, urlSuffix, lineNumber, columnNumber) {
|
|
205
|
+
const script = TestRunner.debuggerModel.scripts().find(script => script.sourceURL.endsWith(urlSuffix));
|
|
206
|
+
const rawLocation = TestRunner.debuggerModel.createRawLocation(script, lineNumber || 0, columnNumber || 0);
|
|
207
|
+
return self.Bindings.debuggerWorkspaceBinding.createLiveLocation(
|
|
208
|
+
rawLocation, updateDelegate.bind(null, name), locationPool);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
BindingsTestRunner.createCSSLiveLocation = function(name, urlSuffix, lineNumber, columnNumber) {
|
|
212
|
+
const header = TestRunner.cssModel.styleSheetHeaders().find(header => header.resourceURL().endsWith(urlSuffix));
|
|
213
|
+
const rawLocation = new SDK.CSSLocation(header, lineNumber || 0, columnNumber || 0);
|
|
214
|
+
return self.Bindings.cssWorkspaceBinding.createLiveLocation(
|
|
215
|
+
rawLocation, updateDelegate.bind(null, name), locationPool);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
async function updateDelegate(name, liveLocation) {
|
|
219
|
+
liveLocation[nameSymbol] = name;
|
|
220
|
+
const hint = (liveLocation[createdSymbol] ? '[ UPDATE ]' : '[ CREATE ]');
|
|
221
|
+
liveLocation[createdSymbol] = true;
|
|
222
|
+
await BindingsTestRunner.dumpLocation(liveLocation, hint);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
BindingsTestRunner.dumpLocation = async function(liveLocation, hint) {
|
|
226
|
+
hint = hint || '[ GET ]';
|
|
227
|
+
const prefix = `${hint} LiveLocation-${liveLocation[nameSymbol]}: `;
|
|
228
|
+
const uiLocation = await liveLocation.uiLocation();
|
|
229
|
+
|
|
230
|
+
if (!uiLocation) {
|
|
231
|
+
TestRunner.addResult(prefix + 'null');
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
TestRunner.addResult(
|
|
236
|
+
prefix + BindingsTestRunner.cleanupURL(uiLocation.uiSourceCode.url()) + ':' + uiLocation.lineNumber + ':' +
|
|
237
|
+
uiLocation.columnNumber);
|
|
238
|
+
};
|