@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,1418 @@
|
|
|
1
|
+
import { tokTypes, SourceLocation, Node, lineBreak, isNewLine, Parser, Token, getLineInfo, lineBreakG, defaultOptions } from '../../../acorn/package/dist/acorn.mjs';
|
|
2
|
+
|
|
3
|
+
var dummyValue = "✖";
|
|
4
|
+
|
|
5
|
+
function isDummy(node) { return node.name === dummyValue }
|
|
6
|
+
|
|
7
|
+
function noop() {}
|
|
8
|
+
|
|
9
|
+
var LooseParser = function LooseParser(input, options) {
|
|
10
|
+
if ( options === void 0 ) options = {};
|
|
11
|
+
|
|
12
|
+
this.toks = this.constructor.BaseParser.tokenizer(input, options);
|
|
13
|
+
this.options = this.toks.options;
|
|
14
|
+
this.input = this.toks.input;
|
|
15
|
+
this.tok = this.last = {type: tokTypes.eof, start: 0, end: 0};
|
|
16
|
+
this.tok.validateRegExpFlags = noop;
|
|
17
|
+
this.tok.validateRegExpPattern = noop;
|
|
18
|
+
if (this.options.locations) {
|
|
19
|
+
var here = this.toks.curPosition();
|
|
20
|
+
this.tok.loc = new SourceLocation(this.toks, here, here);
|
|
21
|
+
}
|
|
22
|
+
this.ahead = []; // Tokens ahead
|
|
23
|
+
this.context = []; // Indentation contexted
|
|
24
|
+
this.curIndent = 0;
|
|
25
|
+
this.curLineStart = 0;
|
|
26
|
+
this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
|
|
27
|
+
this.inAsync = false;
|
|
28
|
+
this.inFunction = false;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
LooseParser.prototype.startNode = function startNode () {
|
|
32
|
+
return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
|
|
36
|
+
return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
|
|
40
|
+
if (this.options.locations) {
|
|
41
|
+
return new Node(this.toks, pos[0], pos[1])
|
|
42
|
+
} else {
|
|
43
|
+
return new Node(this.toks, pos)
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
LooseParser.prototype.finishNode = function finishNode (node, type) {
|
|
48
|
+
node.type = type;
|
|
49
|
+
node.end = this.last.end;
|
|
50
|
+
if (this.options.locations)
|
|
51
|
+
{ node.loc.end = this.last.loc.end; }
|
|
52
|
+
if (this.options.ranges)
|
|
53
|
+
{ node.range[1] = this.last.end; }
|
|
54
|
+
return node
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
LooseParser.prototype.dummyNode = function dummyNode (type) {
|
|
58
|
+
var dummy = this.startNode();
|
|
59
|
+
dummy.type = type;
|
|
60
|
+
dummy.end = dummy.start;
|
|
61
|
+
if (this.options.locations)
|
|
62
|
+
{ dummy.loc.end = dummy.loc.start; }
|
|
63
|
+
if (this.options.ranges)
|
|
64
|
+
{ dummy.range[1] = dummy.start; }
|
|
65
|
+
this.last = {type: tokTypes.name, start: dummy.start, end: dummy.start, loc: dummy.loc};
|
|
66
|
+
return dummy
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
LooseParser.prototype.dummyIdent = function dummyIdent () {
|
|
70
|
+
var dummy = this.dummyNode("Identifier");
|
|
71
|
+
dummy.name = dummyValue;
|
|
72
|
+
return dummy
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
LooseParser.prototype.dummyString = function dummyString () {
|
|
76
|
+
var dummy = this.dummyNode("Literal");
|
|
77
|
+
dummy.value = dummy.raw = dummyValue;
|
|
78
|
+
return dummy
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
LooseParser.prototype.eat = function eat (type) {
|
|
82
|
+
if (this.tok.type === type) {
|
|
83
|
+
this.next();
|
|
84
|
+
return true
|
|
85
|
+
} else {
|
|
86
|
+
return false
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
LooseParser.prototype.isContextual = function isContextual (name) {
|
|
91
|
+
return this.tok.type === tokTypes.name && this.tok.value === name
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
LooseParser.prototype.eatContextual = function eatContextual (name) {
|
|
95
|
+
return this.tok.value === name && this.eat(tokTypes.name)
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
|
|
99
|
+
return this.tok.type === tokTypes.eof || this.tok.type === tokTypes.braceR ||
|
|
100
|
+
lineBreak.test(this.input.slice(this.last.end, this.tok.start))
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
LooseParser.prototype.semicolon = function semicolon () {
|
|
104
|
+
return this.eat(tokTypes.semi)
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
LooseParser.prototype.expect = function expect (type) {
|
|
108
|
+
if (this.eat(type)) { return true }
|
|
109
|
+
for (var i = 1; i <= 2; i++) {
|
|
110
|
+
if (this.lookAhead(i).type === type) {
|
|
111
|
+
for (var j = 0; j < i; j++) { this.next(); }
|
|
112
|
+
return true
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
LooseParser.prototype.pushCx = function pushCx () {
|
|
118
|
+
this.context.push(this.curIndent);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
LooseParser.prototype.popCx = function popCx () {
|
|
122
|
+
this.curIndent = this.context.pop();
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
LooseParser.prototype.lineEnd = function lineEnd (pos) {
|
|
126
|
+
while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) { ++pos; }
|
|
127
|
+
return pos
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
|
|
131
|
+
for (var count = 0;; ++pos) {
|
|
132
|
+
var ch = this.input.charCodeAt(pos);
|
|
133
|
+
if (ch === 32) { ++count; }
|
|
134
|
+
else if (ch === 9) { count += this.options.tabSize; }
|
|
135
|
+
else { return count }
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
|
|
140
|
+
if (this.tok.type === closeTok || this.tok.type === tokTypes.eof) { return true }
|
|
141
|
+
return line !== this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
|
|
142
|
+
(!blockHeuristic || this.nextLineStart >= this.input.length ||
|
|
143
|
+
this.indentationAfter(this.nextLineStart) < indent)
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
|
|
147
|
+
for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
|
|
148
|
+
var ch = this.input.charCodeAt(p);
|
|
149
|
+
if (ch !== 9 && ch !== 32) { return false }
|
|
150
|
+
}
|
|
151
|
+
return true
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
LooseParser.prototype.extend = function extend (name, f) {
|
|
155
|
+
this[name] = f(this[name]);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
LooseParser.prototype.parse = function parse () {
|
|
159
|
+
this.next();
|
|
160
|
+
return this.parseTopLevel()
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
LooseParser.extend = function extend () {
|
|
164
|
+
var plugins = [], len = arguments.length;
|
|
165
|
+
while ( len-- ) plugins[ len ] = arguments[ len ];
|
|
166
|
+
|
|
167
|
+
var cls = this;
|
|
168
|
+
for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); }
|
|
169
|
+
return cls
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
LooseParser.parse = function parse (input, options) {
|
|
173
|
+
return new this(input, options).parse()
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
// Allows plugins to extend the base parser / tokenizer used
|
|
177
|
+
LooseParser.BaseParser = Parser;
|
|
178
|
+
|
|
179
|
+
var lp = LooseParser.prototype;
|
|
180
|
+
|
|
181
|
+
function isSpace(ch) {
|
|
182
|
+
return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
lp.next = function() {
|
|
186
|
+
this.last = this.tok;
|
|
187
|
+
if (this.ahead.length)
|
|
188
|
+
{ this.tok = this.ahead.shift(); }
|
|
189
|
+
else
|
|
190
|
+
{ this.tok = this.readToken(); }
|
|
191
|
+
|
|
192
|
+
if (this.tok.start >= this.nextLineStart) {
|
|
193
|
+
while (this.tok.start >= this.nextLineStart) {
|
|
194
|
+
this.curLineStart = this.nextLineStart;
|
|
195
|
+
this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
|
|
196
|
+
}
|
|
197
|
+
this.curIndent = this.indentationAfter(this.curLineStart);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
lp.readToken = function() {
|
|
202
|
+
for (;;) {
|
|
203
|
+
try {
|
|
204
|
+
this.toks.next();
|
|
205
|
+
if (this.toks.type === tokTypes.dot &&
|
|
206
|
+
this.input.substr(this.toks.end, 1) === "." &&
|
|
207
|
+
this.options.ecmaVersion >= 6) {
|
|
208
|
+
this.toks.end++;
|
|
209
|
+
this.toks.type = tokTypes.ellipsis;
|
|
210
|
+
}
|
|
211
|
+
return new Token(this.toks)
|
|
212
|
+
} catch (e) {
|
|
213
|
+
if (!(e instanceof SyntaxError)) { throw e }
|
|
214
|
+
|
|
215
|
+
// Try to skip some text, based on the error message, and then continue
|
|
216
|
+
var msg = e.message, pos = e.raisedAt, replace = true;
|
|
217
|
+
if (/unterminated/i.test(msg)) {
|
|
218
|
+
pos = this.lineEnd(e.pos + 1);
|
|
219
|
+
if (/string/.test(msg)) {
|
|
220
|
+
replace = {start: e.pos, end: pos, type: tokTypes.string, value: this.input.slice(e.pos + 1, pos)};
|
|
221
|
+
} else if (/regular expr/i.test(msg)) {
|
|
222
|
+
var re = this.input.slice(e.pos, pos);
|
|
223
|
+
try { re = new RegExp(re); } catch (e) { /* ignore compilation error due to new syntax */ }
|
|
224
|
+
replace = {start: e.pos, end: pos, type: tokTypes.regexp, value: re};
|
|
225
|
+
} else if (/template/.test(msg)) {
|
|
226
|
+
replace = {
|
|
227
|
+
start: e.pos,
|
|
228
|
+
end: pos,
|
|
229
|
+
type: tokTypes.template,
|
|
230
|
+
value: this.input.slice(e.pos, pos)
|
|
231
|
+
};
|
|
232
|
+
} else {
|
|
233
|
+
replace = false;
|
|
234
|
+
}
|
|
235
|
+
} else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
|
|
236
|
+
while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) { ++pos; }
|
|
237
|
+
} else if (/character escape|expected hexadecimal/i.test(msg)) {
|
|
238
|
+
while (pos < this.input.length) {
|
|
239
|
+
var ch = this.input.charCodeAt(pos++);
|
|
240
|
+
if (ch === 34 || ch === 39 || isNewLine(ch)) { break }
|
|
241
|
+
}
|
|
242
|
+
} else if (/unexpected character/i.test(msg)) {
|
|
243
|
+
pos++;
|
|
244
|
+
replace = false;
|
|
245
|
+
} else if (/regular expression/i.test(msg)) {
|
|
246
|
+
replace = true;
|
|
247
|
+
} else {
|
|
248
|
+
throw e
|
|
249
|
+
}
|
|
250
|
+
this.resetTo(pos);
|
|
251
|
+
if (replace === true) { replace = {start: pos, end: pos, type: tokTypes.name, value: dummyValue}; }
|
|
252
|
+
if (replace) {
|
|
253
|
+
if (this.options.locations)
|
|
254
|
+
{ replace.loc = new SourceLocation(
|
|
255
|
+
this.toks,
|
|
256
|
+
getLineInfo(this.input, replace.start),
|
|
257
|
+
getLineInfo(this.input, replace.end)); }
|
|
258
|
+
return replace
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
lp.resetTo = function(pos) {
|
|
265
|
+
this.toks.pos = pos;
|
|
266
|
+
var ch = this.input.charAt(pos - 1);
|
|
267
|
+
this.toks.exprAllowed = !ch || /[[{(,;:?/*=+\-~!|&%^<>]/.test(ch) ||
|
|
268
|
+
/[enwfd]/.test(ch) &&
|
|
269
|
+
/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(pos - 10, pos));
|
|
270
|
+
|
|
271
|
+
if (this.options.locations) {
|
|
272
|
+
this.toks.curLine = 1;
|
|
273
|
+
this.toks.lineStart = lineBreakG.lastIndex = 0;
|
|
274
|
+
var match;
|
|
275
|
+
while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
|
|
276
|
+
++this.toks.curLine;
|
|
277
|
+
this.toks.lineStart = match.index + match[0].length;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
lp.lookAhead = function(n) {
|
|
283
|
+
while (n > this.ahead.length)
|
|
284
|
+
{ this.ahead.push(this.readToken()); }
|
|
285
|
+
return this.ahead[n - 1]
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
var lp$1 = LooseParser.prototype;
|
|
289
|
+
|
|
290
|
+
lp$1.parseTopLevel = function() {
|
|
291
|
+
var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0);
|
|
292
|
+
node.body = [];
|
|
293
|
+
while (this.tok.type !== tokTypes.eof) { node.body.push(this.parseStatement()); }
|
|
294
|
+
this.toks.adaptDirectivePrologue(node.body);
|
|
295
|
+
this.last = this.tok;
|
|
296
|
+
node.sourceType = this.options.sourceType;
|
|
297
|
+
return this.finishNode(node, "Program")
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
lp$1.parseStatement = function() {
|
|
301
|
+
var starttype = this.tok.type, node = this.startNode(), kind;
|
|
302
|
+
|
|
303
|
+
if (this.toks.isLet()) {
|
|
304
|
+
starttype = tokTypes._var;
|
|
305
|
+
kind = "let";
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
switch (starttype) {
|
|
309
|
+
case tokTypes._break: case tokTypes._continue:
|
|
310
|
+
this.next();
|
|
311
|
+
var isBreak = starttype === tokTypes._break;
|
|
312
|
+
if (this.semicolon() || this.canInsertSemicolon()) {
|
|
313
|
+
node.label = null;
|
|
314
|
+
} else {
|
|
315
|
+
node.label = this.tok.type === tokTypes.name ? this.parseIdent() : null;
|
|
316
|
+
this.semicolon();
|
|
317
|
+
}
|
|
318
|
+
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
|
|
319
|
+
|
|
320
|
+
case tokTypes._debugger:
|
|
321
|
+
this.next();
|
|
322
|
+
this.semicolon();
|
|
323
|
+
return this.finishNode(node, "DebuggerStatement")
|
|
324
|
+
|
|
325
|
+
case tokTypes._do:
|
|
326
|
+
this.next();
|
|
327
|
+
node.body = this.parseStatement();
|
|
328
|
+
node.test = this.eat(tokTypes._while) ? this.parseParenExpression() : this.dummyIdent();
|
|
329
|
+
this.semicolon();
|
|
330
|
+
return this.finishNode(node, "DoWhileStatement")
|
|
331
|
+
|
|
332
|
+
case tokTypes._for:
|
|
333
|
+
this.next(); // `for` keyword
|
|
334
|
+
var isAwait = this.options.ecmaVersion >= 9 && this.eatContextual("await");
|
|
335
|
+
|
|
336
|
+
this.pushCx();
|
|
337
|
+
this.expect(tokTypes.parenL);
|
|
338
|
+
if (this.tok.type === tokTypes.semi) { return this.parseFor(node, null) }
|
|
339
|
+
var isLet = this.toks.isLet();
|
|
340
|
+
if (isLet || this.tok.type === tokTypes._var || this.tok.type === tokTypes._const) {
|
|
341
|
+
var init$1 = this.parseVar(this.startNode(), true, isLet ? "let" : this.tok.value);
|
|
342
|
+
if (init$1.declarations.length === 1 && (this.tok.type === tokTypes._in || this.isContextual("of"))) {
|
|
343
|
+
if (this.options.ecmaVersion >= 9 && this.tok.type !== tokTypes._in) {
|
|
344
|
+
node.await = isAwait;
|
|
345
|
+
}
|
|
346
|
+
return this.parseForIn(node, init$1)
|
|
347
|
+
}
|
|
348
|
+
return this.parseFor(node, init$1)
|
|
349
|
+
}
|
|
350
|
+
var init = this.parseExpression(true);
|
|
351
|
+
if (this.tok.type === tokTypes._in || this.isContextual("of")) {
|
|
352
|
+
if (this.options.ecmaVersion >= 9 && this.tok.type !== tokTypes._in) {
|
|
353
|
+
node.await = isAwait;
|
|
354
|
+
}
|
|
355
|
+
return this.parseForIn(node, this.toAssignable(init))
|
|
356
|
+
}
|
|
357
|
+
return this.parseFor(node, init)
|
|
358
|
+
|
|
359
|
+
case tokTypes._function:
|
|
360
|
+
this.next();
|
|
361
|
+
return this.parseFunction(node, true)
|
|
362
|
+
|
|
363
|
+
case tokTypes._if:
|
|
364
|
+
this.next();
|
|
365
|
+
node.test = this.parseParenExpression();
|
|
366
|
+
node.consequent = this.parseStatement();
|
|
367
|
+
node.alternate = this.eat(tokTypes._else) ? this.parseStatement() : null;
|
|
368
|
+
return this.finishNode(node, "IfStatement")
|
|
369
|
+
|
|
370
|
+
case tokTypes._return:
|
|
371
|
+
this.next();
|
|
372
|
+
if (this.eat(tokTypes.semi) || this.canInsertSemicolon()) { node.argument = null; }
|
|
373
|
+
else { node.argument = this.parseExpression(); this.semicolon(); }
|
|
374
|
+
return this.finishNode(node, "ReturnStatement")
|
|
375
|
+
|
|
376
|
+
case tokTypes._switch:
|
|
377
|
+
var blockIndent = this.curIndent, line = this.curLineStart;
|
|
378
|
+
this.next();
|
|
379
|
+
node.discriminant = this.parseParenExpression();
|
|
380
|
+
node.cases = [];
|
|
381
|
+
this.pushCx();
|
|
382
|
+
this.expect(tokTypes.braceL);
|
|
383
|
+
|
|
384
|
+
var cur;
|
|
385
|
+
while (!this.closes(tokTypes.braceR, blockIndent, line, true)) {
|
|
386
|
+
if (this.tok.type === tokTypes._case || this.tok.type === tokTypes._default) {
|
|
387
|
+
var isCase = this.tok.type === tokTypes._case;
|
|
388
|
+
if (cur) { this.finishNode(cur, "SwitchCase"); }
|
|
389
|
+
node.cases.push(cur = this.startNode());
|
|
390
|
+
cur.consequent = [];
|
|
391
|
+
this.next();
|
|
392
|
+
if (isCase) { cur.test = this.parseExpression(); }
|
|
393
|
+
else { cur.test = null; }
|
|
394
|
+
this.expect(tokTypes.colon);
|
|
395
|
+
} else {
|
|
396
|
+
if (!cur) {
|
|
397
|
+
node.cases.push(cur = this.startNode());
|
|
398
|
+
cur.consequent = [];
|
|
399
|
+
cur.test = null;
|
|
400
|
+
}
|
|
401
|
+
cur.consequent.push(this.parseStatement());
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
if (cur) { this.finishNode(cur, "SwitchCase"); }
|
|
405
|
+
this.popCx();
|
|
406
|
+
this.eat(tokTypes.braceR);
|
|
407
|
+
return this.finishNode(node, "SwitchStatement")
|
|
408
|
+
|
|
409
|
+
case tokTypes._throw:
|
|
410
|
+
this.next();
|
|
411
|
+
node.argument = this.parseExpression();
|
|
412
|
+
this.semicolon();
|
|
413
|
+
return this.finishNode(node, "ThrowStatement")
|
|
414
|
+
|
|
415
|
+
case tokTypes._try:
|
|
416
|
+
this.next();
|
|
417
|
+
node.block = this.parseBlock();
|
|
418
|
+
node.handler = null;
|
|
419
|
+
if (this.tok.type === tokTypes._catch) {
|
|
420
|
+
var clause = this.startNode();
|
|
421
|
+
this.next();
|
|
422
|
+
if (this.eat(tokTypes.parenL)) {
|
|
423
|
+
clause.param = this.toAssignable(this.parseExprAtom(), true);
|
|
424
|
+
this.expect(tokTypes.parenR);
|
|
425
|
+
} else {
|
|
426
|
+
clause.param = null;
|
|
427
|
+
}
|
|
428
|
+
clause.body = this.parseBlock();
|
|
429
|
+
node.handler = this.finishNode(clause, "CatchClause");
|
|
430
|
+
}
|
|
431
|
+
node.finalizer = this.eat(tokTypes._finally) ? this.parseBlock() : null;
|
|
432
|
+
if (!node.handler && !node.finalizer) { return node.block }
|
|
433
|
+
return this.finishNode(node, "TryStatement")
|
|
434
|
+
|
|
435
|
+
case tokTypes._var:
|
|
436
|
+
case tokTypes._const:
|
|
437
|
+
return this.parseVar(node, false, kind || this.tok.value)
|
|
438
|
+
|
|
439
|
+
case tokTypes._while:
|
|
440
|
+
this.next();
|
|
441
|
+
node.test = this.parseParenExpression();
|
|
442
|
+
node.body = this.parseStatement();
|
|
443
|
+
return this.finishNode(node, "WhileStatement")
|
|
444
|
+
|
|
445
|
+
case tokTypes._with:
|
|
446
|
+
this.next();
|
|
447
|
+
node.object = this.parseParenExpression();
|
|
448
|
+
node.body = this.parseStatement();
|
|
449
|
+
return this.finishNode(node, "WithStatement")
|
|
450
|
+
|
|
451
|
+
case tokTypes.braceL:
|
|
452
|
+
return this.parseBlock()
|
|
453
|
+
|
|
454
|
+
case tokTypes.semi:
|
|
455
|
+
this.next();
|
|
456
|
+
return this.finishNode(node, "EmptyStatement")
|
|
457
|
+
|
|
458
|
+
case tokTypes._class:
|
|
459
|
+
return this.parseClass(true)
|
|
460
|
+
|
|
461
|
+
case tokTypes._import:
|
|
462
|
+
if (this.options.ecmaVersion > 10) {
|
|
463
|
+
var nextType = this.lookAhead(1).type;
|
|
464
|
+
if (nextType === tokTypes.parenL || nextType === tokTypes.dot) {
|
|
465
|
+
node.expression = this.parseExpression();
|
|
466
|
+
this.semicolon();
|
|
467
|
+
return this.finishNode(node, "ExpressionStatement")
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
return this.parseImport()
|
|
472
|
+
|
|
473
|
+
case tokTypes._export:
|
|
474
|
+
return this.parseExport()
|
|
475
|
+
|
|
476
|
+
default:
|
|
477
|
+
if (this.toks.isAsyncFunction()) {
|
|
478
|
+
this.next();
|
|
479
|
+
this.next();
|
|
480
|
+
return this.parseFunction(node, true, true)
|
|
481
|
+
}
|
|
482
|
+
var expr = this.parseExpression();
|
|
483
|
+
if (isDummy(expr)) {
|
|
484
|
+
this.next();
|
|
485
|
+
if (this.tok.type === tokTypes.eof) { return this.finishNode(node, "EmptyStatement") }
|
|
486
|
+
return this.parseStatement()
|
|
487
|
+
} else if (starttype === tokTypes.name && expr.type === "Identifier" && this.eat(tokTypes.colon)) {
|
|
488
|
+
node.body = this.parseStatement();
|
|
489
|
+
node.label = expr;
|
|
490
|
+
return this.finishNode(node, "LabeledStatement")
|
|
491
|
+
} else {
|
|
492
|
+
node.expression = expr;
|
|
493
|
+
this.semicolon();
|
|
494
|
+
return this.finishNode(node, "ExpressionStatement")
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
lp$1.parseBlock = function() {
|
|
500
|
+
var node = this.startNode();
|
|
501
|
+
this.pushCx();
|
|
502
|
+
this.expect(tokTypes.braceL);
|
|
503
|
+
var blockIndent = this.curIndent, line = this.curLineStart;
|
|
504
|
+
node.body = [];
|
|
505
|
+
while (!this.closes(tokTypes.braceR, blockIndent, line, true))
|
|
506
|
+
{ node.body.push(this.parseStatement()); }
|
|
507
|
+
this.popCx();
|
|
508
|
+
this.eat(tokTypes.braceR);
|
|
509
|
+
return this.finishNode(node, "BlockStatement")
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
lp$1.parseFor = function(node, init) {
|
|
513
|
+
node.init = init;
|
|
514
|
+
node.test = node.update = null;
|
|
515
|
+
if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.semi) { node.test = this.parseExpression(); }
|
|
516
|
+
if (this.eat(tokTypes.semi) && this.tok.type !== tokTypes.parenR) { node.update = this.parseExpression(); }
|
|
517
|
+
this.popCx();
|
|
518
|
+
this.expect(tokTypes.parenR);
|
|
519
|
+
node.body = this.parseStatement();
|
|
520
|
+
return this.finishNode(node, "ForStatement")
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
lp$1.parseForIn = function(node, init) {
|
|
524
|
+
var type = this.tok.type === tokTypes._in ? "ForInStatement" : "ForOfStatement";
|
|
525
|
+
this.next();
|
|
526
|
+
node.left = init;
|
|
527
|
+
node.right = this.parseExpression();
|
|
528
|
+
this.popCx();
|
|
529
|
+
this.expect(tokTypes.parenR);
|
|
530
|
+
node.body = this.parseStatement();
|
|
531
|
+
return this.finishNode(node, type)
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
lp$1.parseVar = function(node, noIn, kind) {
|
|
535
|
+
node.kind = kind;
|
|
536
|
+
this.next();
|
|
537
|
+
node.declarations = [];
|
|
538
|
+
do {
|
|
539
|
+
var decl = this.startNode();
|
|
540
|
+
decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent();
|
|
541
|
+
decl.init = this.eat(tokTypes.eq) ? this.parseMaybeAssign(noIn) : null;
|
|
542
|
+
node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
|
|
543
|
+
} while (this.eat(tokTypes.comma))
|
|
544
|
+
if (!node.declarations.length) {
|
|
545
|
+
var decl$1 = this.startNode();
|
|
546
|
+
decl$1.id = this.dummyIdent();
|
|
547
|
+
node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"));
|
|
548
|
+
}
|
|
549
|
+
if (!noIn) { this.semicolon(); }
|
|
550
|
+
return this.finishNode(node, "VariableDeclaration")
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
lp$1.parseClass = function(isStatement) {
|
|
554
|
+
var node = this.startNode();
|
|
555
|
+
this.next();
|
|
556
|
+
if (this.tok.type === tokTypes.name) { node.id = this.parseIdent(); }
|
|
557
|
+
else if (isStatement === true) { node.id = this.dummyIdent(); }
|
|
558
|
+
else { node.id = null; }
|
|
559
|
+
node.superClass = this.eat(tokTypes._extends) ? this.parseExpression() : null;
|
|
560
|
+
node.body = this.startNode();
|
|
561
|
+
node.body.body = [];
|
|
562
|
+
this.pushCx();
|
|
563
|
+
var indent = this.curIndent + 1, line = this.curLineStart;
|
|
564
|
+
this.eat(tokTypes.braceL);
|
|
565
|
+
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
|
|
566
|
+
while (!this.closes(tokTypes.braceR, indent, line)) {
|
|
567
|
+
if (this.semicolon()) { continue }
|
|
568
|
+
var method = this.startNode(), isGenerator = (void 0), isAsync = (void 0);
|
|
569
|
+
if (this.options.ecmaVersion >= 6) {
|
|
570
|
+
method.static = false;
|
|
571
|
+
isGenerator = this.eat(tokTypes.star);
|
|
572
|
+
}
|
|
573
|
+
this.parsePropertyName(method);
|
|
574
|
+
if (isDummy(method.key)) { if (isDummy(this.parseMaybeAssign())) { this.next(); } this.eat(tokTypes.comma); continue }
|
|
575
|
+
if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
|
|
576
|
+
(this.tok.type !== tokTypes.parenL && this.tok.type !== tokTypes.braceL)) {
|
|
577
|
+
method.static = true;
|
|
578
|
+
isGenerator = this.eat(tokTypes.star);
|
|
579
|
+
this.parsePropertyName(method);
|
|
580
|
+
} else {
|
|
581
|
+
method.static = false;
|
|
582
|
+
}
|
|
583
|
+
if (!method.computed &&
|
|
584
|
+
method.key.type === "Identifier" && method.key.name === "async" && this.tok.type !== tokTypes.parenL &&
|
|
585
|
+
!this.canInsertSemicolon()) {
|
|
586
|
+
isAsync = true;
|
|
587
|
+
isGenerator = this.options.ecmaVersion >= 9 && this.eat(tokTypes.star);
|
|
588
|
+
this.parsePropertyName(method);
|
|
589
|
+
} else {
|
|
590
|
+
isAsync = false;
|
|
591
|
+
}
|
|
592
|
+
if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
|
|
593
|
+
!method.computed && (method.key.name === "get" || method.key.name === "set") &&
|
|
594
|
+
this.tok.type !== tokTypes.parenL && this.tok.type !== tokTypes.braceL) {
|
|
595
|
+
method.kind = method.key.name;
|
|
596
|
+
this.parsePropertyName(method);
|
|
597
|
+
method.value = this.parseMethod(false);
|
|
598
|
+
} else {
|
|
599
|
+
if (!method.computed && !method.static && !isGenerator && !isAsync && (
|
|
600
|
+
method.key.type === "Identifier" && method.key.name === "constructor" ||
|
|
601
|
+
method.key.type === "Literal" && method.key.value === "constructor")) {
|
|
602
|
+
method.kind = "constructor";
|
|
603
|
+
} else {
|
|
604
|
+
method.kind = "method";
|
|
605
|
+
}
|
|
606
|
+
method.value = this.parseMethod(isGenerator, isAsync);
|
|
607
|
+
}
|
|
608
|
+
node.body.body.push(this.finishNode(method, "MethodDefinition"));
|
|
609
|
+
}
|
|
610
|
+
this.popCx();
|
|
611
|
+
if (!this.eat(tokTypes.braceR)) {
|
|
612
|
+
// If there is no closing brace, make the node span to the start
|
|
613
|
+
// of the next token (this is useful for Tern)
|
|
614
|
+
this.last.end = this.tok.start;
|
|
615
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
616
|
+
}
|
|
617
|
+
this.semicolon();
|
|
618
|
+
this.finishNode(node.body, "ClassBody");
|
|
619
|
+
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
lp$1.parseFunction = function(node, isStatement, isAsync) {
|
|
623
|
+
var oldInAsync = this.inAsync, oldInFunction = this.inFunction;
|
|
624
|
+
this.initFunction(node);
|
|
625
|
+
if (this.options.ecmaVersion >= 6) {
|
|
626
|
+
node.generator = this.eat(tokTypes.star);
|
|
627
|
+
}
|
|
628
|
+
if (this.options.ecmaVersion >= 8) {
|
|
629
|
+
node.async = !!isAsync;
|
|
630
|
+
}
|
|
631
|
+
if (this.tok.type === tokTypes.name) { node.id = this.parseIdent(); }
|
|
632
|
+
else if (isStatement === true) { node.id = this.dummyIdent(); }
|
|
633
|
+
this.inAsync = node.async;
|
|
634
|
+
this.inFunction = true;
|
|
635
|
+
node.params = this.parseFunctionParams();
|
|
636
|
+
node.body = this.parseBlock();
|
|
637
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
638
|
+
this.inAsync = oldInAsync;
|
|
639
|
+
this.inFunction = oldInFunction;
|
|
640
|
+
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
lp$1.parseExport = function() {
|
|
644
|
+
var node = this.startNode();
|
|
645
|
+
this.next();
|
|
646
|
+
if (this.eat(tokTypes.star)) {
|
|
647
|
+
if (this.options.ecmaVersion >= 11) {
|
|
648
|
+
if (this.eatContextual("as")) {
|
|
649
|
+
node.exported = this.parseExprAtom();
|
|
650
|
+
} else {
|
|
651
|
+
node.exported = null;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString();
|
|
655
|
+
return this.finishNode(node, "ExportAllDeclaration")
|
|
656
|
+
}
|
|
657
|
+
if (this.eat(tokTypes._default)) {
|
|
658
|
+
// export default (function foo() {}) // This is FunctionExpression.
|
|
659
|
+
var isAsync;
|
|
660
|
+
if (this.tok.type === tokTypes._function || (isAsync = this.toks.isAsyncFunction())) {
|
|
661
|
+
var fNode = this.startNode();
|
|
662
|
+
this.next();
|
|
663
|
+
if (isAsync) { this.next(); }
|
|
664
|
+
node.declaration = this.parseFunction(fNode, "nullableID", isAsync);
|
|
665
|
+
} else if (this.tok.type === tokTypes._class) {
|
|
666
|
+
node.declaration = this.parseClass("nullableID");
|
|
667
|
+
} else {
|
|
668
|
+
node.declaration = this.parseMaybeAssign();
|
|
669
|
+
this.semicolon();
|
|
670
|
+
}
|
|
671
|
+
return this.finishNode(node, "ExportDefaultDeclaration")
|
|
672
|
+
}
|
|
673
|
+
if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
|
|
674
|
+
node.declaration = this.parseStatement();
|
|
675
|
+
node.specifiers = [];
|
|
676
|
+
node.source = null;
|
|
677
|
+
} else {
|
|
678
|
+
node.declaration = null;
|
|
679
|
+
node.specifiers = this.parseExportSpecifierList();
|
|
680
|
+
node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
|
|
681
|
+
this.semicolon();
|
|
682
|
+
}
|
|
683
|
+
return this.finishNode(node, "ExportNamedDeclaration")
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
lp$1.parseImport = function() {
|
|
687
|
+
var node = this.startNode();
|
|
688
|
+
this.next();
|
|
689
|
+
if (this.tok.type === tokTypes.string) {
|
|
690
|
+
node.specifiers = [];
|
|
691
|
+
node.source = this.parseExprAtom();
|
|
692
|
+
} else {
|
|
693
|
+
var elt;
|
|
694
|
+
if (this.tok.type === tokTypes.name && this.tok.value !== "from") {
|
|
695
|
+
elt = this.startNode();
|
|
696
|
+
elt.local = this.parseIdent();
|
|
697
|
+
this.finishNode(elt, "ImportDefaultSpecifier");
|
|
698
|
+
this.eat(tokTypes.comma);
|
|
699
|
+
}
|
|
700
|
+
node.specifiers = this.parseImportSpecifiers();
|
|
701
|
+
node.source = this.eatContextual("from") && this.tok.type === tokTypes.string ? this.parseExprAtom() : this.dummyString();
|
|
702
|
+
if (elt) { node.specifiers.unshift(elt); }
|
|
703
|
+
}
|
|
704
|
+
this.semicolon();
|
|
705
|
+
return this.finishNode(node, "ImportDeclaration")
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
lp$1.parseImportSpecifiers = function() {
|
|
709
|
+
var elts = [];
|
|
710
|
+
if (this.tok.type === tokTypes.star) {
|
|
711
|
+
var elt = this.startNode();
|
|
712
|
+
this.next();
|
|
713
|
+
elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent();
|
|
714
|
+
elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"));
|
|
715
|
+
} else {
|
|
716
|
+
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
|
717
|
+
this.pushCx();
|
|
718
|
+
this.eat(tokTypes.braceL);
|
|
719
|
+
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
|
720
|
+
while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
|
721
|
+
var elt$1 = this.startNode();
|
|
722
|
+
if (this.eat(tokTypes.star)) {
|
|
723
|
+
elt$1.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent();
|
|
724
|
+
this.finishNode(elt$1, "ImportNamespaceSpecifier");
|
|
725
|
+
} else {
|
|
726
|
+
if (this.isContextual("from")) { break }
|
|
727
|
+
elt$1.imported = this.parseIdent();
|
|
728
|
+
if (isDummy(elt$1.imported)) { break }
|
|
729
|
+
elt$1.local = this.eatContextual("as") ? this.parseIdent() : elt$1.imported;
|
|
730
|
+
this.finishNode(elt$1, "ImportSpecifier");
|
|
731
|
+
}
|
|
732
|
+
elts.push(elt$1);
|
|
733
|
+
this.eat(tokTypes.comma);
|
|
734
|
+
}
|
|
735
|
+
this.eat(tokTypes.braceR);
|
|
736
|
+
this.popCx();
|
|
737
|
+
}
|
|
738
|
+
return elts
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
lp$1.parseExportSpecifierList = function() {
|
|
742
|
+
var elts = [];
|
|
743
|
+
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
|
744
|
+
this.pushCx();
|
|
745
|
+
this.eat(tokTypes.braceL);
|
|
746
|
+
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
|
747
|
+
while (!this.closes(tokTypes.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
|
748
|
+
if (this.isContextual("from")) { break }
|
|
749
|
+
var elt = this.startNode();
|
|
750
|
+
elt.local = this.parseIdent();
|
|
751
|
+
if (isDummy(elt.local)) { break }
|
|
752
|
+
elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local;
|
|
753
|
+
this.finishNode(elt, "ExportSpecifier");
|
|
754
|
+
elts.push(elt);
|
|
755
|
+
this.eat(tokTypes.comma);
|
|
756
|
+
}
|
|
757
|
+
this.eat(tokTypes.braceR);
|
|
758
|
+
this.popCx();
|
|
759
|
+
return elts
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
var lp$2 = LooseParser.prototype;
|
|
763
|
+
|
|
764
|
+
lp$2.checkLVal = function(expr) {
|
|
765
|
+
if (!expr) { return expr }
|
|
766
|
+
switch (expr.type) {
|
|
767
|
+
case "Identifier":
|
|
768
|
+
case "MemberExpression":
|
|
769
|
+
return expr
|
|
770
|
+
|
|
771
|
+
case "ParenthesizedExpression":
|
|
772
|
+
expr.expression = this.checkLVal(expr.expression);
|
|
773
|
+
return expr
|
|
774
|
+
|
|
775
|
+
default:
|
|
776
|
+
return this.dummyIdent()
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
|
|
780
|
+
lp$2.parseExpression = function(noIn) {
|
|
781
|
+
var start = this.storeCurrentPos();
|
|
782
|
+
var expr = this.parseMaybeAssign(noIn);
|
|
783
|
+
if (this.tok.type === tokTypes.comma) {
|
|
784
|
+
var node = this.startNodeAt(start);
|
|
785
|
+
node.expressions = [expr];
|
|
786
|
+
while (this.eat(tokTypes.comma)) { node.expressions.push(this.parseMaybeAssign(noIn)); }
|
|
787
|
+
return this.finishNode(node, "SequenceExpression")
|
|
788
|
+
}
|
|
789
|
+
return expr
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
lp$2.parseParenExpression = function() {
|
|
793
|
+
this.pushCx();
|
|
794
|
+
this.expect(tokTypes.parenL);
|
|
795
|
+
var val = this.parseExpression();
|
|
796
|
+
this.popCx();
|
|
797
|
+
this.expect(tokTypes.parenR);
|
|
798
|
+
return val
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
lp$2.parseMaybeAssign = function(noIn) {
|
|
802
|
+
if (this.toks.isContextual("yield")) {
|
|
803
|
+
var node = this.startNode();
|
|
804
|
+
this.next();
|
|
805
|
+
if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type !== tokTypes.star && !this.tok.type.startsExpr)) {
|
|
806
|
+
node.delegate = false;
|
|
807
|
+
node.argument = null;
|
|
808
|
+
} else {
|
|
809
|
+
node.delegate = this.eat(tokTypes.star);
|
|
810
|
+
node.argument = this.parseMaybeAssign();
|
|
811
|
+
}
|
|
812
|
+
return this.finishNode(node, "YieldExpression")
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
var start = this.storeCurrentPos();
|
|
816
|
+
var left = this.parseMaybeConditional(noIn);
|
|
817
|
+
if (this.tok.type.isAssign) {
|
|
818
|
+
var node$1 = this.startNodeAt(start);
|
|
819
|
+
node$1.operator = this.tok.value;
|
|
820
|
+
node$1.left = this.tok.type === tokTypes.eq ? this.toAssignable(left) : this.checkLVal(left);
|
|
821
|
+
this.next();
|
|
822
|
+
node$1.right = this.parseMaybeAssign(noIn);
|
|
823
|
+
return this.finishNode(node$1, "AssignmentExpression")
|
|
824
|
+
}
|
|
825
|
+
return left
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
lp$2.parseMaybeConditional = function(noIn) {
|
|
829
|
+
var start = this.storeCurrentPos();
|
|
830
|
+
var expr = this.parseExprOps(noIn);
|
|
831
|
+
if (this.eat(tokTypes.question)) {
|
|
832
|
+
var node = this.startNodeAt(start);
|
|
833
|
+
node.test = expr;
|
|
834
|
+
node.consequent = this.parseMaybeAssign();
|
|
835
|
+
node.alternate = this.expect(tokTypes.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent();
|
|
836
|
+
return this.finishNode(node, "ConditionalExpression")
|
|
837
|
+
}
|
|
838
|
+
return expr
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
lp$2.parseExprOps = function(noIn) {
|
|
842
|
+
var start = this.storeCurrentPos();
|
|
843
|
+
var indent = this.curIndent, line = this.curLineStart;
|
|
844
|
+
return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
lp$2.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
|
|
848
|
+
if (this.curLineStart !== line && this.curIndent < indent && this.tokenStartsLine()) { return left }
|
|
849
|
+
var prec = this.tok.type.binop;
|
|
850
|
+
if (prec != null && (!noIn || this.tok.type !== tokTypes._in)) {
|
|
851
|
+
if (prec > minPrec) {
|
|
852
|
+
var node = this.startNodeAt(start);
|
|
853
|
+
node.left = left;
|
|
854
|
+
node.operator = this.tok.value;
|
|
855
|
+
this.next();
|
|
856
|
+
if (this.curLineStart !== line && this.curIndent < indent && this.tokenStartsLine()) {
|
|
857
|
+
node.right = this.dummyIdent();
|
|
858
|
+
} else {
|
|
859
|
+
var rightStart = this.storeCurrentPos();
|
|
860
|
+
node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line);
|
|
861
|
+
}
|
|
862
|
+
this.finishNode(node, /&&|\|\||\?\?/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
|
|
863
|
+
return this.parseExprOp(node, start, minPrec, noIn, indent, line)
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
return left
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
lp$2.parseMaybeUnary = function(sawUnary) {
|
|
870
|
+
var start = this.storeCurrentPos(), expr;
|
|
871
|
+
if (this.options.ecmaVersion >= 8 && this.toks.isContextual("await") &&
|
|
872
|
+
(this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))
|
|
873
|
+
) {
|
|
874
|
+
expr = this.parseAwait();
|
|
875
|
+
sawUnary = true;
|
|
876
|
+
} else if (this.tok.type.prefix) {
|
|
877
|
+
var node = this.startNode(), update = this.tok.type === tokTypes.incDec;
|
|
878
|
+
if (!update) { sawUnary = true; }
|
|
879
|
+
node.operator = this.tok.value;
|
|
880
|
+
node.prefix = true;
|
|
881
|
+
this.next();
|
|
882
|
+
node.argument = this.parseMaybeUnary(true);
|
|
883
|
+
if (update) { node.argument = this.checkLVal(node.argument); }
|
|
884
|
+
expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
|
|
885
|
+
} else if (this.tok.type === tokTypes.ellipsis) {
|
|
886
|
+
var node$1 = this.startNode();
|
|
887
|
+
this.next();
|
|
888
|
+
node$1.argument = this.parseMaybeUnary(sawUnary);
|
|
889
|
+
expr = this.finishNode(node$1, "SpreadElement");
|
|
890
|
+
} else {
|
|
891
|
+
expr = this.parseExprSubscripts();
|
|
892
|
+
while (this.tok.type.postfix && !this.canInsertSemicolon()) {
|
|
893
|
+
var node$2 = this.startNodeAt(start);
|
|
894
|
+
node$2.operator = this.tok.value;
|
|
895
|
+
node$2.prefix = false;
|
|
896
|
+
node$2.argument = this.checkLVal(expr);
|
|
897
|
+
this.next();
|
|
898
|
+
expr = this.finishNode(node$2, "UpdateExpression");
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
if (!sawUnary && this.eat(tokTypes.starstar)) {
|
|
903
|
+
var node$3 = this.startNodeAt(start);
|
|
904
|
+
node$3.operator = "**";
|
|
905
|
+
node$3.left = expr;
|
|
906
|
+
node$3.right = this.parseMaybeUnary(false);
|
|
907
|
+
return this.finishNode(node$3, "BinaryExpression")
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
return expr
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
lp$2.parseExprSubscripts = function() {
|
|
914
|
+
var start = this.storeCurrentPos();
|
|
915
|
+
return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
lp$2.parseSubscripts = function(base, start, noCalls, startIndent, line) {
|
|
919
|
+
var optionalSupported = this.options.ecmaVersion >= 11;
|
|
920
|
+
var optionalChained = false;
|
|
921
|
+
for (;;) {
|
|
922
|
+
if (this.curLineStart !== line && this.curIndent <= startIndent && this.tokenStartsLine()) {
|
|
923
|
+
if (this.tok.type === tokTypes.dot && this.curIndent === startIndent)
|
|
924
|
+
{ --startIndent; }
|
|
925
|
+
else
|
|
926
|
+
{ break }
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
var maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
|
|
930
|
+
var optional = optionalSupported && this.eat(tokTypes.questionDot);
|
|
931
|
+
if (optional) {
|
|
932
|
+
optionalChained = true;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
if ((optional && this.tok.type !== tokTypes.parenL && this.tok.type !== tokTypes.bracketL && this.tok.type !== tokTypes.backQuote) || this.eat(tokTypes.dot)) {
|
|
936
|
+
var node = this.startNodeAt(start);
|
|
937
|
+
node.object = base;
|
|
938
|
+
if (this.curLineStart !== line && this.curIndent <= startIndent && this.tokenStartsLine())
|
|
939
|
+
{ node.property = this.dummyIdent(); }
|
|
940
|
+
else
|
|
941
|
+
{ node.property = this.parsePropertyAccessor() || this.dummyIdent(); }
|
|
942
|
+
node.computed = false;
|
|
943
|
+
if (optionalSupported) {
|
|
944
|
+
node.optional = optional;
|
|
945
|
+
}
|
|
946
|
+
base = this.finishNode(node, "MemberExpression");
|
|
947
|
+
} else if (this.tok.type === tokTypes.bracketL) {
|
|
948
|
+
this.pushCx();
|
|
949
|
+
this.next();
|
|
950
|
+
var node$1 = this.startNodeAt(start);
|
|
951
|
+
node$1.object = base;
|
|
952
|
+
node$1.property = this.parseExpression();
|
|
953
|
+
node$1.computed = true;
|
|
954
|
+
if (optionalSupported) {
|
|
955
|
+
node$1.optional = optional;
|
|
956
|
+
}
|
|
957
|
+
this.popCx();
|
|
958
|
+
this.expect(tokTypes.bracketR);
|
|
959
|
+
base = this.finishNode(node$1, "MemberExpression");
|
|
960
|
+
} else if (!noCalls && this.tok.type === tokTypes.parenL) {
|
|
961
|
+
var exprList = this.parseExprList(tokTypes.parenR);
|
|
962
|
+
if (maybeAsyncArrow && this.eat(tokTypes.arrow))
|
|
963
|
+
{ return this.parseArrowExpression(this.startNodeAt(start), exprList, true) }
|
|
964
|
+
var node$2 = this.startNodeAt(start);
|
|
965
|
+
node$2.callee = base;
|
|
966
|
+
node$2.arguments = exprList;
|
|
967
|
+
if (optionalSupported) {
|
|
968
|
+
node$2.optional = optional;
|
|
969
|
+
}
|
|
970
|
+
base = this.finishNode(node$2, "CallExpression");
|
|
971
|
+
} else if (this.tok.type === tokTypes.backQuote) {
|
|
972
|
+
var node$3 = this.startNodeAt(start);
|
|
973
|
+
node$3.tag = base;
|
|
974
|
+
node$3.quasi = this.parseTemplate();
|
|
975
|
+
base = this.finishNode(node$3, "TaggedTemplateExpression");
|
|
976
|
+
} else {
|
|
977
|
+
break
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
if (optionalChained) {
|
|
982
|
+
var chainNode = this.startNodeAt(start);
|
|
983
|
+
chainNode.expression = base;
|
|
984
|
+
base = this.finishNode(chainNode, "ChainExpression");
|
|
985
|
+
}
|
|
986
|
+
return base
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
lp$2.parseExprAtom = function() {
|
|
990
|
+
var node;
|
|
991
|
+
switch (this.tok.type) {
|
|
992
|
+
case tokTypes._this:
|
|
993
|
+
case tokTypes._super:
|
|
994
|
+
var type = this.tok.type === tokTypes._this ? "ThisExpression" : "Super";
|
|
995
|
+
node = this.startNode();
|
|
996
|
+
this.next();
|
|
997
|
+
return this.finishNode(node, type)
|
|
998
|
+
|
|
999
|
+
case tokTypes.name:
|
|
1000
|
+
var start = this.storeCurrentPos();
|
|
1001
|
+
var id = this.parseIdent();
|
|
1002
|
+
var isAsync = false;
|
|
1003
|
+
if (id.name === "async" && !this.canInsertSemicolon()) {
|
|
1004
|
+
if (this.eat(tokTypes._function))
|
|
1005
|
+
{ return this.parseFunction(this.startNodeAt(start), false, true) }
|
|
1006
|
+
if (this.tok.type === tokTypes.name) {
|
|
1007
|
+
id = this.parseIdent();
|
|
1008
|
+
isAsync = true;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
return this.eat(tokTypes.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
|
|
1012
|
+
|
|
1013
|
+
case tokTypes.regexp:
|
|
1014
|
+
node = this.startNode();
|
|
1015
|
+
var val = this.tok.value;
|
|
1016
|
+
node.regex = {pattern: val.pattern, flags: val.flags};
|
|
1017
|
+
node.value = val.value;
|
|
1018
|
+
node.raw = this.input.slice(this.tok.start, this.tok.end);
|
|
1019
|
+
this.next();
|
|
1020
|
+
return this.finishNode(node, "Literal")
|
|
1021
|
+
|
|
1022
|
+
case tokTypes.num: case tokTypes.string:
|
|
1023
|
+
node = this.startNode();
|
|
1024
|
+
node.value = this.tok.value;
|
|
1025
|
+
node.raw = this.input.slice(this.tok.start, this.tok.end);
|
|
1026
|
+
if (this.tok.type === tokTypes.num && node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); }
|
|
1027
|
+
this.next();
|
|
1028
|
+
return this.finishNode(node, "Literal")
|
|
1029
|
+
|
|
1030
|
+
case tokTypes._null: case tokTypes._true: case tokTypes._false:
|
|
1031
|
+
node = this.startNode();
|
|
1032
|
+
node.value = this.tok.type === tokTypes._null ? null : this.tok.type === tokTypes._true;
|
|
1033
|
+
node.raw = this.tok.type.keyword;
|
|
1034
|
+
this.next();
|
|
1035
|
+
return this.finishNode(node, "Literal")
|
|
1036
|
+
|
|
1037
|
+
case tokTypes.parenL:
|
|
1038
|
+
var parenStart = this.storeCurrentPos();
|
|
1039
|
+
this.next();
|
|
1040
|
+
var inner = this.parseExpression();
|
|
1041
|
+
this.expect(tokTypes.parenR);
|
|
1042
|
+
if (this.eat(tokTypes.arrow)) {
|
|
1043
|
+
// (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
|
|
1044
|
+
var params = inner.expressions || [inner];
|
|
1045
|
+
if (params.length && isDummy(params[params.length - 1]))
|
|
1046
|
+
{ params.pop(); }
|
|
1047
|
+
return this.parseArrowExpression(this.startNodeAt(parenStart), params)
|
|
1048
|
+
}
|
|
1049
|
+
if (this.options.preserveParens) {
|
|
1050
|
+
var par = this.startNodeAt(parenStart);
|
|
1051
|
+
par.expression = inner;
|
|
1052
|
+
inner = this.finishNode(par, "ParenthesizedExpression");
|
|
1053
|
+
}
|
|
1054
|
+
return inner
|
|
1055
|
+
|
|
1056
|
+
case tokTypes.bracketL:
|
|
1057
|
+
node = this.startNode();
|
|
1058
|
+
node.elements = this.parseExprList(tokTypes.bracketR, true);
|
|
1059
|
+
return this.finishNode(node, "ArrayExpression")
|
|
1060
|
+
|
|
1061
|
+
case tokTypes.braceL:
|
|
1062
|
+
return this.parseObj()
|
|
1063
|
+
|
|
1064
|
+
case tokTypes._class:
|
|
1065
|
+
return this.parseClass(false)
|
|
1066
|
+
|
|
1067
|
+
case tokTypes._function:
|
|
1068
|
+
node = this.startNode();
|
|
1069
|
+
this.next();
|
|
1070
|
+
return this.parseFunction(node, false)
|
|
1071
|
+
|
|
1072
|
+
case tokTypes._new:
|
|
1073
|
+
return this.parseNew()
|
|
1074
|
+
|
|
1075
|
+
case tokTypes.backQuote:
|
|
1076
|
+
return this.parseTemplate()
|
|
1077
|
+
|
|
1078
|
+
case tokTypes._import:
|
|
1079
|
+
if (this.options.ecmaVersion >= 11) {
|
|
1080
|
+
return this.parseExprImport()
|
|
1081
|
+
} else {
|
|
1082
|
+
return this.dummyIdent()
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
default:
|
|
1086
|
+
return this.dummyIdent()
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
lp$2.parseExprImport = function() {
|
|
1091
|
+
var node = this.startNode();
|
|
1092
|
+
var meta = this.parseIdent(true);
|
|
1093
|
+
switch (this.tok.type) {
|
|
1094
|
+
case tokTypes.parenL:
|
|
1095
|
+
return this.parseDynamicImport(node)
|
|
1096
|
+
case tokTypes.dot:
|
|
1097
|
+
node.meta = meta;
|
|
1098
|
+
return this.parseImportMeta(node)
|
|
1099
|
+
default:
|
|
1100
|
+
node.name = "import";
|
|
1101
|
+
return this.finishNode(node, "Identifier")
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
lp$2.parseDynamicImport = function(node) {
|
|
1106
|
+
node.source = this.parseExprList(tokTypes.parenR)[0] || this.dummyString();
|
|
1107
|
+
return this.finishNode(node, "ImportExpression")
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
lp$2.parseImportMeta = function(node) {
|
|
1111
|
+
this.next(); // skip '.'
|
|
1112
|
+
node.property = this.parseIdent(true);
|
|
1113
|
+
return this.finishNode(node, "MetaProperty")
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
lp$2.parseNew = function() {
|
|
1117
|
+
var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart;
|
|
1118
|
+
var meta = this.parseIdent(true);
|
|
1119
|
+
if (this.options.ecmaVersion >= 6 && this.eat(tokTypes.dot)) {
|
|
1120
|
+
node.meta = meta;
|
|
1121
|
+
node.property = this.parseIdent(true);
|
|
1122
|
+
return this.finishNode(node, "MetaProperty")
|
|
1123
|
+
}
|
|
1124
|
+
var start = this.storeCurrentPos();
|
|
1125
|
+
node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line);
|
|
1126
|
+
if (this.tok.type === tokTypes.parenL) {
|
|
1127
|
+
node.arguments = this.parseExprList(tokTypes.parenR);
|
|
1128
|
+
} else {
|
|
1129
|
+
node.arguments = [];
|
|
1130
|
+
}
|
|
1131
|
+
return this.finishNode(node, "NewExpression")
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
lp$2.parseTemplateElement = function() {
|
|
1135
|
+
var elem = this.startNode();
|
|
1136
|
+
|
|
1137
|
+
// The loose parser accepts invalid unicode escapes even in untagged templates.
|
|
1138
|
+
if (this.tok.type === tokTypes.invalidTemplate) {
|
|
1139
|
+
elem.value = {
|
|
1140
|
+
raw: this.tok.value,
|
|
1141
|
+
cooked: null
|
|
1142
|
+
};
|
|
1143
|
+
} else {
|
|
1144
|
+
elem.value = {
|
|
1145
|
+
raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, "\n"),
|
|
1146
|
+
cooked: this.tok.value
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
this.next();
|
|
1150
|
+
elem.tail = this.tok.type === tokTypes.backQuote;
|
|
1151
|
+
return this.finishNode(elem, "TemplateElement")
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
lp$2.parseTemplate = function() {
|
|
1155
|
+
var node = this.startNode();
|
|
1156
|
+
this.next();
|
|
1157
|
+
node.expressions = [];
|
|
1158
|
+
var curElt = this.parseTemplateElement();
|
|
1159
|
+
node.quasis = [curElt];
|
|
1160
|
+
while (!curElt.tail) {
|
|
1161
|
+
this.next();
|
|
1162
|
+
node.expressions.push(this.parseExpression());
|
|
1163
|
+
if (this.expect(tokTypes.braceR)) {
|
|
1164
|
+
curElt = this.parseTemplateElement();
|
|
1165
|
+
} else {
|
|
1166
|
+
curElt = this.startNode();
|
|
1167
|
+
curElt.value = {cooked: "", raw: ""};
|
|
1168
|
+
curElt.tail = true;
|
|
1169
|
+
this.finishNode(curElt, "TemplateElement");
|
|
1170
|
+
}
|
|
1171
|
+
node.quasis.push(curElt);
|
|
1172
|
+
}
|
|
1173
|
+
this.expect(tokTypes.backQuote);
|
|
1174
|
+
return this.finishNode(node, "TemplateLiteral")
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
lp$2.parseObj = function() {
|
|
1178
|
+
var node = this.startNode();
|
|
1179
|
+
node.properties = [];
|
|
1180
|
+
this.pushCx();
|
|
1181
|
+
var indent = this.curIndent + 1, line = this.curLineStart;
|
|
1182
|
+
this.eat(tokTypes.braceL);
|
|
1183
|
+
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
|
|
1184
|
+
while (!this.closes(tokTypes.braceR, indent, line)) {
|
|
1185
|
+
var prop = this.startNode(), isGenerator = (void 0), isAsync = (void 0), start = (void 0);
|
|
1186
|
+
if (this.options.ecmaVersion >= 9 && this.eat(tokTypes.ellipsis)) {
|
|
1187
|
+
prop.argument = this.parseMaybeAssign();
|
|
1188
|
+
node.properties.push(this.finishNode(prop, "SpreadElement"));
|
|
1189
|
+
this.eat(tokTypes.comma);
|
|
1190
|
+
continue
|
|
1191
|
+
}
|
|
1192
|
+
if (this.options.ecmaVersion >= 6) {
|
|
1193
|
+
start = this.storeCurrentPos();
|
|
1194
|
+
prop.method = false;
|
|
1195
|
+
prop.shorthand = false;
|
|
1196
|
+
isGenerator = this.eat(tokTypes.star);
|
|
1197
|
+
}
|
|
1198
|
+
this.parsePropertyName(prop);
|
|
1199
|
+
if (this.toks.isAsyncProp(prop)) {
|
|
1200
|
+
isAsync = true;
|
|
1201
|
+
isGenerator = this.options.ecmaVersion >= 9 && this.eat(tokTypes.star);
|
|
1202
|
+
this.parsePropertyName(prop);
|
|
1203
|
+
} else {
|
|
1204
|
+
isAsync = false;
|
|
1205
|
+
}
|
|
1206
|
+
if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) { this.next(); } this.eat(tokTypes.comma); continue }
|
|
1207
|
+
if (this.eat(tokTypes.colon)) {
|
|
1208
|
+
prop.kind = "init";
|
|
1209
|
+
prop.value = this.parseMaybeAssign();
|
|
1210
|
+
} else if (this.options.ecmaVersion >= 6 && (this.tok.type === tokTypes.parenL || this.tok.type === tokTypes.braceL)) {
|
|
1211
|
+
prop.kind = "init";
|
|
1212
|
+
prop.method = true;
|
|
1213
|
+
prop.value = this.parseMethod(isGenerator, isAsync);
|
|
1214
|
+
} else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
|
|
1215
|
+
!prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
|
|
1216
|
+
(this.tok.type !== tokTypes.comma && this.tok.type !== tokTypes.braceR && this.tok.type !== tokTypes.eq)) {
|
|
1217
|
+
prop.kind = prop.key.name;
|
|
1218
|
+
this.parsePropertyName(prop);
|
|
1219
|
+
prop.value = this.parseMethod(false);
|
|
1220
|
+
} else {
|
|
1221
|
+
prop.kind = "init";
|
|
1222
|
+
if (this.options.ecmaVersion >= 6) {
|
|
1223
|
+
if (this.eat(tokTypes.eq)) {
|
|
1224
|
+
var assign = this.startNodeAt(start);
|
|
1225
|
+
assign.operator = "=";
|
|
1226
|
+
assign.left = prop.key;
|
|
1227
|
+
assign.right = this.parseMaybeAssign();
|
|
1228
|
+
prop.value = this.finishNode(assign, "AssignmentExpression");
|
|
1229
|
+
} else {
|
|
1230
|
+
prop.value = prop.key;
|
|
1231
|
+
}
|
|
1232
|
+
} else {
|
|
1233
|
+
prop.value = this.dummyIdent();
|
|
1234
|
+
}
|
|
1235
|
+
prop.shorthand = true;
|
|
1236
|
+
}
|
|
1237
|
+
node.properties.push(this.finishNode(prop, "Property"));
|
|
1238
|
+
this.eat(tokTypes.comma);
|
|
1239
|
+
}
|
|
1240
|
+
this.popCx();
|
|
1241
|
+
if (!this.eat(tokTypes.braceR)) {
|
|
1242
|
+
// If there is no closing brace, make the node span to the start
|
|
1243
|
+
// of the next token (this is useful for Tern)
|
|
1244
|
+
this.last.end = this.tok.start;
|
|
1245
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
1246
|
+
}
|
|
1247
|
+
return this.finishNode(node, "ObjectExpression")
|
|
1248
|
+
};
|
|
1249
|
+
|
|
1250
|
+
lp$2.parsePropertyName = function(prop) {
|
|
1251
|
+
if (this.options.ecmaVersion >= 6) {
|
|
1252
|
+
if (this.eat(tokTypes.bracketL)) {
|
|
1253
|
+
prop.computed = true;
|
|
1254
|
+
prop.key = this.parseExpression();
|
|
1255
|
+
this.expect(tokTypes.bracketR);
|
|
1256
|
+
return
|
|
1257
|
+
} else {
|
|
1258
|
+
prop.computed = false;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
var key = (this.tok.type === tokTypes.num || this.tok.type === tokTypes.string) ? this.parseExprAtom() : this.parseIdent();
|
|
1262
|
+
prop.key = key || this.dummyIdent();
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
lp$2.parsePropertyAccessor = function() {
|
|
1266
|
+
if (this.tok.type === tokTypes.name || this.tok.type.keyword) { return this.parseIdent() }
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
|
+
lp$2.parseIdent = function() {
|
|
1270
|
+
var name = this.tok.type === tokTypes.name ? this.tok.value : this.tok.type.keyword;
|
|
1271
|
+
if (!name) { return this.dummyIdent() }
|
|
1272
|
+
var node = this.startNode();
|
|
1273
|
+
this.next();
|
|
1274
|
+
node.name = name;
|
|
1275
|
+
return this.finishNode(node, "Identifier")
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
lp$2.initFunction = function(node) {
|
|
1279
|
+
node.id = null;
|
|
1280
|
+
node.params = [];
|
|
1281
|
+
if (this.options.ecmaVersion >= 6) {
|
|
1282
|
+
node.generator = false;
|
|
1283
|
+
node.expression = false;
|
|
1284
|
+
}
|
|
1285
|
+
if (this.options.ecmaVersion >= 8)
|
|
1286
|
+
{ node.async = false; }
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
// Convert existing expression atom to assignable pattern
|
|
1290
|
+
// if possible.
|
|
1291
|
+
|
|
1292
|
+
lp$2.toAssignable = function(node, binding) {
|
|
1293
|
+
if (!node || node.type === "Identifier" || (node.type === "MemberExpression" && !binding)) ; else if (node.type === "ParenthesizedExpression") {
|
|
1294
|
+
this.toAssignable(node.expression, binding);
|
|
1295
|
+
} else if (this.options.ecmaVersion < 6) {
|
|
1296
|
+
return this.dummyIdent()
|
|
1297
|
+
} else if (node.type === "ObjectExpression") {
|
|
1298
|
+
node.type = "ObjectPattern";
|
|
1299
|
+
for (var i = 0, list = node.properties; i < list.length; i += 1)
|
|
1300
|
+
{
|
|
1301
|
+
var prop = list[i];
|
|
1302
|
+
|
|
1303
|
+
this.toAssignable(prop, binding);
|
|
1304
|
+
}
|
|
1305
|
+
} else if (node.type === "ArrayExpression") {
|
|
1306
|
+
node.type = "ArrayPattern";
|
|
1307
|
+
this.toAssignableList(node.elements, binding);
|
|
1308
|
+
} else if (node.type === "Property") {
|
|
1309
|
+
this.toAssignable(node.value, binding);
|
|
1310
|
+
} else if (node.type === "SpreadElement") {
|
|
1311
|
+
node.type = "RestElement";
|
|
1312
|
+
this.toAssignable(node.argument, binding);
|
|
1313
|
+
} else if (node.type === "AssignmentExpression") {
|
|
1314
|
+
node.type = "AssignmentPattern";
|
|
1315
|
+
delete node.operator;
|
|
1316
|
+
} else {
|
|
1317
|
+
return this.dummyIdent()
|
|
1318
|
+
}
|
|
1319
|
+
return node
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1322
|
+
lp$2.toAssignableList = function(exprList, binding) {
|
|
1323
|
+
for (var i = 0, list = exprList; i < list.length; i += 1)
|
|
1324
|
+
{
|
|
1325
|
+
var expr = list[i];
|
|
1326
|
+
|
|
1327
|
+
this.toAssignable(expr, binding);
|
|
1328
|
+
}
|
|
1329
|
+
return exprList
|
|
1330
|
+
};
|
|
1331
|
+
|
|
1332
|
+
lp$2.parseFunctionParams = function(params) {
|
|
1333
|
+
params = this.parseExprList(tokTypes.parenR);
|
|
1334
|
+
return this.toAssignableList(params, true)
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
lp$2.parseMethod = function(isGenerator, isAsync) {
|
|
1338
|
+
var node = this.startNode(), oldInAsync = this.inAsync, oldInFunction = this.inFunction;
|
|
1339
|
+
this.initFunction(node);
|
|
1340
|
+
if (this.options.ecmaVersion >= 6)
|
|
1341
|
+
{ node.generator = !!isGenerator; }
|
|
1342
|
+
if (this.options.ecmaVersion >= 8)
|
|
1343
|
+
{ node.async = !!isAsync; }
|
|
1344
|
+
this.inAsync = node.async;
|
|
1345
|
+
this.inFunction = true;
|
|
1346
|
+
node.params = this.parseFunctionParams();
|
|
1347
|
+
node.body = this.parseBlock();
|
|
1348
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
1349
|
+
this.inAsync = oldInAsync;
|
|
1350
|
+
this.inFunction = oldInFunction;
|
|
1351
|
+
return this.finishNode(node, "FunctionExpression")
|
|
1352
|
+
};
|
|
1353
|
+
|
|
1354
|
+
lp$2.parseArrowExpression = function(node, params, isAsync) {
|
|
1355
|
+
var oldInAsync = this.inAsync, oldInFunction = this.inFunction;
|
|
1356
|
+
this.initFunction(node);
|
|
1357
|
+
if (this.options.ecmaVersion >= 8)
|
|
1358
|
+
{ node.async = !!isAsync; }
|
|
1359
|
+
this.inAsync = node.async;
|
|
1360
|
+
this.inFunction = true;
|
|
1361
|
+
node.params = this.toAssignableList(params, true);
|
|
1362
|
+
node.expression = this.tok.type !== tokTypes.braceL;
|
|
1363
|
+
if (node.expression) {
|
|
1364
|
+
node.body = this.parseMaybeAssign();
|
|
1365
|
+
} else {
|
|
1366
|
+
node.body = this.parseBlock();
|
|
1367
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
1368
|
+
}
|
|
1369
|
+
this.inAsync = oldInAsync;
|
|
1370
|
+
this.inFunction = oldInFunction;
|
|
1371
|
+
return this.finishNode(node, "ArrowFunctionExpression")
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1374
|
+
lp$2.parseExprList = function(close, allowEmpty) {
|
|
1375
|
+
this.pushCx();
|
|
1376
|
+
var indent = this.curIndent, line = this.curLineStart, elts = [];
|
|
1377
|
+
this.next(); // Opening bracket
|
|
1378
|
+
while (!this.closes(close, indent + 1, line)) {
|
|
1379
|
+
if (this.eat(tokTypes.comma)) {
|
|
1380
|
+
elts.push(allowEmpty ? null : this.dummyIdent());
|
|
1381
|
+
continue
|
|
1382
|
+
}
|
|
1383
|
+
var elt = this.parseMaybeAssign();
|
|
1384
|
+
if (isDummy(elt)) {
|
|
1385
|
+
if (this.closes(close, indent, line)) { break }
|
|
1386
|
+
this.next();
|
|
1387
|
+
} else {
|
|
1388
|
+
elts.push(elt);
|
|
1389
|
+
}
|
|
1390
|
+
this.eat(tokTypes.comma);
|
|
1391
|
+
}
|
|
1392
|
+
this.popCx();
|
|
1393
|
+
if (!this.eat(close)) {
|
|
1394
|
+
// If there is no closing brace, make the node span to the start
|
|
1395
|
+
// of the next token (this is useful for Tern)
|
|
1396
|
+
this.last.end = this.tok.start;
|
|
1397
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
1398
|
+
}
|
|
1399
|
+
return elts
|
|
1400
|
+
};
|
|
1401
|
+
|
|
1402
|
+
lp$2.parseAwait = function() {
|
|
1403
|
+
var node = this.startNode();
|
|
1404
|
+
this.next();
|
|
1405
|
+
node.argument = this.parseMaybeUnary();
|
|
1406
|
+
return this.finishNode(node, "AwaitExpression")
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
// Acorn: Loose parser
|
|
1410
|
+
|
|
1411
|
+
defaultOptions.tabSize = 4;
|
|
1412
|
+
|
|
1413
|
+
function parse(input, options) {
|
|
1414
|
+
return LooseParser.parse(input, options)
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
export { LooseParser, isDummy, parse };
|
|
1418
|
+
//# sourceMappingURL=acorn-loose.mjs.map
|