chrome-devtools-frontend 1.0.1021097 → 1.0.1021582
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/config/gni/devtools_grd_files.gni +15 -10
 - package/front_end/.eslintrc.js +1 -0
 - package/front_end/core/i18n/locales/en-US.json +118 -4
 - package/front_end/core/i18n/locales/en-XL.json +118 -4
 - package/front_end/models/bindings/DebuggerLanguagePlugins.ts +8 -0
 - package/front_end/panels/application/components/FrameDetailsView.ts +3 -2
 - package/front_end/panels/application/components/Prerender2.ts +188 -0
 - package/front_end/panels/elements/CSSRuleValidator.ts +103 -13
 - package/front_end/panels/elements/ElementsTreeElement.ts +3 -1
 - package/front_end/panels/elements/StylePropertyTreeElement.ts +10 -8
 - package/front_end/panels/elements/components/CSSHintDetailsView.ts +71 -0
 - package/front_end/panels/elements/components/components.ts +2 -0
 - package/front_end/panels/elements/components/cssHintDetailsView.css +36 -0
 - package/front_end/panels/elements/stylesSectionTree.css +1 -1
 - package/front_end/panels/network/components/RequestHeadersView.ts +2 -1
 - package/front_end/services/puppeteer/PuppeteerConnection.ts +3 -5
 - package/front_end/third_party/lit-html/directives.ts +1 -0
 - package/front_end/third_party/lit-html/lit-html-tsconfig.json +1 -0
 - package/front_end/third_party/puppeteer/package/README.md +136 -214
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.d.ts +6 -6
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.js +149 -85
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Accessibility.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +34 -10
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +17 -36
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +217 -160
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +5 -4
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +18 -13
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserWebSocketTransport.d.ts +4 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserWebSocketTransport.js +30 -11
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +21 -20
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +125 -82
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +1 -4
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +27 -9
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +6 -30
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js +167 -131
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +36 -67
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +359 -215
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.d.ts +8 -4
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.js +9 -6
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Debug.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts +21 -2
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js +26 -6
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts +2 -6
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.js +32 -15
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts +355 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js +847 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ElementHandle.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EmulationManager.d.ts +4 -3
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EmulationManager.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EmulationManager.js +25 -8
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EmulationManager.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts +28 -6
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +27 -7
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +20 -19
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js +146 -126
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts +4 -6
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js +25 -10
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +53 -92
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +337 -320
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +16 -28
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +200 -147
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts +1 -18
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +86 -60
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +18 -22
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js +166 -117
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +46 -395
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +80 -842
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts +4 -32
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +136 -108
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkConditions.d.ts +25 -7
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkConditions.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkConditions.js +23 -2
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkConditions.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +16 -11
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +39 -32
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +2 -42
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +315 -316
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts +5 -3
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js +2 -2
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts +246 -287
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +841 -700
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +37 -74
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js +37 -89
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +38 -13
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js +79 -29
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/SecurityDetails.d.ts +1 -6
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/SecurityDetails.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/SecurityDetails.js +31 -12
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/SecurityDetails.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +6 -9
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js +80 -40
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TaskQueue.d.ts +4 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TaskQueue.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TaskQueue.js +24 -3
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TaskQueue.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TimeoutSettings.d.ts +1 -2
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TimeoutSettings.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TimeoutSettings.js +28 -10
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/TimeoutSettings.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.d.ts +4 -5
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js +50 -23
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/USKeyboardLayout.d.ts +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/USKeyboardLayout.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/USKeyboardLayout.js +2 -2
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/USKeyboardLayout.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +9 -11
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js +41 -31
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.d.ts +4 -3
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.js +6 -8
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.d.ts +5 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js +6 -3
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.d.ts +48 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{EvalTypes.js → types.js} +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/types.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts +129 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/{helper.js → util.js} +168 -87
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.d.ts +3 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.js +3 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/compat.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.d.ts +3 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.js +3 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/constants.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts +3 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js +3 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +4 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +4 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/initialize-node.d.ts → cjs/puppeteer/initializePuppeteer.d.ts} +5 -2
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/{initialize-node.js → initializePuppeteer.js} +18 -14
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initializePuppeteer.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts +4 -11
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +226 -158
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts +9 -11
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +116 -72
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts +27 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +176 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts +49 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js +361 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts +6 -3
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js +44 -12
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts +4 -20
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js +60 -35
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.d.ts +31 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.js +166 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ProductLauncher.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +42 -41
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +69 -47
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.d.ts +6 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js +55 -32
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.d.ts +10 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.js +40 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/util.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.d.ts +23 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.js +41 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer-core.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.d.ts +26 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.js +44 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/puppeteer.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +6 -5
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +6 -3
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/tsconfig.cjs.tsbuildinfo +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/tsconfig.tsbuildinfo +1 -0
 - package/front_end/third_party/puppeteer/package/lib/{esm/puppeteer/api-docs-entry.js → cjs/puppeteer/types.d.ts} +46 -63
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/{api-docs-entry.js → types.js} +50 -51
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/types.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/cjs/vendor/mitt/src/index.d.ts +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/vendor/mitt/src/index.js +11 -12
 - package/front_end/third_party/puppeteer/package/lib/cjs/vendor/tsconfig.cjs.tsbuildinfo +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts +6 -6
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js +149 -85
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +34 -10
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +17 -36
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +217 -160
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +5 -4
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +16 -11
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts +4 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.js +30 -11
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +21 -20
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +125 -82
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +1 -4
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +27 -9
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +6 -30
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +167 -131
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +36 -67
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +335 -214
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +8 -4
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +9 -6
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +21 -2
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +25 -5
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +2 -6
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js +32 -15
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts +355 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js +820 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ElementHandle.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts +4 -3
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.js +25 -8
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +28 -6
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +26 -6
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +20 -19
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +145 -125
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +4 -6
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +25 -10
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +53 -92
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +337 -320
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +16 -28
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +199 -146
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +1 -18
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +86 -60
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +18 -22
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +167 -118
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +46 -395
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +80 -817
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +4 -32
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +135 -107
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkConditions.d.ts +25 -7
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkConditions.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkConditions.js +23 -2
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkConditions.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +16 -11
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +39 -32
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +2 -42
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +312 -313
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +5 -3
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +246 -287
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +819 -701
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +37 -74
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +39 -91
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +38 -13
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +79 -29
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts +1 -6
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.js +31 -12
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +6 -9
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +80 -40
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TaskQueue.d.ts +4 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TaskQueue.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TaskQueue.js +24 -3
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TaskQueue.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts +1 -2
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.js +28 -10
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts +4 -5
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +50 -23
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.js +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +9 -11
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +41 -31
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts +4 -3
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js +5 -6
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts +5 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js +6 -3
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.d.ts +48 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{EvalTypes.js → types.js} +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/types.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts +129 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/{helper.js → util.js} +161 -100
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.d.ts +3 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.js +3 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/compat.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.d.ts +3 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.js +3 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/constants.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +3 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +3 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +4 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +4 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/initialize-node.d.ts → esm/puppeteer/initializePuppeteer.d.ts} +5 -2
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/{initialize-node.js → initializePuppeteer.js} +16 -12
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initializePuppeteer.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +4 -11
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +226 -158
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +9 -11
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +113 -69
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts +27 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +169 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts +49 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/{Launcher.js → FirefoxLauncher.js} +51 -345
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +6 -3
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +44 -12
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +4 -20
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +60 -35
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.d.ts +31 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.js +157 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ProductLauncher.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +42 -41
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +70 -45
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts +6 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +53 -30
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.d.ts +10 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.js +13 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/util.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.d.ts +23 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/{node-puppeteer-core.d.ts → puppeteer-core.js} +8 -2
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer-core.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.d.ts +26 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/{cjs/puppeteer/node-puppeteer-core.d.ts → esm/puppeteer/puppeteer.js} +11 -2
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/puppeteer.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +6 -5
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +6 -3
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/tsconfig.esm.tsbuildinfo +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/tsconfig.tsbuildinfo +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts +64 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.d.ts.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js +68 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/types.js.map +1 -0
 - package/front_end/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js +9 -10
 - package/front_end/third_party/puppeteer/package/lib/esm/vendor/tsconfig.esm.tsbuildinfo +1 -0
 - package/front_end/third_party/puppeteer/package/lib/types.d.ts +846 -1670
 - package/front_end/third_party/puppeteer/package/package.json +65 -68
 - package/front_end/third_party/puppeteer/package/typescript-if-required.js +17 -8
 - package/front_end/third_party/puppeteer/puppeteer.ts +7 -14
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +2 -5
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -2
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +40 -12
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +5 -5
 - package/front_end/ui/legacy/components/utils/Linkifier.ts +3 -1
 - package/package.json +1 -1
 - package/scripts/eslint_rules/lib/inject_checkbox_styles.js +4 -2
 - package/scripts/eslint_rules/tests/inject_checkbox_styles_test.js +45 -5
 - package/front_end/third_party/puppeteer/package/cjs-entry-core.js +0 -29
 - package/front_end/third_party/puppeteer/package/cjs-entry.js +0 -29
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.d.ts +0 -111
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts +0 -61
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Events.d.ts +0 -82
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Events.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Events.js +0 -87
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Events.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts +0 -85
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-node.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-node.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-web.d.ts +0 -18
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-web.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-web.js +0 -27
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/initialize-web.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts +0 -18
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +0 -674
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node-puppeteer-core.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node-puppeteer-core.js +0 -25
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node-puppeteer-core.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node.d.ts +0 -18
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node.js +0 -24
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/web.d.ts +0 -18
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/web.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/web.js +0 -24
 - package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/web.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/vendor/mitt/src/index.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/cjs/vendor/mitt/src/index.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +0 -111
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +0 -61
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts +0 -82
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.js +0 -84
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +0 -85
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts +0 -18
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.js +0 -23
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +0 -18
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +0 -23
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts +0 -18
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.js +0 -22
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts +0 -18
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.js +0 -22
 - package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.js.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts.map +0 -1
 - package/front_end/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js.map +0 -1
 
| 
         @@ -13,36 +13,49 @@ 
     | 
|
| 
       13 
13 
     | 
    
         
             
             * See the License for the specific language governing permissions and
         
     | 
| 
       14 
14 
     | 
    
         
             
             * limitations under the License.
         
     | 
| 
       15 
15 
     | 
    
         
             
             */
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
      
 16 
     | 
    
         
            +
            var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
         
     | 
| 
      
 17 
     | 
    
         
            +
                if (kind === "m") throw new TypeError("Private method is not writable");
         
     | 
| 
      
 18 
     | 
    
         
            +
                if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
         
     | 
| 
      
 19 
     | 
    
         
            +
                if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
         
     | 
| 
      
 20 
     | 
    
         
            +
                return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
         
     | 
| 
      
 21 
     | 
    
         
            +
            };
         
     | 
| 
      
 22 
     | 
    
         
            +
            var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
         
     | 
| 
      
 23 
     | 
    
         
            +
                if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
         
     | 
| 
      
 24 
     | 
    
         
            +
                if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
         
     | 
| 
      
 25 
     | 
    
         
            +
                return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
         
     | 
| 
      
 26 
     | 
    
         
            +
            };
         
     | 
| 
      
 27 
     | 
    
         
            +
            var _Page_instances, _Page_closed, _Page_client, _Page_target, _Page_keyboard, _Page_mouse, _Page_timeoutSettings, _Page_touchscreen, _Page_accessibility, _Page_frameManager, _Page_emulationManager, _Page_tracing, _Page_pageBindings, _Page_coverage, _Page_javascriptEnabled, _Page_viewport, _Page_screenshotTaskQueue, _Page_workers, _Page_fileChooserInterceptors, _Page_disconnectPromise, _Page_userDragInterceptionEnabled, _Page_handlerMap, _Page_initialize, _Page_onFileChooser, _Page_onTargetCrashed, _Page_onLogEntryAdded, _Page_emitMetrics, _Page_buildMetricsObject, _Page_handleException, _Page_onConsoleAPI, _Page_onBindingCalled, _Page_addConsoleMessage, _Page_onDialog, _Page_resetDefaultBackgroundColor, _Page_setTransparentBackgroundColor, _Page_sessionClosePromise, _Page_go, _Page_screenshotTask;
         
     | 
| 
      
 28 
     | 
    
         
            +
            import { Accessibility } from './Accessibility.js';
         
     | 
| 
      
 29 
     | 
    
         
            +
            import { assert } from './assert.js';
         
     | 
| 
      
 30 
     | 
    
         
            +
            import { CDPSessionEmittedEvents, Connection } from './Connection.js';
         
     | 
| 
      
 31 
     | 
    
         
            +
            import { ConsoleMessage } from './ConsoleMessage.js';
         
     | 
| 
      
 32 
     | 
    
         
            +
            import { Coverage } from './Coverage.js';
         
     | 
| 
       18 
33 
     | 
    
         
             
            import { Dialog } from './Dialog.js';
         
     | 
| 
       19 
34 
     | 
    
         
             
            import { EmulationManager } from './EmulationManager.js';
         
     | 
| 
      
 35 
     | 
    
         
            +
            import { EventEmitter } from './EventEmitter.js';
         
     | 
| 
      
 36 
     | 
    
         
            +
            import { FileChooser } from './FileChooser.js';
         
     | 
| 
       20 
37 
     | 
    
         
             
            import { FrameManager, FrameManagerEmittedEvents, } from './FrameManager.js';
         
     | 
| 
       21 
38 
     | 
    
         
             
            import { Keyboard, Mouse, Touchscreen } from './Input.js';
         
     | 
| 
       22 
     | 
    
         
            -
            import { Tracing } from './Tracing.js';
         
     | 
| 
       23 
     | 
    
         
            -
            import { assert, assertNever } from './assert.js';
         
     | 
| 
       24 
     | 
    
         
            -
            import { helper, debugError } from './helper.js';
         
     | 
| 
       25 
     | 
    
         
            -
            import { Coverage } from './Coverage.js';
         
     | 
| 
       26 
     | 
    
         
            -
            import { WebWorker } from './WebWorker.js';
         
     | 
| 
       27 
     | 
    
         
            -
            import { createJSHandle } from './JSHandle.js';
         
     | 
| 
       28 
39 
     | 
    
         
             
            import { NetworkManagerEmittedEvents, } from './NetworkManager.js';
         
     | 
| 
       29 
     | 
    
         
            -
            import {  
     | 
| 
      
 40 
     | 
    
         
            +
            import { _paperFormats } from './PDFOptions.js';
         
     | 
| 
       30 
41 
     | 
    
         
             
            import { TimeoutSettings } from './TimeoutSettings.js';
         
     | 
| 
       31 
     | 
    
         
            -
            import {  
     | 
| 
       32 
     | 
    
         
            -
            import {  
     | 
| 
       33 
     | 
    
         
            -
            import {  
     | 
| 
       34 
     | 
    
         
            -
            import { isNode } from '../environment.js';
         
     | 
| 
      
 42 
     | 
    
         
            +
            import { Tracing } from './Tracing.js';
         
     | 
| 
      
 43 
     | 
    
         
            +
            import { createJSHandle, debugError, evaluationString, getExceptionMessage, getReadableAsBuffer, getReadableFromProtocolStream, isErrorLike, isNumber, isString, pageBindingDeliverErrorString, pageBindingDeliverErrorValueString, pageBindingDeliverResultString, pageBindingInitString, releaseObject, valueFromRemoteObject, waitForEvent, waitWithTimeout, } from './util.js';
         
     | 
| 
      
 44 
     | 
    
         
            +
            import { WebWorker } from './WebWorker.js';
         
     | 
| 
       35 
45 
     | 
    
         
             
            /**
         
     | 
| 
       36 
46 
     | 
    
         
             
             * Page provides methods to interact with a single tab or
         
     | 
| 
       37 
     | 
    
         
            -
             * {@link https://developer.chrome.com/extensions/background_pages | extension background page} 
     | 
| 
      
 47 
     | 
    
         
            +
             * {@link https://developer.chrome.com/extensions/background_pages | extension background page}
         
     | 
| 
      
 48 
     | 
    
         
            +
             * in Chromium.
         
     | 
| 
       38 
49 
     | 
    
         
             
             *
         
     | 
| 
       39 
     | 
    
         
            -
             *  
     | 
| 
      
 50 
     | 
    
         
            +
             * :::note
         
     | 
| 
       40 
51 
     | 
    
         
             
             *
         
     | 
| 
       41 
52 
     | 
    
         
             
             * One Browser instance might have multiple Page instances.
         
     | 
| 
       42 
53 
     | 
    
         
             
             *
         
     | 
| 
      
 54 
     | 
    
         
            +
             * :::
         
     | 
| 
      
 55 
     | 
    
         
            +
             *
         
     | 
| 
       43 
56 
     | 
    
         
             
             * @example
         
     | 
| 
       44 
     | 
    
         
            -
             * This example creates a page, navigates it to a URL, and then  
     | 
| 
       45 
     | 
    
         
            -
             * ``` 
     | 
| 
      
 57 
     | 
    
         
            +
             * This example creates a page, navigates it to a URL, and then saves a screenshot:
         
     | 
| 
      
 58 
     | 
    
         
            +
             * ```ts
         
     | 
| 
       46 
59 
     | 
    
         
             
             * const puppeteer = require('puppeteer');
         
     | 
| 
       47 
60 
     | 
    
         
             
             *
         
     | 
| 
       48 
61 
     | 
    
         
             
             * (async () => {
         
     | 
| 
         @@ -59,13 +72,13 @@ import { isNode } from '../environment.js'; 
     | 
|
| 
       59 
72 
     | 
    
         
             
             *
         
     | 
| 
       60 
73 
     | 
    
         
             
             * @example
         
     | 
| 
       61 
74 
     | 
    
         
             
             * This example logs a message for a single page `load` event:
         
     | 
| 
       62 
     | 
    
         
            -
             * ``` 
     | 
| 
      
 75 
     | 
    
         
            +
             * ```ts
         
     | 
| 
       63 
76 
     | 
    
         
             
             * page.once('load', () => console.log('Page loaded!'));
         
     | 
| 
       64 
77 
     | 
    
         
             
             * ```
         
     | 
| 
       65 
78 
     | 
    
         
             
             *
         
     | 
| 
       66 
     | 
    
         
            -
             * To unsubscribe from events use the  
     | 
| 
      
 79 
     | 
    
         
            +
             * To unsubscribe from events use the {@link Page.off} method:
         
     | 
| 
       67 
80 
     | 
    
         
             
             *
         
     | 
| 
       68 
     | 
    
         
            -
             * ``` 
     | 
| 
      
 81 
     | 
    
         
            +
             * ```ts
         
     | 
| 
       69 
82 
     | 
    
         
             
             * function logRequest(interceptedRequest) {
         
     | 
| 
       70 
83 
     | 
    
         
             
             *   console.log('A request was made:', interceptedRequest.url());
         
     | 
| 
       71 
84 
     | 
    
         
             
             * }
         
     | 
| 
         @@ -73,6 +86,7 @@ import { isNode } from '../environment.js'; 
     | 
|
| 
       73 
86 
     | 
    
         
             
             * // Sometime later...
         
     | 
| 
       74 
87 
     | 
    
         
             
             * page.off('request', logRequest);
         
     | 
| 
       75 
88 
     | 
    
         
             
             * ```
         
     | 
| 
      
 89 
     | 
    
         
            +
             *
         
     | 
| 
       76 
90 
     | 
    
         
             
             * @public
         
     | 
| 
       77 
91 
     | 
    
         
             
             */
         
     | 
| 
       78 
92 
     | 
    
         
             
            export class Page extends EventEmitter {
         
     | 
| 
         @@ -81,141 +95,179 @@ export class Page extends EventEmitter { 
     | 
|
| 
       81 
95 
     | 
    
         
             
                 */
         
     | 
| 
       82 
96 
     | 
    
         
             
                constructor(client, target, ignoreHTTPSErrors, screenshotTaskQueue) {
         
     | 
| 
       83 
97 
     | 
    
         
             
                    super();
         
     | 
| 
       84 
     | 
    
         
            -
                    this 
     | 
| 
       85 
     | 
    
         
            -
                    this 
     | 
| 
       86 
     | 
    
         
            -
                    this 
     | 
| 
       87 
     | 
    
         
            -
                    this 
     | 
| 
       88 
     | 
    
         
            -
                    this 
     | 
| 
       89 
     | 
    
         
            -
                     
     | 
| 
       90 
     | 
    
         
            -
                     
     | 
| 
       91 
     | 
    
         
            -
                    this 
     | 
| 
       92 
     | 
    
         
            -
                    this 
     | 
| 
       93 
     | 
    
         
            -
                    this 
     | 
| 
       94 
     | 
    
         
            -
                    this 
     | 
| 
       95 
     | 
    
         
            -
                    this 
     | 
| 
       96 
     | 
    
         
            -
                    this 
     | 
| 
       97 
     | 
    
         
            -
                     
     | 
| 
       98 
     | 
    
         
            -
                     
     | 
| 
       99 
     | 
    
         
            -
                    this 
     | 
| 
       100 
     | 
    
         
            -
                     
     | 
| 
       101 
     | 
    
         
            -
                    this 
     | 
| 
       102 
     | 
    
         
            -
                    this 
     | 
| 
       103 
     | 
    
         
            -
                    this 
     | 
| 
       104 
     | 
    
         
            -
                    this 
     | 
| 
       105 
     | 
    
         
            -
                    this 
     | 
| 
      
 98 
     | 
    
         
            +
                    _Page_instances.add(this);
         
     | 
| 
      
 99 
     | 
    
         
            +
                    _Page_closed.set(this, false);
         
     | 
| 
      
 100 
     | 
    
         
            +
                    _Page_client.set(this, void 0);
         
     | 
| 
      
 101 
     | 
    
         
            +
                    _Page_target.set(this, void 0);
         
     | 
| 
      
 102 
     | 
    
         
            +
                    _Page_keyboard.set(this, void 0);
         
     | 
| 
      
 103 
     | 
    
         
            +
                    _Page_mouse.set(this, void 0);
         
     | 
| 
      
 104 
     | 
    
         
            +
                    _Page_timeoutSettings.set(this, new TimeoutSettings());
         
     | 
| 
      
 105 
     | 
    
         
            +
                    _Page_touchscreen.set(this, void 0);
         
     | 
| 
      
 106 
     | 
    
         
            +
                    _Page_accessibility.set(this, void 0);
         
     | 
| 
      
 107 
     | 
    
         
            +
                    _Page_frameManager.set(this, void 0);
         
     | 
| 
      
 108 
     | 
    
         
            +
                    _Page_emulationManager.set(this, void 0);
         
     | 
| 
      
 109 
     | 
    
         
            +
                    _Page_tracing.set(this, void 0);
         
     | 
| 
      
 110 
     | 
    
         
            +
                    _Page_pageBindings.set(this, new Map());
         
     | 
| 
      
 111 
     | 
    
         
            +
                    _Page_coverage.set(this, void 0);
         
     | 
| 
      
 112 
     | 
    
         
            +
                    _Page_javascriptEnabled.set(this, true);
         
     | 
| 
      
 113 
     | 
    
         
            +
                    _Page_viewport.set(this, void 0);
         
     | 
| 
      
 114 
     | 
    
         
            +
                    _Page_screenshotTaskQueue.set(this, void 0);
         
     | 
| 
      
 115 
     | 
    
         
            +
                    _Page_workers.set(this, new Map());
         
     | 
| 
      
 116 
     | 
    
         
            +
                    _Page_fileChooserInterceptors.set(this, new Set());
         
     | 
| 
      
 117 
     | 
    
         
            +
                    _Page_disconnectPromise.set(this, void 0);
         
     | 
| 
      
 118 
     | 
    
         
            +
                    _Page_userDragInterceptionEnabled.set(this, false);
         
     | 
| 
      
 119 
     | 
    
         
            +
                    _Page_handlerMap.set(this, new WeakMap());
         
     | 
| 
      
 120 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_client, client, "f");
         
     | 
| 
      
 121 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_target, target, "f");
         
     | 
| 
      
 122 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_keyboard, new Keyboard(client), "f");
         
     | 
| 
      
 123 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_mouse, new Mouse(client, __classPrivateFieldGet(this, _Page_keyboard, "f")), "f");
         
     | 
| 
      
 124 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_touchscreen, new Touchscreen(client, __classPrivateFieldGet(this, _Page_keyboard, "f")), "f");
         
     | 
| 
      
 125 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_accessibility, new Accessibility(client), "f");
         
     | 
| 
      
 126 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_frameManager, new FrameManager(client, this, ignoreHTTPSErrors, __classPrivateFieldGet(this, _Page_timeoutSettings, "f")), "f");
         
     | 
| 
      
 127 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_emulationManager, new EmulationManager(client), "f");
         
     | 
| 
      
 128 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_tracing, new Tracing(client), "f");
         
     | 
| 
      
 129 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_coverage, new Coverage(client), "f");
         
     | 
| 
      
 130 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_screenshotTaskQueue, screenshotTaskQueue, "f");
         
     | 
| 
      
 131 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_viewport, null, "f");
         
     | 
| 
       106 
132 
     | 
    
         
             
                    client.on('Target.attachedToTarget', (event) => {
         
     | 
| 
       107 
     | 
    
         
            -
                         
     | 
| 
       108 
     | 
    
         
            -
                             
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
     | 
    
         
            -
                                 
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
      
 133 
     | 
    
         
            +
                        switch (event.targetInfo.type) {
         
     | 
| 
      
 134 
     | 
    
         
            +
                            case 'worker':
         
     | 
| 
      
 135 
     | 
    
         
            +
                                const connection = Connection.fromSession(client);
         
     | 
| 
      
 136 
     | 
    
         
            +
                                assert(connection);
         
     | 
| 
      
 137 
     | 
    
         
            +
                                const session = connection.session(event.sessionId);
         
     | 
| 
      
 138 
     | 
    
         
            +
                                assert(session);
         
     | 
| 
      
 139 
     | 
    
         
            +
                                const worker = new WebWorker(session, event.targetInfo.url, __classPrivateFieldGet(this, _Page_instances, "m", _Page_addConsoleMessage).bind(this), __classPrivateFieldGet(this, _Page_instances, "m", _Page_handleException).bind(this));
         
     | 
| 
      
 140 
     | 
    
         
            +
                                __classPrivateFieldGet(this, _Page_workers, "f").set(event.sessionId, worker);
         
     | 
| 
      
 141 
     | 
    
         
            +
                                this.emit("workercreated" /* PageEmittedEvents.WorkerCreated */, worker);
         
     | 
| 
      
 142 
     | 
    
         
            +
                                break;
         
     | 
| 
      
 143 
     | 
    
         
            +
                            case 'iframe':
         
     | 
| 
      
 144 
     | 
    
         
            +
                                break;
         
     | 
| 
      
 145 
     | 
    
         
            +
                            default:
         
     | 
| 
      
 146 
     | 
    
         
            +
                                // If we don't detach from service workers, they will never die. We
         
     | 
| 
      
 147 
     | 
    
         
            +
                                // still want to attach to workers for emitting events. We still
         
     | 
| 
      
 148 
     | 
    
         
            +
                                // want to attach to iframes so sessions may interact with them. We
         
     | 
| 
      
 149 
     | 
    
         
            +
                                // detach from all other types out of an abundance of caution. See
         
     | 
| 
      
 150 
     | 
    
         
            +
                                // https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypePage%5B%5D%22
         
     | 
| 
      
 151 
     | 
    
         
            +
                                // for the complete list of available types.
         
     | 
| 
      
 152 
     | 
    
         
            +
                                client
         
     | 
| 
      
 153 
     | 
    
         
            +
                                    .send('Target.detachFromTarget', {
         
     | 
| 
      
 154 
     | 
    
         
            +
                                    sessionId: event.sessionId,
         
     | 
| 
      
 155 
     | 
    
         
            +
                                })
         
     | 
| 
      
 156 
     | 
    
         
            +
                                    .catch(debugError);
         
     | 
| 
       127 
157 
     | 
    
         
             
                        }
         
     | 
| 
       128 
158 
     | 
    
         
             
                    });
         
     | 
| 
       129 
     | 
    
         
            -
                    client.on('Target.detachedFromTarget',  
     | 
| 
       130 
     | 
    
         
            -
                        const worker = this. 
     | 
| 
       131 
     | 
    
         
            -
                        if (!worker)
         
     | 
| 
      
 159 
     | 
    
         
            +
                    client.on('Target.detachedFromTarget', event => {
         
     | 
| 
      
 160 
     | 
    
         
            +
                        const worker = __classPrivateFieldGet(this, _Page_workers, "f").get(event.sessionId);
         
     | 
| 
      
 161 
     | 
    
         
            +
                        if (!worker) {
         
     | 
| 
       132 
162 
     | 
    
         
             
                            return;
         
     | 
| 
       133 
     | 
    
         
            -
                         
     | 
| 
       134 
     | 
    
         
            -
                        this 
     | 
| 
      
 163 
     | 
    
         
            +
                        }
         
     | 
| 
      
 164 
     | 
    
         
            +
                        __classPrivateFieldGet(this, _Page_workers, "f").delete(event.sessionId);
         
     | 
| 
      
 165 
     | 
    
         
            +
                        this.emit("workerdestroyed" /* PageEmittedEvents.WorkerDestroyed */, worker);
         
     | 
| 
      
 166 
     | 
    
         
            +
                    });
         
     | 
| 
      
 167 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_frameManager, "f").on(FrameManagerEmittedEvents.FrameAttached, event => {
         
     | 
| 
      
 168 
     | 
    
         
            +
                        return this.emit("frameattached" /* PageEmittedEvents.FrameAttached */, event);
         
     | 
| 
      
 169 
     | 
    
         
            +
                    });
         
     | 
| 
      
 170 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_frameManager, "f").on(FrameManagerEmittedEvents.FrameDetached, event => {
         
     | 
| 
      
 171 
     | 
    
         
            +
                        return this.emit("framedetached" /* PageEmittedEvents.FrameDetached */, event);
         
     | 
| 
      
 172 
     | 
    
         
            +
                    });
         
     | 
| 
      
 173 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_frameManager, "f").on(FrameManagerEmittedEvents.FrameNavigated, event => {
         
     | 
| 
      
 174 
     | 
    
         
            +
                        return this.emit("framenavigated" /* PageEmittedEvents.FrameNavigated */, event);
         
     | 
| 
      
 175 
     | 
    
         
            +
                    });
         
     | 
| 
      
 176 
     | 
    
         
            +
                    const networkManager = __classPrivateFieldGet(this, _Page_frameManager, "f").networkManager();
         
     | 
| 
      
 177 
     | 
    
         
            +
                    networkManager.on(NetworkManagerEmittedEvents.Request, event => {
         
     | 
| 
      
 178 
     | 
    
         
            +
                        return this.emit("request" /* PageEmittedEvents.Request */, event);
         
     | 
| 
      
 179 
     | 
    
         
            +
                    });
         
     | 
| 
      
 180 
     | 
    
         
            +
                    networkManager.on(NetworkManagerEmittedEvents.RequestServedFromCache, event => {
         
     | 
| 
      
 181 
     | 
    
         
            +
                        return this.emit("requestservedfromcache" /* PageEmittedEvents.RequestServedFromCache */, event);
         
     | 
| 
      
 182 
     | 
    
         
            +
                    });
         
     | 
| 
      
 183 
     | 
    
         
            +
                    networkManager.on(NetworkManagerEmittedEvents.Response, event => {
         
     | 
| 
      
 184 
     | 
    
         
            +
                        return this.emit("response" /* PageEmittedEvents.Response */, event);
         
     | 
| 
      
 185 
     | 
    
         
            +
                    });
         
     | 
| 
      
 186 
     | 
    
         
            +
                    networkManager.on(NetworkManagerEmittedEvents.RequestFailed, event => {
         
     | 
| 
      
 187 
     | 
    
         
            +
                        return this.emit("requestfailed" /* PageEmittedEvents.RequestFailed */, event);
         
     | 
| 
      
 188 
     | 
    
         
            +
                    });
         
     | 
| 
      
 189 
     | 
    
         
            +
                    networkManager.on(NetworkManagerEmittedEvents.RequestFinished, event => {
         
     | 
| 
      
 190 
     | 
    
         
            +
                        return this.emit("requestfinished" /* PageEmittedEvents.RequestFinished */, event);
         
     | 
| 
      
 191 
     | 
    
         
            +
                    });
         
     | 
| 
      
 192 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_fileChooserInterceptors, new Set(), "f");
         
     | 
| 
      
 193 
     | 
    
         
            +
                    client.on('Page.domContentEventFired', () => {
         
     | 
| 
      
 194 
     | 
    
         
            +
                        return this.emit("domcontentloaded" /* PageEmittedEvents.DOMContentLoaded */);
         
     | 
| 
      
 195 
     | 
    
         
            +
                    });
         
     | 
| 
      
 196 
     | 
    
         
            +
                    client.on('Page.loadEventFired', () => {
         
     | 
| 
      
 197 
     | 
    
         
            +
                        return this.emit("load" /* PageEmittedEvents.Load */);
         
     | 
| 
      
 198 
     | 
    
         
            +
                    });
         
     | 
| 
      
 199 
     | 
    
         
            +
                    client.on('Runtime.consoleAPICalled', event => {
         
     | 
| 
      
 200 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_onConsoleAPI).call(this, event);
         
     | 
| 
      
 201 
     | 
    
         
            +
                    });
         
     | 
| 
      
 202 
     | 
    
         
            +
                    client.on('Runtime.bindingCalled', event => {
         
     | 
| 
      
 203 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_onBindingCalled).call(this, event);
         
     | 
| 
      
 204 
     | 
    
         
            +
                    });
         
     | 
| 
      
 205 
     | 
    
         
            +
                    client.on('Page.javascriptDialogOpening', event => {
         
     | 
| 
      
 206 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_onDialog).call(this, event);
         
     | 
| 
      
 207 
     | 
    
         
            +
                    });
         
     | 
| 
      
 208 
     | 
    
         
            +
                    client.on('Runtime.exceptionThrown', exception => {
         
     | 
| 
      
 209 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_handleException).call(this, exception.exceptionDetails);
         
     | 
| 
       135 
210 
     | 
    
         
             
                    });
         
     | 
| 
       136 
     | 
    
         
            -
                     
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
                     
     | 
| 
       139 
     | 
    
         
            -
                     
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
                     
     | 
| 
       142 
     | 
    
         
            -
                     
     | 
| 
       143 
     | 
    
         
            -
             
     | 
| 
       144 
     | 
    
         
            -
                     
     | 
| 
       145 
     | 
    
         
            -
                     
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
                     
     | 
| 
       148 
     | 
    
         
            -
                     
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
       150 
     | 
    
         
            -
             
     | 
| 
       151 
     | 
    
         
            -
                    client.on('Runtime.exceptionThrown', (exception) => this._handleException(exception.exceptionDetails));
         
     | 
| 
       152 
     | 
    
         
            -
                    client.on('Inspector.targetCrashed', () => this._onTargetCrashed());
         
     | 
| 
       153 
     | 
    
         
            -
                    client.on('Performance.metrics', (event) => this._emitMetrics(event));
         
     | 
| 
       154 
     | 
    
         
            -
                    client.on('Log.entryAdded', (event) => this._onLogEntryAdded(event));
         
     | 
| 
       155 
     | 
    
         
            -
                    client.on('Page.fileChooserOpened', (event) => this._onFileChooser(event));
         
     | 
| 
       156 
     | 
    
         
            -
                    this._target._isClosedPromise.then(() => {
         
     | 
| 
       157 
     | 
    
         
            -
                        this.emit("close" /* Close */);
         
     | 
| 
       158 
     | 
    
         
            -
                        this._closed = true;
         
     | 
| 
      
 211 
     | 
    
         
            +
                    client.on('Inspector.targetCrashed', () => {
         
     | 
| 
      
 212 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_onTargetCrashed).call(this);
         
     | 
| 
      
 213 
     | 
    
         
            +
                    });
         
     | 
| 
      
 214 
     | 
    
         
            +
                    client.on('Performance.metrics', event => {
         
     | 
| 
      
 215 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_emitMetrics).call(this, event);
         
     | 
| 
      
 216 
     | 
    
         
            +
                    });
         
     | 
| 
      
 217 
     | 
    
         
            +
                    client.on('Log.entryAdded', event => {
         
     | 
| 
      
 218 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_onLogEntryAdded).call(this, event);
         
     | 
| 
      
 219 
     | 
    
         
            +
                    });
         
     | 
| 
      
 220 
     | 
    
         
            +
                    client.on('Page.fileChooserOpened', event => {
         
     | 
| 
      
 221 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_onFileChooser).call(this, event);
         
     | 
| 
      
 222 
     | 
    
         
            +
                    });
         
     | 
| 
      
 223 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_target, "f")._isClosedPromise.then(() => {
         
     | 
| 
      
 224 
     | 
    
         
            +
                        this.emit("close" /* PageEmittedEvents.Close */);
         
     | 
| 
      
 225 
     | 
    
         
            +
                        __classPrivateFieldSet(this, _Page_closed, true, "f");
         
     | 
| 
       159 
226 
     | 
    
         
             
                    });
         
     | 
| 
       160 
227 
     | 
    
         
             
                }
         
     | 
| 
       161 
228 
     | 
    
         
             
                /**
         
     | 
| 
       162 
229 
     | 
    
         
             
                 * @internal
         
     | 
| 
       163 
230 
     | 
    
         
             
                 */
         
     | 
| 
       164 
     | 
    
         
            -
                static async  
     | 
| 
      
 231 
     | 
    
         
            +
                static async _create(client, target, ignoreHTTPSErrors, defaultViewport, screenshotTaskQueue) {
         
     | 
| 
       165 
232 
     | 
    
         
             
                    const page = new Page(client, target, ignoreHTTPSErrors, screenshotTaskQueue);
         
     | 
| 
       166 
     | 
    
         
            -
                    await page. 
     | 
| 
       167 
     | 
    
         
            -
                    if (defaultViewport)
         
     | 
| 
      
 233 
     | 
    
         
            +
                    await __classPrivateFieldGet(page, _Page_instances, "m", _Page_initialize).call(page);
         
     | 
| 
      
 234 
     | 
    
         
            +
                    if (defaultViewport) {
         
     | 
| 
       168 
235 
     | 
    
         
             
                        await page.setViewport(defaultViewport);
         
     | 
| 
      
 236 
     | 
    
         
            +
                    }
         
     | 
| 
       169 
237 
     | 
    
         
             
                    return page;
         
     | 
| 
       170 
238 
     | 
    
         
             
                }
         
     | 
| 
       171 
     | 
    
         
            -
                async _initialize() {
         
     | 
| 
       172 
     | 
    
         
            -
                    await Promise.all([
         
     | 
| 
       173 
     | 
    
         
            -
                        this._frameManager.initialize(),
         
     | 
| 
       174 
     | 
    
         
            -
                        this._client.send('Target.setAutoAttach', {
         
     | 
| 
       175 
     | 
    
         
            -
                            autoAttach: true,
         
     | 
| 
       176 
     | 
    
         
            -
                            waitForDebuggerOnStart: false,
         
     | 
| 
       177 
     | 
    
         
            -
                            flatten: true,
         
     | 
| 
       178 
     | 
    
         
            -
                        }),
         
     | 
| 
       179 
     | 
    
         
            -
                        this._client.send('Performance.enable'),
         
     | 
| 
       180 
     | 
    
         
            -
                        this._client.send('Log.enable'),
         
     | 
| 
       181 
     | 
    
         
            -
                    ]);
         
     | 
| 
       182 
     | 
    
         
            -
                }
         
     | 
| 
       183 
     | 
    
         
            -
                async _onFileChooser(event) {
         
     | 
| 
       184 
     | 
    
         
            -
                    if (!this._fileChooserInterceptors.size)
         
     | 
| 
       185 
     | 
    
         
            -
                        return;
         
     | 
| 
       186 
     | 
    
         
            -
                    const frame = this._frameManager.frame(event.frameId);
         
     | 
| 
       187 
     | 
    
         
            -
                    const context = await frame.executionContext();
         
     | 
| 
       188 
     | 
    
         
            -
                    const element = await context._adoptBackendNodeId(event.backendNodeId);
         
     | 
| 
       189 
     | 
    
         
            -
                    const interceptors = Array.from(this._fileChooserInterceptors);
         
     | 
| 
       190 
     | 
    
         
            -
                    this._fileChooserInterceptors.clear();
         
     | 
| 
       191 
     | 
    
         
            -
                    const fileChooser = new FileChooser(element, event);
         
     | 
| 
       192 
     | 
    
         
            -
                    for (const interceptor of interceptors)
         
     | 
| 
       193 
     | 
    
         
            -
                        interceptor.call(null, fileChooser);
         
     | 
| 
       194 
     | 
    
         
            -
                }
         
     | 
| 
       195 
239 
     | 
    
         
             
                /**
         
     | 
| 
       196 
240 
     | 
    
         
             
                 * @returns `true` if drag events are being intercepted, `false` otherwise.
         
     | 
| 
       197 
241 
     | 
    
         
             
                 */
         
     | 
| 
       198 
242 
     | 
    
         
             
                isDragInterceptionEnabled() {
         
     | 
| 
       199 
     | 
    
         
            -
                    return this 
     | 
| 
      
 243 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_userDragInterceptionEnabled, "f");
         
     | 
| 
       200 
244 
     | 
    
         
             
                }
         
     | 
| 
       201 
245 
     | 
    
         
             
                /**
         
     | 
| 
       202 
246 
     | 
    
         
             
                 * @returns `true` if the page has JavaScript enabled, `false` otherwise.
         
     | 
| 
       203 
247 
     | 
    
         
             
                 */
         
     | 
| 
       204 
248 
     | 
    
         
             
                isJavaScriptEnabled() {
         
     | 
| 
       205 
     | 
    
         
            -
                    return this 
     | 
| 
      
 249 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_javascriptEnabled, "f");
         
     | 
| 
       206 
250 
     | 
    
         
             
                }
         
     | 
| 
       207 
251 
     | 
    
         
             
                /**
         
     | 
| 
       208 
252 
     | 
    
         
             
                 * Listen to page events.
         
     | 
| 
      
 253 
     | 
    
         
            +
                 *
         
     | 
| 
      
 254 
     | 
    
         
            +
                 * :::note
         
     | 
| 
      
 255 
     | 
    
         
            +
                 *
         
     | 
| 
      
 256 
     | 
    
         
            +
                 * This method exists to define event typings and handle proper wireup of
         
     | 
| 
      
 257 
     | 
    
         
            +
                 * cooperative request interception. Actual event listening and dispatching is
         
     | 
| 
      
 258 
     | 
    
         
            +
                 * delegated to {@link EventEmitter}.
         
     | 
| 
      
 259 
     | 
    
         
            +
                 *
         
     | 
| 
      
 260 
     | 
    
         
            +
                 * :::
         
     | 
| 
       209 
261 
     | 
    
         
             
                 */
         
     | 
| 
       210 
     | 
    
         
            -
                // Note: this method exists to define event typings and handle
         
     | 
| 
       211 
     | 
    
         
            -
                // proper wireup of cooperative request interception. Actual event listening and
         
     | 
| 
       212 
     | 
    
         
            -
                // dispatching is delegated to EventEmitter.
         
     | 
| 
       213 
262 
     | 
    
         
             
                on(eventName, handler) {
         
     | 
| 
       214 
263 
     | 
    
         
             
                    if (eventName === 'request') {
         
     | 
| 
       215 
     | 
    
         
            -
                        const wrap = ( 
     | 
| 
       216 
     | 
    
         
            -
                             
     | 
| 
       217 
     | 
    
         
            -
             
     | 
| 
       218 
     | 
    
         
            -
             
     | 
| 
      
 264 
     | 
    
         
            +
                        const wrap = __classPrivateFieldGet(this, _Page_handlerMap, "f").get(handler) ||
         
     | 
| 
      
 265 
     | 
    
         
            +
                            ((event) => {
         
     | 
| 
      
 266 
     | 
    
         
            +
                                event.enqueueInterceptAction(() => {
         
     | 
| 
      
 267 
     | 
    
         
            +
                                    return handler(event);
         
     | 
| 
      
 268 
     | 
    
         
            +
                                });
         
     | 
| 
      
 269 
     | 
    
         
            +
                            });
         
     | 
| 
      
 270 
     | 
    
         
            +
                        __classPrivateFieldGet(this, _Page_handlerMap, "f").set(handler, wrap);
         
     | 
| 
       219 
271 
     | 
    
         
             
                        return super.on(eventName, wrap);
         
     | 
| 
       220 
272 
     | 
    
         
             
                    }
         
     | 
| 
       221 
273 
     | 
    
         
             
                    return super.on(eventName, handler);
         
     | 
| 
         @@ -227,16 +279,30 @@ export class Page extends EventEmitter { 
     | 
|
| 
       227 
279 
     | 
    
         
             
                }
         
     | 
| 
       228 
280 
     | 
    
         
             
                off(eventName, handler) {
         
     | 
| 
       229 
281 
     | 
    
         
             
                    if (eventName === 'request') {
         
     | 
| 
       230 
     | 
    
         
            -
                        handler = this. 
     | 
| 
      
 282 
     | 
    
         
            +
                        handler = __classPrivateFieldGet(this, _Page_handlerMap, "f").get(handler) || handler;
         
     | 
| 
       231 
283 
     | 
    
         
             
                    }
         
     | 
| 
       232 
284 
     | 
    
         
             
                    return super.off(eventName, handler);
         
     | 
| 
       233 
285 
     | 
    
         
             
                }
         
     | 
| 
       234 
286 
     | 
    
         
             
                /**
         
     | 
| 
       235 
287 
     | 
    
         
             
                 * This method is typically coupled with an action that triggers file
         
     | 
| 
       236 
     | 
    
         
            -
                 * choosing. 
     | 
| 
      
 288 
     | 
    
         
            +
                 * choosing.
         
     | 
| 
      
 289 
     | 
    
         
            +
                 *
         
     | 
| 
      
 290 
     | 
    
         
            +
                 * :::caution
         
     | 
| 
      
 291 
     | 
    
         
            +
                 *
         
     | 
| 
      
 292 
     | 
    
         
            +
                 * This must be called before the file chooser is launched. It will not return
         
     | 
| 
      
 293 
     | 
    
         
            +
                 * a currently active file chooser.
         
     | 
| 
      
 294 
     | 
    
         
            +
                 *
         
     | 
| 
      
 295 
     | 
    
         
            +
                 * :::
         
     | 
| 
      
 296 
     | 
    
         
            +
                 *
         
     | 
| 
      
 297 
     | 
    
         
            +
                 * @remarks
         
     | 
| 
      
 298 
     | 
    
         
            +
                 * In non-headless Chromium, this method results in the native file picker
         
     | 
| 
      
 299 
     | 
    
         
            +
                 * dialog `not showing up` for the user.
         
     | 
| 
      
 300 
     | 
    
         
            +
                 *
         
     | 
| 
      
 301 
     | 
    
         
            +
                 * @example
         
     | 
| 
      
 302 
     | 
    
         
            +
                 * The following example clicks a button that issues a file chooser
         
     | 
| 
       237 
303 
     | 
    
         
             
                 * and then responds with `/tmp/myfile.pdf` as if a user has selected this file.
         
     | 
| 
       238 
304 
     | 
    
         
             
                 *
         
     | 
| 
       239 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 305 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       240 
306 
     | 
    
         
             
                 * const [fileChooser] = await Promise.all([
         
     | 
| 
       241 
307 
     | 
    
         
             
                 * page.waitForFileChooser(),
         
     | 
| 
       242 
308 
     | 
    
         
             
                 * page.click('#upload-file-button'),
         
     | 
| 
         @@ -244,28 +310,21 @@ export class Page extends EventEmitter { 
     | 
|
| 
       244 
310 
     | 
    
         
             
                 * ]);
         
     | 
| 
       245 
311 
     | 
    
         
             
                 * await fileChooser.accept(['/tmp/myfile.pdf']);
         
     | 
| 
       246 
312 
     | 
    
         
             
                 * ```
         
     | 
| 
       247 
     | 
    
         
            -
                 *
         
     | 
| 
       248 
     | 
    
         
            -
                 * NOTE: This must be called before the file chooser is launched. It will not
         
     | 
| 
       249 
     | 
    
         
            -
                 * return a currently active file chooser.
         
     | 
| 
       250 
     | 
    
         
            -
                 * @param options - Optional waiting parameters
         
     | 
| 
       251 
     | 
    
         
            -
                 * @returns Resolves after a page requests a file picker.
         
     | 
| 
       252 
     | 
    
         
            -
                 * @remarks
         
     | 
| 
       253 
     | 
    
         
            -
                 * NOTE: In non-headless Chromium, this method results in the native file picker
         
     | 
| 
       254 
     | 
    
         
            -
                 * dialog `not showing up` for the user.
         
     | 
| 
       255 
313 
     | 
    
         
             
                 */
         
     | 
| 
       256 
314 
     | 
    
         
             
                async waitForFileChooser(options = {}) {
         
     | 
| 
       257 
     | 
    
         
            -
                    if (!this. 
     | 
| 
       258 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 315 
     | 
    
         
            +
                    if (!__classPrivateFieldGet(this, _Page_fileChooserInterceptors, "f").size) {
         
     | 
| 
      
 316 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Page.setInterceptFileChooserDialog', {
         
     | 
| 
       259 
317 
     | 
    
         
             
                            enabled: true,
         
     | 
| 
       260 
318 
     | 
    
         
             
                        });
         
     | 
| 
       261 
     | 
    
         
            -
                     
     | 
| 
      
 319 
     | 
    
         
            +
                    }
         
     | 
| 
      
 320 
     | 
    
         
            +
                    const { timeout = __classPrivateFieldGet(this, _Page_timeoutSettings, "f").timeout() } = options;
         
     | 
| 
       262 
321 
     | 
    
         
             
                    let callback;
         
     | 
| 
       263 
     | 
    
         
            -
                    const promise = new Promise( 
     | 
| 
       264 
     | 
    
         
            -
             
     | 
| 
       265 
     | 
    
         
            -
                     
     | 
| 
       266 
     | 
    
         
            -
             
     | 
| 
       267 
     | 
    
         
            -
             
     | 
| 
       268 
     | 
    
         
            -
                        this. 
     | 
| 
      
 322 
     | 
    
         
            +
                    const promise = new Promise(x => {
         
     | 
| 
      
 323 
     | 
    
         
            +
                        return (callback = x);
         
     | 
| 
      
 324 
     | 
    
         
            +
                    });
         
     | 
| 
      
 325 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_fileChooserInterceptors, "f").add(callback);
         
     | 
| 
      
 326 
     | 
    
         
            +
                    return waitWithTimeout(promise, 'waiting for file chooser', timeout).catch(error => {
         
     | 
| 
      
 327 
     | 
    
         
            +
                        __classPrivateFieldGet(this, _Page_fileChooserInterceptors, "f").delete(callback);
         
     | 
| 
       269 
328 
     | 
    
         
             
                        throw error;
         
     | 
| 
       270 
329 
     | 
    
         
             
                    });
         
     | 
| 
       271 
330 
     | 
    
         
             
                }
         
     | 
| 
         @@ -275,19 +334,22 @@ export class Page extends EventEmitter { 
     | 
|
| 
       275 
334 
     | 
    
         
             
                 * NOTE: Consider using {@link BrowserContext.overridePermissions} to grant
         
     | 
| 
       276 
335 
     | 
    
         
             
                 * permissions for the page to read its geolocation.
         
     | 
| 
       277 
336 
     | 
    
         
             
                 * @example
         
     | 
| 
       278 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 337 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       279 
338 
     | 
    
         
             
                 * await page.setGeolocation({latitude: 59.95, longitude: 30.31667});
         
     | 
| 
       280 
339 
     | 
    
         
             
                 * ```
         
     | 
| 
       281 
340 
     | 
    
         
             
                 */
         
     | 
| 
       282 
341 
     | 
    
         
             
                async setGeolocation(options) {
         
     | 
| 
       283 
342 
     | 
    
         
             
                    const { longitude, latitude, accuracy = 0 } = options;
         
     | 
| 
       284 
     | 
    
         
            -
                    if (longitude < -180 || longitude > 180)
         
     | 
| 
      
 343 
     | 
    
         
            +
                    if (longitude < -180 || longitude > 180) {
         
     | 
| 
       285 
344 
     | 
    
         
             
                        throw new Error(`Invalid longitude "${longitude}": precondition -180 <= LONGITUDE <= 180 failed.`);
         
     | 
| 
       286 
     | 
    
         
            -
                     
     | 
| 
      
 345 
     | 
    
         
            +
                    }
         
     | 
| 
      
 346 
     | 
    
         
            +
                    if (latitude < -90 || latitude > 90) {
         
     | 
| 
       287 
347 
     | 
    
         
             
                        throw new Error(`Invalid latitude "${latitude}": precondition -90 <= LATITUDE <= 90 failed.`);
         
     | 
| 
       288 
     | 
    
         
            -
                     
     | 
| 
      
 348 
     | 
    
         
            +
                    }
         
     | 
| 
      
 349 
     | 
    
         
            +
                    if (accuracy < 0) {
         
     | 
| 
       289 
350 
     | 
    
         
             
                        throw new Error(`Invalid accuracy "${accuracy}": precondition 0 <= ACCURACY failed.`);
         
     | 
| 
       290 
     | 
    
         
            -
                     
     | 
| 
      
 351 
     | 
    
         
            +
                    }
         
     | 
| 
      
 352 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setGeolocationOverride', {
         
     | 
| 
       291 
353 
     | 
    
         
             
                        longitude,
         
     | 
| 
       292 
354 
     | 
    
         
             
                        latitude,
         
     | 
| 
       293 
355 
     | 
    
         
             
                        accuracy,
         
     | 
| 
         @@ -297,36 +359,25 @@ export class Page extends EventEmitter { 
     | 
|
| 
       297 
359 
     | 
    
         
             
                 * @returns A target this page was created from.
         
     | 
| 
       298 
360 
     | 
    
         
             
                 */
         
     | 
| 
       299 
361 
     | 
    
         
             
                target() {
         
     | 
| 
       300 
     | 
    
         
            -
                    return this 
     | 
| 
      
 362 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_target, "f");
         
     | 
| 
       301 
363 
     | 
    
         
             
                }
         
     | 
| 
       302 
364 
     | 
    
         
             
                /**
         
     | 
| 
       303 
     | 
    
         
            -
                 * Get the CDP session client the page belongs to.
         
     | 
| 
       304 
365 
     | 
    
         
             
                 * @internal
         
     | 
| 
       305 
366 
     | 
    
         
             
                 */
         
     | 
| 
       306 
     | 
    
         
            -
                 
     | 
| 
       307 
     | 
    
         
            -
                    return this 
     | 
| 
      
 367 
     | 
    
         
            +
                _client() {
         
     | 
| 
      
 368 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_client, "f");
         
     | 
| 
       308 
369 
     | 
    
         
             
                }
         
     | 
| 
       309 
370 
     | 
    
         
             
                /**
         
     | 
| 
       310 
371 
     | 
    
         
             
                 * Get the browser the page belongs to.
         
     | 
| 
       311 
372 
     | 
    
         
             
                 */
         
     | 
| 
       312 
373 
     | 
    
         
             
                browser() {
         
     | 
| 
       313 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 374 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_target, "f").browser();
         
     | 
| 
       314 
375 
     | 
    
         
             
                }
         
     | 
| 
       315 
376 
     | 
    
         
             
                /**
         
     | 
| 
       316 
377 
     | 
    
         
             
                 * Get the browser context that the page belongs to.
         
     | 
| 
       317 
378 
     | 
    
         
             
                 */
         
     | 
| 
       318 
379 
     | 
    
         
             
                browserContext() {
         
     | 
| 
       319 
     | 
    
         
            -
                    return this. 
     | 
| 
       320 
     | 
    
         
            -
                }
         
     | 
| 
       321 
     | 
    
         
            -
                _onTargetCrashed() {
         
     | 
| 
       322 
     | 
    
         
            -
                    this.emit('error', new Error('Page crashed!'));
         
     | 
| 
       323 
     | 
    
         
            -
                }
         
     | 
| 
       324 
     | 
    
         
            -
                _onLogEntryAdded(event) {
         
     | 
| 
       325 
     | 
    
         
            -
                    const { level, text, args, source, url, lineNumber } = event.entry;
         
     | 
| 
       326 
     | 
    
         
            -
                    if (args)
         
     | 
| 
       327 
     | 
    
         
            -
                        args.map((arg) => helper.releaseObject(this._client, arg));
         
     | 
| 
       328 
     | 
    
         
            -
                    if (source !== 'worker')
         
     | 
| 
       329 
     | 
    
         
            -
                        this.emit("console" /* Console */, new ConsoleMessage(level, text, [], [{ url, lineNumber }]));
         
     | 
| 
      
 380 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_target, "f").browserContext();
         
     | 
| 
       330 
381 
     | 
    
         
             
                }
         
     | 
| 
       331 
382 
     | 
    
         
             
                /**
         
     | 
| 
       332 
383 
     | 
    
         
             
                 * @returns The page's main frame.
         
     | 
| 
         @@ -334,28 +385,28 @@ export class Page extends EventEmitter { 
     | 
|
| 
       334 
385 
     | 
    
         
             
                 * Page is guaranteed to have a main frame which persists during navigations.
         
     | 
| 
       335 
386 
     | 
    
         
             
                 */
         
     | 
| 
       336 
387 
     | 
    
         
             
                mainFrame() {
         
     | 
| 
       337 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 388 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f").mainFrame();
         
     | 
| 
       338 
389 
     | 
    
         
             
                }
         
     | 
| 
       339 
390 
     | 
    
         
             
                get keyboard() {
         
     | 
| 
       340 
     | 
    
         
            -
                    return this 
     | 
| 
      
 391 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_keyboard, "f");
         
     | 
| 
       341 
392 
     | 
    
         
             
                }
         
     | 
| 
       342 
393 
     | 
    
         
             
                get touchscreen() {
         
     | 
| 
       343 
     | 
    
         
            -
                    return this 
     | 
| 
      
 394 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_touchscreen, "f");
         
     | 
| 
       344 
395 
     | 
    
         
             
                }
         
     | 
| 
       345 
396 
     | 
    
         
             
                get coverage() {
         
     | 
| 
       346 
     | 
    
         
            -
                    return this 
     | 
| 
      
 397 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_coverage, "f");
         
     | 
| 
       347 
398 
     | 
    
         
             
                }
         
     | 
| 
       348 
399 
     | 
    
         
             
                get tracing() {
         
     | 
| 
       349 
     | 
    
         
            -
                    return this 
     | 
| 
      
 400 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_tracing, "f");
         
     | 
| 
       350 
401 
     | 
    
         
             
                }
         
     | 
| 
       351 
402 
     | 
    
         
             
                get accessibility() {
         
     | 
| 
       352 
     | 
    
         
            -
                    return this 
     | 
| 
      
 403 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_accessibility, "f");
         
     | 
| 
       353 
404 
     | 
    
         
             
                }
         
     | 
| 
       354 
405 
     | 
    
         
             
                /**
         
     | 
| 
       355 
406 
     | 
    
         
             
                 * @returns An array of all frames attached to the page.
         
     | 
| 
       356 
407 
     | 
    
         
             
                 */
         
     | 
| 
       357 
408 
     | 
    
         
             
                frames() {
         
     | 
| 
       358 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 409 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f").frames();
         
     | 
| 
       359 
410 
     | 
    
         
             
                }
         
     | 
| 
       360 
411 
     | 
    
         
             
                /**
         
     | 
| 
       361 
412 
     | 
    
         
             
                 * @returns all of the dedicated
         
     | 
| 
         @@ -366,7 +417,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       366 
417 
     | 
    
         
             
                 * NOTE: This does not contain ServiceWorkers
         
     | 
| 
       367 
418 
     | 
    
         
             
                 */
         
     | 
| 
       368 
419 
     | 
    
         
             
                workers() {
         
     | 
| 
       369 
     | 
    
         
            -
                    return Array.from(this. 
     | 
| 
      
 420 
     | 
    
         
            +
                    return Array.from(__classPrivateFieldGet(this, _Page_workers, "f").values());
         
     | 
| 
       370 
421 
     | 
    
         
             
                }
         
     | 
| 
       371 
422 
     | 
    
         
             
                /**
         
     | 
| 
       372 
423 
     | 
    
         
             
                 * @param value - Whether to enable request interception.
         
     | 
| 
         @@ -381,7 +432,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       381 
432 
     | 
    
         
             
                 *
         
     | 
| 
       382 
433 
     | 
    
         
             
                 * @example
         
     | 
| 
       383 
434 
     | 
    
         
             
                 * An example of a naïve request interceptor that aborts all image requests:
         
     | 
| 
       384 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 435 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       385 
436 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       386 
437 
     | 
    
         
             
                 * (async () => {
         
     | 
| 
       387 
438 
     | 
    
         
             
                 *   const browser = await puppeteer.launch();
         
     | 
| 
         @@ -401,7 +452,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       401 
452 
     | 
    
         
             
                 * NOTE: Enabling request interception disables page caching.
         
     | 
| 
       402 
453 
     | 
    
         
             
                 */
         
     | 
| 
       403 
454 
     | 
    
         
             
                async setRequestInterception(value) {
         
     | 
| 
       404 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 455 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f").networkManager().setRequestInterception(value);
         
     | 
| 
       405 
456 
     | 
    
         
             
                }
         
     | 
| 
       406 
457 
     | 
    
         
             
                /**
         
     | 
| 
       407 
458 
     | 
    
         
             
                 * @param enabled - Whether to enable drag interception.
         
     | 
| 
         @@ -412,8 +463,8 @@ export class Page extends EventEmitter { 
     | 
|
| 
       412 
463 
     | 
    
         
             
                 * on the page, which can then be used to simulate drag-and-drop.
         
     | 
| 
       413 
464 
     | 
    
         
             
                 */
         
     | 
| 
       414 
465 
     | 
    
         
             
                async setDragInterception(enabled) {
         
     | 
| 
       415 
     | 
    
         
            -
                    this 
     | 
| 
       416 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 466 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_userDragInterceptionEnabled, enabled, "f");
         
     | 
| 
      
 467 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_client, "f").send('Input.setInterceptDrags', { enabled });
         
     | 
| 
       417 
468 
     | 
    
         
             
                }
         
     | 
| 
       418 
469 
     | 
    
         
             
                /**
         
     | 
| 
       419 
470 
     | 
    
         
             
                 * @param enabled - When `true`, enables offline mode for the page.
         
     | 
| 
         @@ -423,12 +474,12 @@ export class Page extends EventEmitter { 
     | 
|
| 
       423 
474 
     | 
    
         
             
                 * (#pageemulatenetworkconditionsnetworkconditions)
         
     | 
| 
       424 
475 
     | 
    
         
             
                 */
         
     | 
| 
       425 
476 
     | 
    
         
             
                setOfflineMode(enabled) {
         
     | 
| 
       426 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 477 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f").networkManager().setOfflineMode(enabled);
         
     | 
| 
       427 
478 
     | 
    
         
             
                }
         
     | 
| 
       428 
479 
     | 
    
         
             
                /**
         
     | 
| 
       429 
480 
     | 
    
         
             
                 * @param networkConditions - Passing `null` disables network condition emulation.
         
     | 
| 
       430 
481 
     | 
    
         
             
                 * @example
         
     | 
| 
       431 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 482 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       432 
483 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       433 
484 
     | 
    
         
             
                 * const slow3G = puppeteer.networkConditions['Slow 3G'];
         
     | 
| 
       434 
485 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -447,7 +498,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       447 
498 
     | 
    
         
             
                 * [page.setOfflineMode(enabled)](#pagesetofflinemodeenabled).
         
     | 
| 
       448 
499 
     | 
    
         
             
                 */
         
     | 
| 
       449 
500 
     | 
    
         
             
                emulateNetworkConditions(networkConditions) {
         
     | 
| 
       450 
     | 
    
         
            -
                    return this 
     | 
| 
      
 501 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f")
         
     | 
| 
       451 
502 
     | 
    
         
             
                        .networkManager()
         
     | 
| 
       452 
503 
     | 
    
         
             
                        .emulateNetworkConditions(networkConditions);
         
     | 
| 
       453 
504 
     | 
    
         
             
                }
         
     | 
| 
         @@ -469,21 +520,18 @@ export class Page extends EventEmitter { 
     | 
|
| 
       469 
520 
     | 
    
         
             
                 * @param timeout - Maximum navigation time in milliseconds.
         
     | 
| 
       470 
521 
     | 
    
         
             
                 */
         
     | 
| 
       471 
522 
     | 
    
         
             
                setDefaultNavigationTimeout(timeout) {
         
     | 
| 
       472 
     | 
    
         
            -
                    this. 
     | 
| 
      
 523 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_timeoutSettings, "f").setDefaultNavigationTimeout(timeout);
         
     | 
| 
       473 
524 
     | 
    
         
             
                }
         
     | 
| 
       474 
525 
     | 
    
         
             
                /**
         
     | 
| 
       475 
526 
     | 
    
         
             
                 * @param timeout - Maximum time in milliseconds.
         
     | 
| 
       476 
527 
     | 
    
         
             
                 */
         
     | 
| 
       477 
528 
     | 
    
         
             
                setDefaultTimeout(timeout) {
         
     | 
| 
       478 
     | 
    
         
            -
                    this. 
     | 
| 
      
 529 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_timeoutSettings, "f").setDefaultTimeout(timeout);
         
     | 
| 
       479 
530 
     | 
    
         
             
                }
         
     | 
| 
       480 
531 
     | 
    
         
             
                /**
         
     | 
| 
       481 
532 
     | 
    
         
             
                 * Runs `document.querySelector` within the page. If no element matches the
         
     | 
| 
       482 
533 
     | 
    
         
             
                 * selector, the return value resolves to `null`.
         
     | 
| 
       483 
534 
     | 
    
         
             
                 *
         
     | 
| 
       484 
     | 
    
         
            -
                 * @remarks
         
     | 
| 
       485 
     | 
    
         
            -
                 * Shortcut for {@link Frame.$ | Page.mainFrame().$(selector) }.
         
     | 
| 
       486 
     | 
    
         
            -
                 *
         
     | 
| 
       487 
535 
     | 
    
         
             
                 * @param selector - A `selector` to query page for
         
     | 
| 
       488 
536 
     | 
    
         
             
                 * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
         
     | 
| 
       489 
537 
     | 
    
         
             
                 * to query page for.
         
     | 
| 
         @@ -491,6 +539,16 @@ export class Page extends EventEmitter { 
     | 
|
| 
       491 
539 
     | 
    
         
             
                async $(selector) {
         
     | 
| 
       492 
540 
     | 
    
         
             
                    return this.mainFrame().$(selector);
         
     | 
| 
       493 
541 
     | 
    
         
             
                }
         
     | 
| 
      
 542 
     | 
    
         
            +
                /**
         
     | 
| 
      
 543 
     | 
    
         
            +
                 * The method runs `document.querySelectorAll` within the page. If no elements
         
     | 
| 
      
 544 
     | 
    
         
            +
                 * match the selector, the return value resolves to `[]`.
         
     | 
| 
      
 545 
     | 
    
         
            +
                 * @remarks
         
     | 
| 
      
 546 
     | 
    
         
            +
                 * Shortcut for {@link Frame.$$ | Page.mainFrame().$$(selector) }.
         
     | 
| 
      
 547 
     | 
    
         
            +
                 * @param selector - A `selector` to query page for
         
     | 
| 
      
 548 
     | 
    
         
            +
                 */
         
     | 
| 
      
 549 
     | 
    
         
            +
                async $$(selector) {
         
     | 
| 
      
 550 
     | 
    
         
            +
                    return this.mainFrame().$$(selector);
         
     | 
| 
      
 551 
     | 
    
         
            +
                }
         
     | 
| 
       494 
552 
     | 
    
         
             
                /**
         
     | 
| 
       495 
553 
     | 
    
         
             
                 * @remarks
         
     | 
| 
       496 
554 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -505,13 +563,13 @@ export class Page extends EventEmitter { 
     | 
|
| 
       505 
563 
     | 
    
         
             
                 * recommended as they are easier to debug and use with TypeScript):
         
     | 
| 
       506 
564 
     | 
    
         
             
                 *
         
     | 
| 
       507 
565 
     | 
    
         
             
                 * @example
         
     | 
| 
       508 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 566 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       509 
567 
     | 
    
         
             
                 * const aHandle = await page.evaluateHandle('document')
         
     | 
| 
       510 
568 
     | 
    
         
             
                 * ```
         
     | 
| 
       511 
569 
     | 
    
         
             
                 *
         
     | 
| 
       512 
570 
     | 
    
         
             
                 * @example
         
     | 
| 
       513 
571 
     | 
    
         
             
                 * {@link JSHandle} instances can be passed as arguments to the `pageFunction`:
         
     | 
| 
       514 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 572 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       515 
573 
     | 
    
         
             
                 * const aHandle = await page.evaluateHandle(() => document.body);
         
     | 
| 
       516 
574 
     | 
    
         
             
                 * const resultHandle = await page.evaluateHandle(body => body.innerHTML, aHandle);
         
     | 
| 
       517 
575 
     | 
    
         
             
                 * console.log(await resultHandle.jsonValue());
         
     | 
| 
         @@ -523,7 +581,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       523 
581 
     | 
    
         
             
                 * you instead get an {@link ElementHandle} back:
         
     | 
| 
       524 
582 
     | 
    
         
             
                 *
         
     | 
| 
       525 
583 
     | 
    
         
             
                 * @example
         
     | 
| 
       526 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 584 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       527 
585 
     | 
    
         
             
                 * const button = await page.evaluateHandle(() => document.querySelector('button'));
         
     | 
| 
       528 
586 
     | 
    
         
             
                 * // can call `click` because `button` is an `ElementHandle`
         
     | 
| 
       529 
587 
     | 
    
         
             
                 * await button.click();
         
     | 
| 
         @@ -533,7 +591,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       533 
591 
     | 
    
         
             
                 *  a `JSHandle`, but if you know it's going to return an
         
     | 
| 
       534 
592 
     | 
    
         
             
                 * `ElementHandle`, pass it as the generic argument:
         
     | 
| 
       535 
593 
     | 
    
         
             
                 *
         
     | 
| 
       536 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 594 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       537 
595 
     | 
    
         
             
                 * const button = await page.evaluateHandle<ElementHandle>(...);
         
     | 
| 
       538 
596 
     | 
    
         
             
                 * ```
         
     | 
| 
       539 
597 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -555,7 +613,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       555 
613 
     | 
    
         
             
                 *
         
     | 
| 
       556 
614 
     | 
    
         
             
                 * @example
         
     | 
| 
       557 
615 
     | 
    
         
             
                 *
         
     | 
| 
       558 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 616 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       559 
617 
     | 
    
         
             
                 * // Create a Map object
         
     | 
| 
       560 
618 
     | 
    
         
             
                 * await page.evaluate(() => window.map = new Map());
         
     | 
| 
       561 
619 
     | 
    
         
             
                 * // Get a handle to the Map object prototype
         
     | 
| 
         @@ -588,7 +646,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       588 
646 
     | 
    
         
             
                 *
         
     | 
| 
       589 
647 
     | 
    
         
             
                 * @example
         
     | 
| 
       590 
648 
     | 
    
         
             
                 *
         
     | 
| 
       591 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 649 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       592 
650 
     | 
    
         
             
                 * const searchValue = await page.$eval('#search', el => el.value);
         
     | 
| 
       593 
651 
     | 
    
         
             
                 * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
         
     | 
| 
       594 
652 
     | 
    
         
             
                 * const html = await page.$eval('.main-container', el => el.outerHTML);
         
     | 
| 
         @@ -601,7 +659,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       601 
659 
     | 
    
         
             
                 *
         
     | 
| 
       602 
660 
     | 
    
         
             
                 * @example
         
     | 
| 
       603 
661 
     | 
    
         
             
                 *
         
     | 
| 
       604 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 662 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       605 
663 
     | 
    
         
             
                 * // if you don't provide HTMLInputElement here, TS will error
         
     | 
| 
       606 
664 
     | 
    
         
             
                 * // as `value` is not on `Element`
         
     | 
| 
       607 
665 
     | 
    
         
             
                 * const searchValue = await page.$eval('#search', (el: HTMLInputElement) => el.value);
         
     | 
| 
         @@ -613,7 +671,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       613 
671 
     | 
    
         
             
                 *
         
     | 
| 
       614 
672 
     | 
    
         
             
                 * @example
         
     | 
| 
       615 
673 
     | 
    
         
             
                 *
         
     | 
| 
       616 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 674 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       617 
675 
     | 
    
         
             
                 * // The compiler can infer the return type in this case, but if it can't
         
     | 
| 
       618 
676 
     | 
    
         
             
                 * // or if you want to be more explicit, provide it as the generic type.
         
     | 
| 
       619 
677 
     | 
    
         
             
                 * const searchValue = await page.$eval<string>(
         
     | 
| 
         @@ -647,7 +705,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       647 
705 
     | 
    
         
             
                 *
         
     | 
| 
       648 
706 
     | 
    
         
             
                 * @example
         
     | 
| 
       649 
707 
     | 
    
         
             
                 *
         
     | 
| 
       650 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 708 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       651 
709 
     | 
    
         
             
                 * // get the amount of divs on the page
         
     | 
| 
       652 
710 
     | 
    
         
             
                 * const divCount = await page.$$eval('div', divs => divs.length);
         
     | 
| 
       653 
711 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -664,7 +722,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       664 
722 
     | 
    
         
             
                 *
         
     | 
| 
       665 
723 
     | 
    
         
             
                 * @example
         
     | 
| 
       666 
724 
     | 
    
         
             
                 *
         
     | 
| 
       667 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 725 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       668 
726 
     | 
    
         
             
                 * // if you don't provide HTMLInputElement here, TS will error
         
     | 
| 
       669 
727 
     | 
    
         
             
                 * // as `value` is not on `Element`
         
     | 
| 
       670 
728 
     | 
    
         
             
                 * await page.$$eval('input', (elements: HTMLInputElement[]) => {
         
     | 
| 
         @@ -678,7 +736,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       678 
736 
     | 
    
         
             
                 *
         
     | 
| 
       679 
737 
     | 
    
         
             
                 * @example
         
     | 
| 
       680 
738 
     | 
    
         
             
                 *
         
     | 
| 
       681 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 739 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       682 
740 
     | 
    
         
             
                 * // The compiler can infer the return type in this case, but if it can't
         
     | 
| 
       683 
741 
     | 
    
         
             
                 * // or if you want to be more explicit, provide it as the generic type.
         
     | 
| 
       684 
742 
     | 
    
         
             
                 * const allInputValues = await page.$$eval<string[]>(
         
     | 
| 
         @@ -701,16 +759,6 @@ export class Page extends EventEmitter { 
     | 
|
| 
       701 
759 
     | 
    
         
             
                async $$eval(selector, pageFunction, ...args) {
         
     | 
| 
       702 
760 
     | 
    
         
             
                    return this.mainFrame().$$eval(selector, pageFunction, ...args);
         
     | 
| 
       703 
761 
     | 
    
         
             
                }
         
     | 
| 
       704 
     | 
    
         
            -
                /**
         
     | 
| 
       705 
     | 
    
         
            -
                 * The method runs `document.querySelectorAll` within the page. If no elements
         
     | 
| 
       706 
     | 
    
         
            -
                 * match the selector, the return value resolves to `[]`.
         
     | 
| 
       707 
     | 
    
         
            -
                 * @remarks
         
     | 
| 
       708 
     | 
    
         
            -
                 * Shortcut for {@link Frame.$$ | Page.mainFrame().$$(selector) }.
         
     | 
| 
       709 
     | 
    
         
            -
                 * @param selector - A `selector` to query page for
         
     | 
| 
       710 
     | 
    
         
            -
                 */
         
     | 
| 
       711 
     | 
    
         
            -
                async $$(selector) {
         
     | 
| 
       712 
     | 
    
         
            -
                    return this.mainFrame().$$(selector);
         
     | 
| 
       713 
     | 
    
         
            -
                }
         
     | 
| 
       714 
762 
     | 
    
         
             
                /**
         
     | 
| 
       715 
763 
     | 
    
         
             
                 * The method evaluates the XPath expression relative to the page document as
         
     | 
| 
       716 
764 
     | 
    
         
             
                 * its context node. If there are no such elements, the method resolves to an
         
     | 
| 
         @@ -727,13 +775,14 @@ export class Page extends EventEmitter { 
     | 
|
| 
       727 
775 
     | 
    
         
             
                 * URL. If URLs are specified, only cookies for those URLs are returned.
         
     | 
| 
       728 
776 
     | 
    
         
             
                 */
         
     | 
| 
       729 
777 
     | 
    
         
             
                async cookies(...urls) {
         
     | 
| 
       730 
     | 
    
         
            -
                    const originalCookies = (await this. 
     | 
| 
      
 778 
     | 
    
         
            +
                    const originalCookies = (await __classPrivateFieldGet(this, _Page_client, "f").send('Network.getCookies', {
         
     | 
| 
       731 
779 
     | 
    
         
             
                        urls: urls.length ? urls : [this.url()],
         
     | 
| 
       732 
780 
     | 
    
         
             
                    })).cookies;
         
     | 
| 
       733 
781 
     | 
    
         
             
                    const unsupportedCookieAttributes = ['priority'];
         
     | 
| 
       734 
782 
     | 
    
         
             
                    const filterUnsupportedAttributes = (cookie) => {
         
     | 
| 
       735 
     | 
    
         
            -
                        for (const attr of unsupportedCookieAttributes)
         
     | 
| 
      
 783 
     | 
    
         
            +
                        for (const attr of unsupportedCookieAttributes) {
         
     | 
| 
       736 
784 
     | 
    
         
             
                            delete cookie[attr];
         
     | 
| 
      
 785 
     | 
    
         
            +
                        }
         
     | 
| 
       737 
786 
     | 
    
         
             
                        return cookie;
         
     | 
| 
       738 
787 
     | 
    
         
             
                    };
         
     | 
| 
       739 
788 
     | 
    
         
             
                    return originalCookies.map(filterUnsupportedAttributes);
         
     | 
| 
         @@ -742,31 +791,34 @@ export class Page extends EventEmitter { 
     | 
|
| 
       742 
791 
     | 
    
         
             
                    const pageURL = this.url();
         
     | 
| 
       743 
792 
     | 
    
         
             
                    for (const cookie of cookies) {
         
     | 
| 
       744 
793 
     | 
    
         
             
                        const item = Object.assign({}, cookie);
         
     | 
| 
       745 
     | 
    
         
            -
                        if (!cookie.url && pageURL.startsWith('http'))
         
     | 
| 
      
 794 
     | 
    
         
            +
                        if (!cookie.url && pageURL.startsWith('http')) {
         
     | 
| 
       746 
795 
     | 
    
         
             
                            item.url = pageURL;
         
     | 
| 
       747 
     | 
    
         
            -
                         
     | 
| 
      
 796 
     | 
    
         
            +
                        }
         
     | 
| 
      
 797 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Network.deleteCookies', item);
         
     | 
| 
       748 
798 
     | 
    
         
             
                    }
         
     | 
| 
       749 
799 
     | 
    
         
             
                }
         
     | 
| 
       750 
800 
     | 
    
         
             
                /**
         
     | 
| 
       751 
801 
     | 
    
         
             
                 * @example
         
     | 
| 
       752 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 802 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       753 
803 
     | 
    
         
             
                 * await page.setCookie(cookieObject1, cookieObject2);
         
     | 
| 
       754 
804 
     | 
    
         
             
                 * ```
         
     | 
| 
       755 
805 
     | 
    
         
             
                 */
         
     | 
| 
       756 
806 
     | 
    
         
             
                async setCookie(...cookies) {
         
     | 
| 
       757 
807 
     | 
    
         
             
                    const pageURL = this.url();
         
     | 
| 
       758 
808 
     | 
    
         
             
                    const startsWithHTTP = pageURL.startsWith('http');
         
     | 
| 
       759 
     | 
    
         
            -
                    const items = cookies.map( 
     | 
| 
      
 809 
     | 
    
         
            +
                    const items = cookies.map(cookie => {
         
     | 
| 
       760 
810 
     | 
    
         
             
                        const item = Object.assign({}, cookie);
         
     | 
| 
       761 
     | 
    
         
            -
                        if (!item.url && startsWithHTTP)
         
     | 
| 
      
 811 
     | 
    
         
            +
                        if (!item.url && startsWithHTTP) {
         
     | 
| 
       762 
812 
     | 
    
         
             
                            item.url = pageURL;
         
     | 
| 
      
 813 
     | 
    
         
            +
                        }
         
     | 
| 
       763 
814 
     | 
    
         
             
                        assert(item.url !== 'about:blank', `Blank page can not have cookie "${item.name}"`);
         
     | 
| 
       764 
815 
     | 
    
         
             
                        assert(!String.prototype.startsWith.call(item.url || '', 'data:'), `Data URL page can not have cookie "${item.name}"`);
         
     | 
| 
       765 
816 
     | 
    
         
             
                        return item;
         
     | 
| 
       766 
817 
     | 
    
         
             
                    });
         
     | 
| 
       767 
818 
     | 
    
         
             
                    await this.deleteCookie(...items);
         
     | 
| 
       768 
     | 
    
         
            -
                    if (items.length)
         
     | 
| 
       769 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 819 
     | 
    
         
            +
                    if (items.length) {
         
     | 
| 
      
 820 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Network.setCookies', { cookies: items });
         
     | 
| 
      
 821 
     | 
    
         
            +
                    }
         
     | 
| 
       770 
822 
     | 
    
         
             
                }
         
     | 
| 
       771 
823 
     | 
    
         
             
                /**
         
     | 
| 
       772 
824 
     | 
    
         
             
                 * Adds a `<script>` tag into the page with the desired URL or content.
         
     | 
| 
         @@ -796,11 +848,11 @@ export class Page extends EventEmitter { 
     | 
|
| 
       796 
848 
     | 
    
         
             
                 *
         
     | 
| 
       797 
849 
     | 
    
         
             
                 * NOTE: Functions installed via `page.exposeFunction` survive navigations.
         
     | 
| 
       798 
850 
     | 
    
         
             
                 * @param name - Name of the function on the window object
         
     | 
| 
       799 
     | 
    
         
            -
                 * @param  
     | 
| 
      
 851 
     | 
    
         
            +
                 * @param pptrFunction -  Callback function which will be called in
         
     | 
| 
       800 
852 
     | 
    
         
             
                 * Puppeteer's context.
         
     | 
| 
       801 
853 
     | 
    
         
             
                 * @example
         
     | 
| 
       802 
854 
     | 
    
         
             
                 * An example of adding an `md5` function into the page:
         
     | 
| 
       803 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 855 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       804 
856 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       805 
857 
     | 
    
         
             
                 * const crypto = require('crypto');
         
     | 
| 
       806 
858 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -821,7 +873,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       821 
873 
     | 
    
         
             
                 * })();
         
     | 
| 
       822 
874 
     | 
    
         
             
                 * ```
         
     | 
| 
       823 
875 
     | 
    
         
             
                 * An example of adding a `window.readfile` function into the page:
         
     | 
| 
       824 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 876 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       825 
877 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       826 
878 
     | 
    
         
             
                 * const fs = require('fs');
         
     | 
| 
       827 
879 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -846,33 +898,35 @@ export class Page extends EventEmitter { 
     | 
|
| 
       846 
898 
     | 
    
         
             
                 * })();
         
     | 
| 
       847 
899 
     | 
    
         
             
                 * ```
         
     | 
| 
       848 
900 
     | 
    
         
             
                 */
         
     | 
| 
       849 
     | 
    
         
            -
                async exposeFunction(name,  
     | 
| 
       850 
     | 
    
         
            -
                    if (this. 
     | 
| 
      
 901 
     | 
    
         
            +
                async exposeFunction(name, pptrFunction) {
         
     | 
| 
      
 902 
     | 
    
         
            +
                    if (__classPrivateFieldGet(this, _Page_pageBindings, "f").has(name)) {
         
     | 
| 
       851 
903 
     | 
    
         
             
                        throw new Error(`Failed to add page binding with name ${name}: window['${name}'] already exists!`);
         
     | 
| 
       852 
     | 
    
         
            -
                    let exposedFunction;
         
     | 
| 
       853 
     | 
    
         
            -
                    if (typeof puppeteerFunction === 'function') {
         
     | 
| 
       854 
     | 
    
         
            -
                        exposedFunction = puppeteerFunction;
         
     | 
| 
       855 
     | 
    
         
            -
                    }
         
     | 
| 
       856 
     | 
    
         
            -
                    else if (typeof puppeteerFunction.default === 'function') {
         
     | 
| 
       857 
     | 
    
         
            -
                        exposedFunction = puppeteerFunction.default;
         
     | 
| 
       858 
904 
     | 
    
         
             
                    }
         
     | 
| 
       859 
     | 
    
         
            -
                     
     | 
| 
       860 
     | 
    
         
            -
             
     | 
| 
      
 905 
     | 
    
         
            +
                    let exposedFunction;
         
     | 
| 
      
 906 
     | 
    
         
            +
                    switch (typeof pptrFunction) {
         
     | 
| 
      
 907 
     | 
    
         
            +
                        case 'function':
         
     | 
| 
      
 908 
     | 
    
         
            +
                            exposedFunction = pptrFunction;
         
     | 
| 
      
 909 
     | 
    
         
            +
                            break;
         
     | 
| 
      
 910 
     | 
    
         
            +
                        default:
         
     | 
| 
      
 911 
     | 
    
         
            +
                            exposedFunction = pptrFunction.default;
         
     | 
| 
      
 912 
     | 
    
         
            +
                            break;
         
     | 
| 
       861 
913 
     | 
    
         
             
                    }
         
     | 
| 
       862 
     | 
    
         
            -
                    this. 
     | 
| 
       863 
     | 
    
         
            -
                    const expression =  
     | 
| 
       864 
     | 
    
         
            -
                    await this. 
     | 
| 
       865 
     | 
    
         
            -
                    await this. 
     | 
| 
      
 914 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_pageBindings, "f").set(name, exposedFunction);
         
     | 
| 
      
 915 
     | 
    
         
            +
                    const expression = pageBindingInitString('exposedFun', name);
         
     | 
| 
      
 916 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Runtime.addBinding', { name: name });
         
     | 
| 
      
 917 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Page.addScriptToEvaluateOnNewDocument', {
         
     | 
| 
       866 
918 
     | 
    
         
             
                        source: expression,
         
     | 
| 
       867 
919 
     | 
    
         
             
                    });
         
     | 
| 
       868 
     | 
    
         
            -
                    await Promise.all(this.frames().map( 
     | 
| 
      
 920 
     | 
    
         
            +
                    await Promise.all(this.frames().map(frame => {
         
     | 
| 
      
 921 
     | 
    
         
            +
                        return frame.evaluate(expression).catch(debugError);
         
     | 
| 
      
 922 
     | 
    
         
            +
                    }));
         
     | 
| 
       869 
923 
     | 
    
         
             
                }
         
     | 
| 
       870 
924 
     | 
    
         
             
                /**
         
     | 
| 
       871 
925 
     | 
    
         
             
                 * Provide credentials for `HTTP authentication`.
         
     | 
| 
       872 
926 
     | 
    
         
             
                 * @remarks To disable authentication, pass `null`.
         
     | 
| 
       873 
927 
     | 
    
         
             
                 */
         
     | 
| 
       874 
928 
     | 
    
         
             
                async authenticate(credentials) {
         
     | 
| 
       875 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 929 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f").networkManager().authenticate(credentials);
         
     | 
| 
       876 
930 
     | 
    
         
             
                }
         
     | 
| 
       877 
931 
     | 
    
         
             
                /**
         
     | 
| 
       878 
932 
     | 
    
         
             
                 * The extra HTTP headers will be sent with every request the page initiates.
         
     | 
| 
         @@ -885,7 +939,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       885 
939 
     | 
    
         
             
                 * @returns
         
     | 
| 
       886 
940 
     | 
    
         
             
                 */
         
     | 
| 
       887 
941 
     | 
    
         
             
                async setExtraHTTPHeaders(headers) {
         
     | 
| 
       888 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 942 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f").networkManager().setExtraHTTPHeaders(headers);
         
     | 
| 
       889 
943 
     | 
    
         
             
                }
         
     | 
| 
       890 
944 
     | 
    
         
             
                /**
         
     | 
| 
       891 
945 
     | 
    
         
             
                 * @param userAgent - Specific user agent to use in this page
         
     | 
| 
         @@ -894,7 +948,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       894 
948 
     | 
    
         
             
                 * @returns Promise which resolves when the user agent is set.
         
     | 
| 
       895 
949 
     | 
    
         
             
                 */
         
     | 
| 
       896 
950 
     | 
    
         
             
                async setUserAgent(userAgent, userAgentMetadata) {
         
     | 
| 
       897 
     | 
    
         
            -
                    return this 
     | 
| 
      
 951 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f")
         
     | 
| 
       898 
952 
     | 
    
         
             
                        .networkManager()
         
     | 
| 
       899 
953 
     | 
    
         
             
                        .setUserAgent(userAgent, userAgentMetadata);
         
     | 
| 
       900 
954 
     | 
    
         
             
                }
         
     | 
| 
         @@ -933,135 +987,8 @@ export class Page extends EventEmitter { 
     | 
|
| 
       933 
987 
     | 
    
         
             
                 * in seconds since an arbitrary point in the past.
         
     | 
| 
       934 
988 
     | 
    
         
             
                 */
         
     | 
| 
       935 
989 
     | 
    
         
             
                async metrics() {
         
     | 
| 
       936 
     | 
    
         
            -
                    const response = await this. 
     | 
| 
       937 
     | 
    
         
            -
                    return this. 
     | 
| 
       938 
     | 
    
         
            -
                }
         
     | 
| 
       939 
     | 
    
         
            -
                _emitMetrics(event) {
         
     | 
| 
       940 
     | 
    
         
            -
                    this.emit("metrics" /* Metrics */, {
         
     | 
| 
       941 
     | 
    
         
            -
                        title: event.title,
         
     | 
| 
       942 
     | 
    
         
            -
                        metrics: this._buildMetricsObject(event.metrics),
         
     | 
| 
       943 
     | 
    
         
            -
                    });
         
     | 
| 
       944 
     | 
    
         
            -
                }
         
     | 
| 
       945 
     | 
    
         
            -
                _buildMetricsObject(metrics) {
         
     | 
| 
       946 
     | 
    
         
            -
                    const result = {};
         
     | 
| 
       947 
     | 
    
         
            -
                    for (const metric of metrics || []) {
         
     | 
| 
       948 
     | 
    
         
            -
                        if (supportedMetrics.has(metric.name))
         
     | 
| 
       949 
     | 
    
         
            -
                            result[metric.name] = metric.value;
         
     | 
| 
       950 
     | 
    
         
            -
                    }
         
     | 
| 
       951 
     | 
    
         
            -
                    return result;
         
     | 
| 
       952 
     | 
    
         
            -
                }
         
     | 
| 
       953 
     | 
    
         
            -
                _handleException(exceptionDetails) {
         
     | 
| 
       954 
     | 
    
         
            -
                    const message = helper.getExceptionMessage(exceptionDetails);
         
     | 
| 
       955 
     | 
    
         
            -
                    const err = new Error(message);
         
     | 
| 
       956 
     | 
    
         
            -
                    err.stack = ''; // Don't report clientside error with a node stack attached
         
     | 
| 
       957 
     | 
    
         
            -
                    this.emit("pageerror" /* PageError */, err);
         
     | 
| 
       958 
     | 
    
         
            -
                }
         
     | 
| 
       959 
     | 
    
         
            -
                async _onConsoleAPI(event) {
         
     | 
| 
       960 
     | 
    
         
            -
                    if (event.executionContextId === 0) {
         
     | 
| 
       961 
     | 
    
         
            -
                        // DevTools protocol stores the last 1000 console messages. These
         
     | 
| 
       962 
     | 
    
         
            -
                        // messages are always reported even for removed execution contexts. In
         
     | 
| 
       963 
     | 
    
         
            -
                        // this case, they are marked with executionContextId = 0 and are
         
     | 
| 
       964 
     | 
    
         
            -
                        // reported upon enabling Runtime agent.
         
     | 
| 
       965 
     | 
    
         
            -
                        //
         
     | 
| 
       966 
     | 
    
         
            -
                        // Ignore these messages since:
         
     | 
| 
       967 
     | 
    
         
            -
                        // - there's no execution context we can use to operate with message
         
     | 
| 
       968 
     | 
    
         
            -
                        //   arguments
         
     | 
| 
       969 
     | 
    
         
            -
                        // - these messages are reported before Puppeteer clients can subscribe
         
     | 
| 
       970 
     | 
    
         
            -
                        //   to the 'console'
         
     | 
| 
       971 
     | 
    
         
            -
                        //   page event.
         
     | 
| 
       972 
     | 
    
         
            -
                        //
         
     | 
| 
       973 
     | 
    
         
            -
                        // @see https://github.com/puppeteer/puppeteer/issues/3865
         
     | 
| 
       974 
     | 
    
         
            -
                        return;
         
     | 
| 
       975 
     | 
    
         
            -
                    }
         
     | 
| 
       976 
     | 
    
         
            -
                    const context = this._frameManager.executionContextById(event.executionContextId, this._client);
         
     | 
| 
       977 
     | 
    
         
            -
                    const values = event.args.map((arg) => createJSHandle(context, arg));
         
     | 
| 
       978 
     | 
    
         
            -
                    this._addConsoleMessage(event.type, values, event.stackTrace);
         
     | 
| 
       979 
     | 
    
         
            -
                }
         
     | 
| 
       980 
     | 
    
         
            -
                async _onBindingCalled(event) {
         
     | 
| 
       981 
     | 
    
         
            -
                    let payload;
         
     | 
| 
       982 
     | 
    
         
            -
                    try {
         
     | 
| 
       983 
     | 
    
         
            -
                        payload = JSON.parse(event.payload);
         
     | 
| 
       984 
     | 
    
         
            -
                    }
         
     | 
| 
       985 
     | 
    
         
            -
                    catch {
         
     | 
| 
       986 
     | 
    
         
            -
                        // The binding was either called by something in the page or it was
         
     | 
| 
       987 
     | 
    
         
            -
                        // called before our wrapper was initialized.
         
     | 
| 
       988 
     | 
    
         
            -
                        return;
         
     | 
| 
       989 
     | 
    
         
            -
                    }
         
     | 
| 
       990 
     | 
    
         
            -
                    const { type, name, seq, args } = payload;
         
     | 
| 
       991 
     | 
    
         
            -
                    if (type !== 'exposedFun' || !this._pageBindings.has(name))
         
     | 
| 
       992 
     | 
    
         
            -
                        return;
         
     | 
| 
       993 
     | 
    
         
            -
                    let expression = null;
         
     | 
| 
       994 
     | 
    
         
            -
                    try {
         
     | 
| 
       995 
     | 
    
         
            -
                        const result = await this._pageBindings.get(name)(...args);
         
     | 
| 
       996 
     | 
    
         
            -
                        expression = helper.pageBindingDeliverResultString(name, seq, result);
         
     | 
| 
       997 
     | 
    
         
            -
                    }
         
     | 
| 
       998 
     | 
    
         
            -
                    catch (error) {
         
     | 
| 
       999 
     | 
    
         
            -
                        if (error instanceof Error)
         
     | 
| 
       1000 
     | 
    
         
            -
                            expression = helper.pageBindingDeliverErrorString(name, seq, error.message, error.stack);
         
     | 
| 
       1001 
     | 
    
         
            -
                        else
         
     | 
| 
       1002 
     | 
    
         
            -
                            expression = helper.pageBindingDeliverErrorValueString(name, seq, error);
         
     | 
| 
       1003 
     | 
    
         
            -
                    }
         
     | 
| 
       1004 
     | 
    
         
            -
                    this._client
         
     | 
| 
       1005 
     | 
    
         
            -
                        .send('Runtime.evaluate', {
         
     | 
| 
       1006 
     | 
    
         
            -
                        expression,
         
     | 
| 
       1007 
     | 
    
         
            -
                        contextId: event.executionContextId,
         
     | 
| 
       1008 
     | 
    
         
            -
                    })
         
     | 
| 
       1009 
     | 
    
         
            -
                        .catch(debugError);
         
     | 
| 
       1010 
     | 
    
         
            -
                }
         
     | 
| 
       1011 
     | 
    
         
            -
                _addConsoleMessage(type, args, stackTrace) {
         
     | 
| 
       1012 
     | 
    
         
            -
                    if (!this.listenerCount("console" /* Console */)) {
         
     | 
| 
       1013 
     | 
    
         
            -
                        args.forEach((arg) => arg.dispose());
         
     | 
| 
       1014 
     | 
    
         
            -
                        return;
         
     | 
| 
       1015 
     | 
    
         
            -
                    }
         
     | 
| 
       1016 
     | 
    
         
            -
                    const textTokens = [];
         
     | 
| 
       1017 
     | 
    
         
            -
                    for (const arg of args) {
         
     | 
| 
       1018 
     | 
    
         
            -
                        const remoteObject = arg._remoteObject;
         
     | 
| 
       1019 
     | 
    
         
            -
                        if (remoteObject.objectId)
         
     | 
| 
       1020 
     | 
    
         
            -
                            textTokens.push(arg.toString());
         
     | 
| 
       1021 
     | 
    
         
            -
                        else
         
     | 
| 
       1022 
     | 
    
         
            -
                            textTokens.push(helper.valueFromRemoteObject(remoteObject));
         
     | 
| 
       1023 
     | 
    
         
            -
                    }
         
     | 
| 
       1024 
     | 
    
         
            -
                    const stackTraceLocations = [];
         
     | 
| 
       1025 
     | 
    
         
            -
                    if (stackTrace) {
         
     | 
| 
       1026 
     | 
    
         
            -
                        for (const callFrame of stackTrace.callFrames) {
         
     | 
| 
       1027 
     | 
    
         
            -
                            stackTraceLocations.push({
         
     | 
| 
       1028 
     | 
    
         
            -
                                url: callFrame.url,
         
     | 
| 
       1029 
     | 
    
         
            -
                                lineNumber: callFrame.lineNumber,
         
     | 
| 
       1030 
     | 
    
         
            -
                                columnNumber: callFrame.columnNumber,
         
     | 
| 
       1031 
     | 
    
         
            -
                            });
         
     | 
| 
       1032 
     | 
    
         
            -
                        }
         
     | 
| 
       1033 
     | 
    
         
            -
                    }
         
     | 
| 
       1034 
     | 
    
         
            -
                    const message = new ConsoleMessage(type, textTokens.join(' '), args, stackTraceLocations);
         
     | 
| 
       1035 
     | 
    
         
            -
                    this.emit("console" /* Console */, message);
         
     | 
| 
       1036 
     | 
    
         
            -
                }
         
     | 
| 
       1037 
     | 
    
         
            -
                _onDialog(event) {
         
     | 
| 
       1038 
     | 
    
         
            -
                    let dialogType = null;
         
     | 
| 
       1039 
     | 
    
         
            -
                    const validDialogTypes = new Set([
         
     | 
| 
       1040 
     | 
    
         
            -
                        'alert',
         
     | 
| 
       1041 
     | 
    
         
            -
                        'confirm',
         
     | 
| 
       1042 
     | 
    
         
            -
                        'prompt',
         
     | 
| 
       1043 
     | 
    
         
            -
                        'beforeunload',
         
     | 
| 
       1044 
     | 
    
         
            -
                    ]);
         
     | 
| 
       1045 
     | 
    
         
            -
                    if (validDialogTypes.has(event.type)) {
         
     | 
| 
       1046 
     | 
    
         
            -
                        dialogType = event.type;
         
     | 
| 
       1047 
     | 
    
         
            -
                    }
         
     | 
| 
       1048 
     | 
    
         
            -
                    assert(dialogType, 'Unknown javascript dialog type: ' + event.type);
         
     | 
| 
       1049 
     | 
    
         
            -
                    const dialog = new Dialog(this._client, dialogType, event.message, event.defaultPrompt);
         
     | 
| 
       1050 
     | 
    
         
            -
                    this.emit("dialog" /* Dialog */, dialog);
         
     | 
| 
       1051 
     | 
    
         
            -
                }
         
     | 
| 
       1052 
     | 
    
         
            -
                /**
         
     | 
| 
       1053 
     | 
    
         
            -
                 * Resets default white background
         
     | 
| 
       1054 
     | 
    
         
            -
                 */
         
     | 
| 
       1055 
     | 
    
         
            -
                async _resetDefaultBackgroundColor() {
         
     | 
| 
       1056 
     | 
    
         
            -
                    await this._client.send('Emulation.setDefaultBackgroundColorOverride');
         
     | 
| 
       1057 
     | 
    
         
            -
                }
         
     | 
| 
       1058 
     | 
    
         
            -
                /**
         
     | 
| 
       1059 
     | 
    
         
            -
                 * Hides default white background
         
     | 
| 
       1060 
     | 
    
         
            -
                 */
         
     | 
| 
       1061 
     | 
    
         
            -
                async _setTransparentBackgroundColor() {
         
     | 
| 
       1062 
     | 
    
         
            -
                    await this._client.send('Emulation.setDefaultBackgroundColorOverride', {
         
     | 
| 
       1063 
     | 
    
         
            -
                        color: { r: 0, g: 0, b: 0, a: 0 },
         
     | 
| 
       1064 
     | 
    
         
            -
                    });
         
     | 
| 
      
 990 
     | 
    
         
            +
                    const response = await __classPrivateFieldGet(this, _Page_client, "f").send('Performance.getMetrics');
         
     | 
| 
      
 991 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_instances, "m", _Page_buildMetricsObject).call(this, response.metrics);
         
     | 
| 
       1065 
992 
     | 
    
         
             
                }
         
     | 
| 
       1066 
993 
     | 
    
         
             
                /**
         
     | 
| 
       1067 
994 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -1073,7 +1000,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1073 
1000 
     | 
    
         
             
                    return this.mainFrame().url();
         
     | 
| 
       1074 
1001 
     | 
    
         
             
                }
         
     | 
| 
       1075 
1002 
     | 
    
         
             
                async content() {
         
     | 
| 
       1076 
     | 
    
         
            -
                    return await this. 
     | 
| 
      
 1003 
     | 
    
         
            +
                    return await __classPrivateFieldGet(this, _Page_frameManager, "f").mainFrame().content();
         
     | 
| 
       1077 
1004 
     | 
    
         
             
                }
         
     | 
| 
       1078 
1005 
     | 
    
         
             
                /**
         
     | 
| 
       1079 
1006 
     | 
    
         
             
                 * @param html - HTML markup to assign to the page.
         
     | 
| 
         @@ -1083,26 +1010,24 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1083 
1010 
     | 
    
         
             
                 *
         
     | 
| 
       1084 
1011 
     | 
    
         
             
                 * - `timeout` : Maximum time in milliseconds for resources to load, defaults
         
     | 
| 
       1085 
1012 
     | 
    
         
             
                 *   to 30 seconds, pass `0` to disable timeout. The default value can be
         
     | 
| 
       1086 
     | 
    
         
            -
                 *   changed by using the
         
     | 
| 
       1087 
     | 
    
         
            -
                 *   {@link Page. 
     | 
| 
       1088 
     | 
    
         
            -
                 * 
     | 
| 
       1089 
     | 
    
         
            -
                 * 
     | 
| 
       1090 
     | 
    
         
            -
                 * 
     | 
| 
       1091 
     | 
    
         
            -
                 *
         
     | 
| 
       1092 
     | 
    
         
            -
                 * 
     | 
| 
       1093 
     | 
    
         
            -
                 * 
     | 
| 
       1094 
     | 
    
         
            -
                 *     
     | 
| 
       1095 
     | 
    
         
            -
                 *  - `load` : consider setting content to be finished when the `load` event is
         
     | 
| 
       1096 
     | 
    
         
            -
                 *    fired.<br/>
         
     | 
| 
      
 1013 
     | 
    
         
            +
                 *   changed by using the {@link Page.setDefaultNavigationTimeout} or
         
     | 
| 
      
 1014 
     | 
    
         
            +
                 *   {@link Page.setDefaultTimeout} methods.
         
     | 
| 
      
 1015 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1016 
     | 
    
         
            +
                 * - `waitUntil`: When to consider setting markup succeeded, defaults to
         
     | 
| 
      
 1017 
     | 
    
         
            +
                 *    `load`. Given an array of event strings, setting content is considered
         
     | 
| 
      
 1018 
     | 
    
         
            +
                 *    to be successful after all events have been fired. Events can be
         
     | 
| 
      
 1019 
     | 
    
         
            +
                 *    either:<br/>
         
     | 
| 
      
 1020 
     | 
    
         
            +
                 *  - `load` : consider setting content to be finished when the `load` event
         
     | 
| 
      
 1021 
     | 
    
         
            +
                 *    is fired.<br/>
         
     | 
| 
       1097 
1022 
     | 
    
         
             
                 *  - `domcontentloaded` : consider setting content to be finished when the
         
     | 
| 
       1098 
     | 
    
         
            -
                 * 
     | 
| 
       1099 
     | 
    
         
            -
                 *  - `networkidle0` : consider setting content to be finished when there are 
     | 
| 
       1100 
     | 
    
         
            -
                 * 
     | 
| 
       1101 
     | 
    
         
            -
                 *  - `networkidle2` : consider setting content to be finished when there are 
     | 
| 
       1102 
     | 
    
         
            -
                 * 
     | 
| 
      
 1023 
     | 
    
         
            +
                 *    `DOMContentLoaded` event is fired.<br/>
         
     | 
| 
      
 1024 
     | 
    
         
            +
                 *  - `networkidle0` : consider setting content to be finished when there are
         
     | 
| 
      
 1025 
     | 
    
         
            +
                 *    no more than 0 network connections for at least `500` ms.<br/>
         
     | 
| 
      
 1026 
     | 
    
         
            +
                 *  - `networkidle2` : consider setting content to be finished when there are
         
     | 
| 
      
 1027 
     | 
    
         
            +
                 *    no more than 2 network connections for at least `500` ms.
         
     | 
| 
       1103 
1028 
     | 
    
         
             
                 */
         
     | 
| 
       1104 
1029 
     | 
    
         
             
                async setContent(html, options = {}) {
         
     | 
| 
       1105 
     | 
    
         
            -
                    await this. 
     | 
| 
      
 1030 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_frameManager, "f").mainFrame().setContent(html, options);
         
     | 
| 
       1106 
1031 
     | 
    
         
             
                }
         
     | 
| 
       1107 
1032 
     | 
    
         
             
                /**
         
     | 
| 
       1108 
1033 
     | 
    
         
             
                 * @param url - URL to navigate page to. The URL should include scheme, e.g.
         
     | 
| 
         @@ -1116,15 +1041,12 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1116 
1041 
     | 
    
         
             
                 *
         
     | 
| 
       1117 
1042 
     | 
    
         
             
                 * - `timeout` : Maximum navigation time in milliseconds, defaults to 30
         
     | 
| 
       1118 
1043 
     | 
    
         
             
                 *   seconds, pass 0 to disable timeout. The default value can be changed by
         
     | 
| 
       1119 
     | 
    
         
            -
                 *   using the
         
     | 
| 
       1120 
     | 
    
         
            -
                 *   {@link Page. 
     | 
| 
       1121 
     | 
    
         
            -
                 *   page.setDefaultNavigationTimeout(timeout)}
         
     | 
| 
       1122 
     | 
    
         
            -
                 *   or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
         
     | 
| 
       1123 
     | 
    
         
            -
                 *   methods.
         
     | 
| 
      
 1044 
     | 
    
         
            +
                 *   using the {@link Page.setDefaultNavigationTimeout} or
         
     | 
| 
      
 1045 
     | 
    
         
            +
                 *   {@link Page.setDefaultTimeout} methods.
         
     | 
| 
       1124 
1046 
     | 
    
         
             
                 *
         
     | 
| 
       1125 
1047 
     | 
    
         
             
                 * - `waitUntil`:When to consider navigation succeeded, defaults to `load`.
         
     | 
| 
       1126 
     | 
    
         
            -
                 *    Given an array of event strings, navigation is considered to be 
     | 
| 
       1127 
     | 
    
         
            -
                 *    after all events have been fired. Events can be either:<br/>
         
     | 
| 
      
 1048 
     | 
    
         
            +
                 *    Given an array of event strings, navigation is considered to be
         
     | 
| 
      
 1049 
     | 
    
         
            +
                 *    successful after all events have been fired. Events can be either:<br/>
         
     | 
| 
       1128 
1050 
     | 
    
         
             
                 *  - `load` : consider navigation to be finished when the load event is
         
     | 
| 
       1129 
1051 
     | 
    
         
             
                 *    fired.<br/>
         
     | 
| 
       1130 
1052 
     | 
    
         
             
                 *  - `domcontentloaded` : consider navigation to be finished when the
         
     | 
| 
         @@ -1155,13 +1077,13 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1155 
1077 
     | 
    
         
             
                 * to the same URL with a different hash, which would succeed and return null.
         
     | 
| 
       1156 
1078 
     | 
    
         
             
                 *
         
     | 
| 
       1157 
1079 
     | 
    
         
             
                 * NOTE: Headless mode doesn't support navigation to a PDF document. See the
         
     | 
| 
       1158 
     | 
    
         
            -
                 * {@link https://bugs.chromium.org/p/chromium/issues/detail?id=761295
         
     | 
| 
       1159 
     | 
    
         
            -
                 *  
     | 
| 
      
 1080 
     | 
    
         
            +
                 * {@link https://bugs.chromium.org/p/chromium/issues/detail?id=761295 |
         
     | 
| 
      
 1081 
     | 
    
         
            +
                 * upstream issue}.
         
     | 
| 
       1160 
1082 
     | 
    
         
             
                 *
         
     | 
| 
       1161 
1083 
     | 
    
         
             
                 * Shortcut for {@link Frame.goto | page.mainFrame().goto(url, options)}.
         
     | 
| 
       1162 
1084 
     | 
    
         
             
                 */
         
     | 
| 
       1163 
1085 
     | 
    
         
             
                async goto(url, options = {}) {
         
     | 
| 
       1164 
     | 
    
         
            -
                    return await this. 
     | 
| 
      
 1086 
     | 
    
         
            +
                    return await __classPrivateFieldGet(this, _Page_frameManager, "f").mainFrame().goto(url, options);
         
     | 
| 
       1165 
1087 
     | 
    
         
             
                }
         
     | 
| 
       1166 
1088 
     | 
    
         
             
                /**
         
     | 
| 
       1167 
1089 
     | 
    
         
             
                 * @param options - Navigation parameters which might have the following
         
     | 
| 
         @@ -1174,68 +1096,62 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1174 
1096 
     | 
    
         
             
                 *
         
     | 
| 
       1175 
1097 
     | 
    
         
             
                 * - `timeout` : Maximum navigation time in milliseconds, defaults to 30
         
     | 
| 
       1176 
1098 
     | 
    
         
             
                 *   seconds, pass 0 to disable timeout. The default value can be changed by
         
     | 
| 
       1177 
     | 
    
         
            -
                 *   using the
         
     | 
| 
       1178 
     | 
    
         
            -
                 *   {@link Page. 
     | 
| 
       1179 
     | 
    
         
            -
                 *   page.setDefaultNavigationTimeout(timeout)}
         
     | 
| 
       1180 
     | 
    
         
            -
                 *   or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
         
     | 
| 
       1181 
     | 
    
         
            -
                 *   methods.
         
     | 
| 
      
 1099 
     | 
    
         
            +
                 *   using the {@link Page.setDefaultNavigationTimeout} or
         
     | 
| 
      
 1100 
     | 
    
         
            +
                 *   {@link Page.setDefaultTimeout} methods.
         
     | 
| 
       1182 
1101 
     | 
    
         
             
                 *
         
     | 
| 
       1183 
1102 
     | 
    
         
             
                 * - `waitUntil`: When to consider navigation succeeded, defaults to `load`.
         
     | 
| 
       1184 
1103 
     | 
    
         
             
                 *    Given an array of event strings, navigation is considered to be
         
     | 
| 
       1185 
1104 
     | 
    
         
             
                 *    successful after all events have been fired. Events can be either:<br/>
         
     | 
| 
       1186 
     | 
    
         
            -
                 *  - `load` : consider navigation to be finished when the load event is 
     | 
| 
      
 1105 
     | 
    
         
            +
                 *  - `load` : consider navigation to be finished when the load event is
         
     | 
| 
      
 1106 
     | 
    
         
            +
                 *    fired.<br/>
         
     | 
| 
       1187 
1107 
     | 
    
         
             
                 *  - `domcontentloaded` : consider navigation to be finished when the
         
     | 
| 
       1188 
     | 
    
         
            -
                 * 
     | 
| 
      
 1108 
     | 
    
         
            +
                 *    DOMContentLoaded event is fired.<br/>
         
     | 
| 
       1189 
1109 
     | 
    
         
             
                 *  - `networkidle0` : consider navigation to be finished when there are no
         
     | 
| 
       1190 
     | 
    
         
            -
                 * 
     | 
| 
      
 1110 
     | 
    
         
            +
                 *    more than 0 network connections for at least `500` ms.<br/>
         
     | 
| 
       1191 
1111 
     | 
    
         
             
                 *  - `networkidle2` : consider navigation to be finished when there are no
         
     | 
| 
       1192 
     | 
    
         
            -
                 * 
     | 
| 
      
 1112 
     | 
    
         
            +
                 *    more than 2 network connections for at least `500` ms.
         
     | 
| 
       1193 
1113 
     | 
    
         
             
                 */
         
     | 
| 
       1194 
1114 
     | 
    
         
             
                async reload(options) {
         
     | 
| 
       1195 
1115 
     | 
    
         
             
                    const result = await Promise.all([
         
     | 
| 
       1196 
1116 
     | 
    
         
             
                        this.waitForNavigation(options),
         
     | 
| 
       1197 
     | 
    
         
            -
                        this. 
     | 
| 
      
 1117 
     | 
    
         
            +
                        __classPrivateFieldGet(this, _Page_client, "f").send('Page.reload'),
         
     | 
| 
       1198 
1118 
     | 
    
         
             
                    ]);
         
     | 
| 
       1199 
1119 
     | 
    
         
             
                    return result[0];
         
     | 
| 
       1200 
1120 
     | 
    
         
             
                }
         
     | 
| 
       1201 
1121 
     | 
    
         
             
                /**
         
     | 
| 
       1202 
     | 
    
         
            -
                 *  
     | 
| 
       1203 
     | 
    
         
            -
                 *  
     | 
| 
       1204 
     | 
    
         
            -
                 * 
     | 
| 
       1205 
     | 
    
         
            -
                 *  
     | 
| 
      
 1122 
     | 
    
         
            +
                 * Waits for the page to navigate to a new URL or to reload. It is useful when
         
     | 
| 
      
 1123 
     | 
    
         
            +
                 * you run code that will indirectly cause the page to navigate.
         
     | 
| 
      
 1124 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1125 
     | 
    
         
            +
                 * @example
         
     | 
| 
      
 1126 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1206 
1127 
     | 
    
         
             
                 * const [response] = await Promise.all([
         
     | 
| 
       1207 
1128 
     | 
    
         
             
                 * page.waitForNavigation(), // The promise resolves after navigation has finished
         
     | 
| 
       1208 
1129 
     | 
    
         
             
                 * page.click('a.my-link'), // Clicking the link will indirectly cause a navigation
         
     | 
| 
       1209 
1130 
     | 
    
         
             
                 * ]);
         
     | 
| 
       1210 
1131 
     | 
    
         
             
                 * ```
         
     | 
| 
       1211 
1132 
     | 
    
         
             
                 *
         
     | 
| 
       1212 
     | 
    
         
            -
                 * @param options - Navigation parameters which might have the following properties:
         
     | 
| 
       1213 
     | 
    
         
            -
                 * @returns Promise which resolves to the main resource response. In case of
         
     | 
| 
       1214 
     | 
    
         
            -
                 * multiple redirects, the navigation will resolve with the response of the
         
     | 
| 
       1215 
     | 
    
         
            -
                 * last redirect. In case of navigation to a different anchor or navigation
         
     | 
| 
       1216 
     | 
    
         
            -
                 * due to History API usage, the navigation will resolve with `null`.
         
     | 
| 
       1217 
1133 
     | 
    
         
             
                 * @remarks
         
     | 
| 
       1218 
     | 
    
         
            -
                 *  
     | 
| 
      
 1134 
     | 
    
         
            +
                 * Usage of the
         
     | 
| 
       1219 
1135 
     | 
    
         
             
                 * {@link https://developer.mozilla.org/en-US/docs/Web/API/History_API | History API}
         
     | 
| 
       1220 
1136 
     | 
    
         
             
                 * to change the URL is considered a navigation.
         
     | 
| 
       1221 
1137 
     | 
    
         
             
                 *
         
     | 
| 
       1222 
     | 
    
         
            -
                 *  
     | 
| 
       1223 
     | 
    
         
            -
                 *  
     | 
| 
      
 1138 
     | 
    
         
            +
                 * @param options - Navigation parameters which might have the following
         
     | 
| 
      
 1139 
     | 
    
         
            +
                 * properties:
         
     | 
| 
      
 1140 
     | 
    
         
            +
                 * @returns A `Promise` which resolves to the main resource response.
         
     | 
| 
      
 1141 
     | 
    
         
            +
                 * - In case of multiple redirects, the navigation will resolve with the
         
     | 
| 
      
 1142 
     | 
    
         
            +
                 *   response of the last redirect.
         
     | 
| 
      
 1143 
     | 
    
         
            +
                 * - In case of navigation to a different anchor or navigation due to History
         
     | 
| 
      
 1144 
     | 
    
         
            +
                 *   API usage, the navigation will resolve with `null`.
         
     | 
| 
       1224 
1145 
     | 
    
         
             
                 */
         
     | 
| 
       1225 
1146 
     | 
    
         
             
                async waitForNavigation(options = {}) {
         
     | 
| 
       1226 
     | 
    
         
            -
                    return await this. 
     | 
| 
       1227 
     | 
    
         
            -
                }
         
     | 
| 
       1228 
     | 
    
         
            -
                _sessionClosePromise() {
         
     | 
| 
       1229 
     | 
    
         
            -
                    if (!this._disconnectPromise)
         
     | 
| 
       1230 
     | 
    
         
            -
                        this._disconnectPromise = new Promise((fulfill) => this._client.once(CDPSessionEmittedEvents.Disconnected, () => fulfill(new Error('Target closed'))));
         
     | 
| 
       1231 
     | 
    
         
            -
                    return this._disconnectPromise;
         
     | 
| 
      
 1147 
     | 
    
         
            +
                    return await __classPrivateFieldGet(this, _Page_frameManager, "f").mainFrame().waitForNavigation(options);
         
     | 
| 
       1232 
1148 
     | 
    
         
             
                }
         
     | 
| 
       1233 
1149 
     | 
    
         
             
                /**
         
     | 
| 
       1234 
1150 
     | 
    
         
             
                 * @param urlOrPredicate - A URL or predicate to wait for
         
     | 
| 
       1235 
1151 
     | 
    
         
             
                 * @param options - Optional waiting parameters
         
     | 
| 
       1236 
1152 
     | 
    
         
             
                 * @returns Promise which resolves to the matched response
         
     | 
| 
       1237 
1153 
     | 
    
         
             
                 * @example
         
     | 
| 
       1238 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1154 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1239 
1155 
     | 
    
         
             
                 * const firstResponse = await page.waitForResponse(
         
     | 
| 
       1240 
1156 
     | 
    
         
             
                 * 'https://example.com/resource'
         
     | 
| 
       1241 
1157 
     | 
    
         
             
                 * );
         
     | 
| 
         @@ -1256,21 +1172,23 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1256 
1172 
     | 
    
         
             
                 * {@link Page.setDefaultTimeout} method.
         
     | 
| 
       1257 
1173 
     | 
    
         
             
                 */
         
     | 
| 
       1258 
1174 
     | 
    
         
             
                async waitForRequest(urlOrPredicate, options = {}) {
         
     | 
| 
       1259 
     | 
    
         
            -
                    const { timeout = this. 
     | 
| 
       1260 
     | 
    
         
            -
                    return  
     | 
| 
       1261 
     | 
    
         
            -
                        if ( 
     | 
| 
      
 1175 
     | 
    
         
            +
                    const { timeout = __classPrivateFieldGet(this, _Page_timeoutSettings, "f").timeout() } = options;
         
     | 
| 
      
 1176 
     | 
    
         
            +
                    return waitForEvent(__classPrivateFieldGet(this, _Page_frameManager, "f").networkManager(), NetworkManagerEmittedEvents.Request, request => {
         
     | 
| 
      
 1177 
     | 
    
         
            +
                        if (isString(urlOrPredicate)) {
         
     | 
| 
       1262 
1178 
     | 
    
         
             
                            return urlOrPredicate === request.url();
         
     | 
| 
       1263 
     | 
    
         
            -
                         
     | 
| 
      
 1179 
     | 
    
         
            +
                        }
         
     | 
| 
      
 1180 
     | 
    
         
            +
                        if (typeof urlOrPredicate === 'function') {
         
     | 
| 
       1264 
1181 
     | 
    
         
             
                            return !!urlOrPredicate(request);
         
     | 
| 
      
 1182 
     | 
    
         
            +
                        }
         
     | 
| 
       1265 
1183 
     | 
    
         
             
                        return false;
         
     | 
| 
       1266 
     | 
    
         
            -
                    }, timeout, this. 
     | 
| 
      
 1184 
     | 
    
         
            +
                    }, timeout, __classPrivateFieldGet(this, _Page_instances, "m", _Page_sessionClosePromise).call(this));
         
     | 
| 
       1267 
1185 
     | 
    
         
             
                }
         
     | 
| 
       1268 
1186 
     | 
    
         
             
                /**
         
     | 
| 
       1269 
1187 
     | 
    
         
             
                 * @param urlOrPredicate - A URL or predicate to wait for.
         
     | 
| 
       1270 
1188 
     | 
    
         
             
                 * @param options - Optional waiting parameters
         
     | 
| 
       1271 
1189 
     | 
    
         
             
                 * @returns Promise which resolves to the matched response.
         
     | 
| 
       1272 
1190 
     | 
    
         
             
                 * @example
         
     | 
| 
       1273 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1191 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1274 
1192 
     | 
    
         
             
                 * const firstResponse = await page.waitForResponse(
         
     | 
| 
       1275 
1193 
     | 
    
         
             
                 * 'https://example.com/resource'
         
     | 
| 
       1276 
1194 
     | 
    
         
             
                 * );
         
     | 
| 
         @@ -1291,24 +1209,26 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1291 
1209 
     | 
    
         
             
                 * the {@link Page.setDefaultTimeout} method.
         
     | 
| 
       1292 
1210 
     | 
    
         
             
                 */
         
     | 
| 
       1293 
1211 
     | 
    
         
             
                async waitForResponse(urlOrPredicate, options = {}) {
         
     | 
| 
       1294 
     | 
    
         
            -
                    const { timeout = this. 
     | 
| 
       1295 
     | 
    
         
            -
                    return  
     | 
| 
       1296 
     | 
    
         
            -
                        if ( 
     | 
| 
      
 1212 
     | 
    
         
            +
                    const { timeout = __classPrivateFieldGet(this, _Page_timeoutSettings, "f").timeout() } = options;
         
     | 
| 
      
 1213 
     | 
    
         
            +
                    return waitForEvent(__classPrivateFieldGet(this, _Page_frameManager, "f").networkManager(), NetworkManagerEmittedEvents.Response, async (response) => {
         
     | 
| 
      
 1214 
     | 
    
         
            +
                        if (isString(urlOrPredicate)) {
         
     | 
| 
       1297 
1215 
     | 
    
         
             
                            return urlOrPredicate === response.url();
         
     | 
| 
       1298 
     | 
    
         
            -
                         
     | 
| 
      
 1216 
     | 
    
         
            +
                        }
         
     | 
| 
      
 1217 
     | 
    
         
            +
                        if (typeof urlOrPredicate === 'function') {
         
     | 
| 
       1299 
1218 
     | 
    
         
             
                            return !!(await urlOrPredicate(response));
         
     | 
| 
      
 1219 
     | 
    
         
            +
                        }
         
     | 
| 
       1300 
1220 
     | 
    
         
             
                        return false;
         
     | 
| 
       1301 
     | 
    
         
            -
                    }, timeout, this. 
     | 
| 
      
 1221 
     | 
    
         
            +
                    }, timeout, __classPrivateFieldGet(this, _Page_instances, "m", _Page_sessionClosePromise).call(this));
         
     | 
| 
       1302 
1222 
     | 
    
         
             
                }
         
     | 
| 
       1303 
1223 
     | 
    
         
             
                /**
         
     | 
| 
       1304 
1224 
     | 
    
         
             
                 * @param options - Optional waiting parameters
         
     | 
| 
       1305 
1225 
     | 
    
         
             
                 * @returns Promise which resolves when network is idle
         
     | 
| 
       1306 
1226 
     | 
    
         
             
                 */
         
     | 
| 
       1307 
1227 
     | 
    
         
             
                async waitForNetworkIdle(options = {}) {
         
     | 
| 
       1308 
     | 
    
         
            -
                    const { idleTime = 500, timeout = this. 
     | 
| 
       1309 
     | 
    
         
            -
                    const networkManager = this. 
     | 
| 
      
 1228 
     | 
    
         
            +
                    const { idleTime = 500, timeout = __classPrivateFieldGet(this, _Page_timeoutSettings, "f").timeout() } = options;
         
     | 
| 
      
 1229 
     | 
    
         
            +
                    const networkManager = __classPrivateFieldGet(this, _Page_frameManager, "f").networkManager();
         
     | 
| 
       1310 
1230 
     | 
    
         
             
                    let idleResolveCallback;
         
     | 
| 
       1311 
     | 
    
         
            -
                    const idlePromise = new Promise( 
     | 
| 
      
 1231 
     | 
    
         
            +
                    const idlePromise = new Promise(resolve => {
         
     | 
| 
       1312 
1232 
     | 
    
         
             
                        idleResolveCallback = resolve;
         
     | 
| 
       1313 
1233 
     | 
    
         
             
                    });
         
     | 
| 
       1314 
1234 
     | 
    
         
             
                    let abortRejectCallback;
         
     | 
| 
         @@ -1316,22 +1236,27 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1316 
1236 
     | 
    
         
             
                        abortRejectCallback = reject;
         
     | 
| 
       1317 
1237 
     | 
    
         
             
                    });
         
     | 
| 
       1318 
1238 
     | 
    
         
             
                    let idleTimer;
         
     | 
| 
       1319 
     | 
    
         
            -
                    const onIdle = () =>  
     | 
| 
      
 1239 
     | 
    
         
            +
                    const onIdle = () => {
         
     | 
| 
      
 1240 
     | 
    
         
            +
                        return idleResolveCallback();
         
     | 
| 
      
 1241 
     | 
    
         
            +
                    };
         
     | 
| 
       1320 
1242 
     | 
    
         
             
                    const cleanup = () => {
         
     | 
| 
       1321 
1243 
     | 
    
         
             
                        idleTimer && clearTimeout(idleTimer);
         
     | 
| 
       1322 
1244 
     | 
    
         
             
                        abortRejectCallback(new Error('abort'));
         
     | 
| 
       1323 
1245 
     | 
    
         
             
                    };
         
     | 
| 
       1324 
1246 
     | 
    
         
             
                    const evaluate = () => {
         
     | 
| 
       1325 
1247 
     | 
    
         
             
                        idleTimer && clearTimeout(idleTimer);
         
     | 
| 
       1326 
     | 
    
         
            -
                        if (networkManager.numRequestsInProgress() === 0)
         
     | 
| 
      
 1248 
     | 
    
         
            +
                        if (networkManager.numRequestsInProgress() === 0) {
         
     | 
| 
       1327 
1249 
     | 
    
         
             
                            idleTimer = setTimeout(onIdle, idleTime);
         
     | 
| 
      
 1250 
     | 
    
         
            +
                        }
         
     | 
| 
       1328 
1251 
     | 
    
         
             
                    };
         
     | 
| 
       1329 
1252 
     | 
    
         
             
                    evaluate();
         
     | 
| 
       1330 
1253 
     | 
    
         
             
                    const eventHandler = () => {
         
     | 
| 
       1331 
1254 
     | 
    
         
             
                        evaluate();
         
     | 
| 
       1332 
1255 
     | 
    
         
             
                        return false;
         
     | 
| 
       1333 
1256 
     | 
    
         
             
                    };
         
     | 
| 
       1334 
     | 
    
         
            -
                    const listenToEvent = (event) =>  
     | 
| 
      
 1257 
     | 
    
         
            +
                    const listenToEvent = (event) => {
         
     | 
| 
      
 1258 
     | 
    
         
            +
                        return waitForEvent(networkManager, event, eventHandler, timeout, abortPromise);
         
     | 
| 
      
 1259 
     | 
    
         
            +
                    };
         
     | 
| 
       1335 
1260 
     | 
    
         
             
                    const eventPromises = [
         
     | 
| 
       1336 
1261 
     | 
    
         
             
                        listenToEvent(NetworkManagerEmittedEvents.Request),
         
     | 
| 
       1337 
1262 
     | 
    
         
             
                        listenToEvent(NetworkManagerEmittedEvents.Response),
         
     | 
| 
         @@ -1339,11 +1264,11 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1339 
1264 
     | 
    
         
             
                    await Promise.race([
         
     | 
| 
       1340 
1265 
     | 
    
         
             
                        idlePromise,
         
     | 
| 
       1341 
1266 
     | 
    
         
             
                        ...eventPromises,
         
     | 
| 
       1342 
     | 
    
         
            -
                        this. 
     | 
| 
       1343 
     | 
    
         
            -
                    ]).then( 
     | 
| 
      
 1267 
     | 
    
         
            +
                        __classPrivateFieldGet(this, _Page_instances, "m", _Page_sessionClosePromise).call(this),
         
     | 
| 
      
 1268 
     | 
    
         
            +
                    ]).then(r => {
         
     | 
| 
       1344 
1269 
     | 
    
         
             
                        cleanup();
         
     | 
| 
       1345 
1270 
     | 
    
         
             
                        return r;
         
     | 
| 
       1346 
     | 
    
         
            -
                    },  
     | 
| 
      
 1271 
     | 
    
         
            +
                    }, error => {
         
     | 
| 
       1347 
1272 
     | 
    
         
             
                        cleanup();
         
     | 
| 
       1348 
1273 
     | 
    
         
             
                        throw error;
         
     | 
| 
       1349 
1274 
     | 
    
         
             
                    });
         
     | 
| 
         @@ -1353,7 +1278,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1353 
1278 
     | 
    
         
             
                 * @param options - Optional waiting parameters
         
     | 
| 
       1354 
1279 
     | 
    
         
             
                 * @returns Promise which resolves to the matched frame.
         
     | 
| 
       1355 
1280 
     | 
    
         
             
                 * @example
         
     | 
| 
       1356 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1281 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1357 
1282 
     | 
    
         
             
                 * const frame = await page.waitForFrame(async (frame) => {
         
     | 
| 
       1358 
1283 
     | 
    
         
             
                 *   return frame.name() === 'Test';
         
     | 
| 
       1359 
1284 
     | 
    
         
             
                 * });
         
     | 
| 
         @@ -1366,29 +1291,33 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1366 
1291 
     | 
    
         
             
                 * the {@link Page.setDefaultTimeout} method.
         
     | 
| 
       1367 
1292 
     | 
    
         
             
                 */
         
     | 
| 
       1368 
1293 
     | 
    
         
             
                async waitForFrame(urlOrPredicate, options = {}) {
         
     | 
| 
       1369 
     | 
    
         
            -
                    const { timeout = this. 
     | 
| 
       1370 
     | 
    
         
            -
                     
     | 
| 
       1371 
     | 
    
         
            -
             
     | 
| 
       1372 
     | 
    
         
            -
             
     | 
| 
       1373 
     | 
    
         
            -
             
     | 
| 
       1374 
     | 
    
         
            -
             
     | 
| 
       1375 
     | 
    
         
            -
             
     | 
| 
      
 1294 
     | 
    
         
            +
                    const { timeout = __classPrivateFieldGet(this, _Page_timeoutSettings, "f").timeout() } = options;
         
     | 
| 
      
 1295 
     | 
    
         
            +
                    let predicate;
         
     | 
| 
      
 1296 
     | 
    
         
            +
                    if (isString(urlOrPredicate)) {
         
     | 
| 
      
 1297 
     | 
    
         
            +
                        predicate = (frame) => {
         
     | 
| 
      
 1298 
     | 
    
         
            +
                            return Promise.resolve(urlOrPredicate === frame.url());
         
     | 
| 
      
 1299 
     | 
    
         
            +
                        };
         
     | 
| 
      
 1300 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1301 
     | 
    
         
            +
                    else {
         
     | 
| 
      
 1302 
     | 
    
         
            +
                        predicate = (frame) => {
         
     | 
| 
      
 1303 
     | 
    
         
            +
                            const value = urlOrPredicate(frame);
         
     | 
| 
      
 1304 
     | 
    
         
            +
                            if (typeof value === 'boolean') {
         
     | 
| 
      
 1305 
     | 
    
         
            +
                                return Promise.resolve(value);
         
     | 
| 
      
 1306 
     | 
    
         
            +
                            }
         
     | 
| 
      
 1307 
     | 
    
         
            +
                            return value;
         
     | 
| 
      
 1308 
     | 
    
         
            +
                        };
         
     | 
| 
       1376 
1309 
     | 
    
         
             
                    }
         
     | 
| 
       1377 
1310 
     | 
    
         
             
                    const eventRace = Promise.race([
         
     | 
| 
       1378 
     | 
    
         
            -
                         
     | 
| 
       1379 
     | 
    
         
            -
                         
     | 
| 
       1380 
     | 
    
         
            -
             
     | 
| 
       1381 
     | 
    
         
            -
             
     | 
| 
       1382 
     | 
    
         
            -
             
     | 
| 
       1383 
     | 
    
         
            -
                        (async () => {
         
     | 
| 
       1384 
     | 
    
         
            -
                            for (const frame of this.frames()) {
         
     | 
| 
       1385 
     | 
    
         
            -
                                if (await predicate(frame)) {
         
     | 
| 
       1386 
     | 
    
         
            -
                                    return frame;
         
     | 
| 
       1387 
     | 
    
         
            -
                                }
         
     | 
| 
      
 1311 
     | 
    
         
            +
                        waitForEvent(__classPrivateFieldGet(this, _Page_frameManager, "f"), FrameManagerEmittedEvents.FrameAttached, predicate, timeout, __classPrivateFieldGet(this, _Page_instances, "m", _Page_sessionClosePromise).call(this)),
         
     | 
| 
      
 1312 
     | 
    
         
            +
                        waitForEvent(__classPrivateFieldGet(this, _Page_frameManager, "f"), FrameManagerEmittedEvents.FrameNavigated, predicate, timeout, __classPrivateFieldGet(this, _Page_instances, "m", _Page_sessionClosePromise).call(this)),
         
     | 
| 
      
 1313 
     | 
    
         
            +
                        ...this.frames().map(async (frame) => {
         
     | 
| 
      
 1314 
     | 
    
         
            +
                            if (await predicate(frame)) {
         
     | 
| 
      
 1315 
     | 
    
         
            +
                                return frame;
         
     | 
| 
       1388 
1316 
     | 
    
         
             
                            }
         
     | 
| 
       1389 
     | 
    
         
            -
                            await eventRace;
         
     | 
| 
       1390 
     | 
    
         
            -
                        }) 
     | 
| 
      
 1317 
     | 
    
         
            +
                            return await eventRace;
         
     | 
| 
      
 1318 
     | 
    
         
            +
                        }),
         
     | 
| 
       1391 
1319 
     | 
    
         
             
                    ]);
         
     | 
| 
      
 1320 
     | 
    
         
            +
                    return eventRace;
         
     | 
| 
       1392 
1321 
     | 
    
         
             
                }
         
     | 
| 
       1393 
1322 
     | 
    
         
             
                /**
         
     | 
| 
       1394 
1323 
     | 
    
         
             
                 * This method navigate to the previous page in history.
         
     | 
| 
         @@ -1401,25 +1330,23 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1401 
1330 
     | 
    
         
             
                 *
         
     | 
| 
       1402 
1331 
     | 
    
         
             
                 * - `timeout` : Maximum navigation time in milliseconds, defaults to 30
         
     | 
| 
       1403 
1332 
     | 
    
         
             
                 *   seconds, pass 0 to disable timeout. The default value can be changed by
         
     | 
| 
       1404 
     | 
    
         
            -
                 *   using the
         
     | 
| 
       1405 
     | 
    
         
            -
                 *   {@link Page. 
     | 
| 
       1406 
     | 
    
         
            -
                 *   | page.setDefaultNavigationTimeout(timeout)}
         
     | 
| 
       1407 
     | 
    
         
            -
                 *   or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
         
     | 
| 
       1408 
     | 
    
         
            -
                 *   methods.
         
     | 
| 
      
 1333 
     | 
    
         
            +
                 *   using the {@link Page.setDefaultNavigationTimeout} or
         
     | 
| 
      
 1334 
     | 
    
         
            +
                 *   {@link Page.setDefaultTimeout} methods.
         
     | 
| 
       1409 
1335 
     | 
    
         
             
                 *
         
     | 
| 
       1410 
1336 
     | 
    
         
             
                 * - `waitUntil` : When to consider navigation succeeded, defaults to `load`.
         
     | 
| 
       1411 
1337 
     | 
    
         
             
                 *    Given an array of event strings, navigation is considered to be
         
     | 
| 
       1412 
1338 
     | 
    
         
             
                 *    successful after all events have been fired. Events can be either:<br/>
         
     | 
| 
       1413 
     | 
    
         
            -
                 *  - `load` : consider navigation to be finished when the load event is 
     | 
| 
      
 1339 
     | 
    
         
            +
                 *  - `load` : consider navigation to be finished when the load event is
         
     | 
| 
      
 1340 
     | 
    
         
            +
                 *    fired.<br/>
         
     | 
| 
       1414 
1341 
     | 
    
         
             
                 *  - `domcontentloaded` : consider navigation to be finished when the
         
     | 
| 
       1415 
     | 
    
         
            -
                 * 
     | 
| 
      
 1342 
     | 
    
         
            +
                 *    DOMContentLoaded event is fired.<br/>
         
     | 
| 
       1416 
1343 
     | 
    
         
             
                 *  - `networkidle0` : consider navigation to be finished when there are no
         
     | 
| 
       1417 
     | 
    
         
            -
                 * 
     | 
| 
      
 1344 
     | 
    
         
            +
                 *    more than 0 network connections for at least `500` ms.<br/>
         
     | 
| 
       1418 
1345 
     | 
    
         
             
                 *  - `networkidle2` : consider navigation to be finished when there are no
         
     | 
| 
       1419 
     | 
    
         
            -
                 * 
     | 
| 
      
 1346 
     | 
    
         
            +
                 *    more than 2 network connections for at least `500` ms.
         
     | 
| 
       1420 
1347 
     | 
    
         
             
                 */
         
     | 
| 
       1421 
1348 
     | 
    
         
             
                async goBack(options = {}) {
         
     | 
| 
       1422 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 1349 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_instances, "m", _Page_go).call(this, -1, options);
         
     | 
| 
       1423 
1350 
     | 
    
         
             
                }
         
     | 
| 
       1424 
1351 
     | 
    
         
             
                /**
         
     | 
| 
       1425 
1352 
     | 
    
         
             
                 * This method navigate to the next page in history.
         
     | 
| 
         @@ -1432,52 +1359,42 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1432 
1359 
     | 
    
         
             
                 *
         
     | 
| 
       1433 
1360 
     | 
    
         
             
                 * - `timeout` : Maximum navigation time in milliseconds, defaults to 30
         
     | 
| 
       1434 
1361 
     | 
    
         
             
                 *   seconds, pass 0 to disable timeout. The default value can be changed by
         
     | 
| 
       1435 
     | 
    
         
            -
                 *   using the
         
     | 
| 
       1436 
     | 
    
         
            -
                 *   {@link Page. 
     | 
| 
       1437 
     | 
    
         
            -
                 *   | page.setDefaultNavigationTimeout(timeout)}
         
     | 
| 
       1438 
     | 
    
         
            -
                 *   or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
         
     | 
| 
       1439 
     | 
    
         
            -
                 *   methods.
         
     | 
| 
      
 1362 
     | 
    
         
            +
                 *   using the {@link Page.setDefaultNavigationTimeout} or
         
     | 
| 
      
 1363 
     | 
    
         
            +
                 *   {@link Page.setDefaultTimeout} methods.
         
     | 
| 
       1440 
1364 
     | 
    
         
             
                 *
         
     | 
| 
       1441 
1365 
     | 
    
         
             
                 * - `waitUntil`: When to consider navigation succeeded, defaults to `load`.
         
     | 
| 
       1442 
1366 
     | 
    
         
             
                 *    Given an array of event strings, navigation is considered to be
         
     | 
| 
       1443 
1367 
     | 
    
         
             
                 *    successful after all events have been fired. Events can be either:<br/>
         
     | 
| 
       1444 
     | 
    
         
            -
                 *  - `load` : consider navigation to be finished when the load event is 
     | 
| 
      
 1368 
     | 
    
         
            +
                 *  - `load` : consider navigation to be finished when the load event is
         
     | 
| 
      
 1369 
     | 
    
         
            +
                 *    fired.<br/>
         
     | 
| 
       1445 
1370 
     | 
    
         
             
                 *  - `domcontentloaded` : consider navigation to be finished when the
         
     | 
| 
       1446 
     | 
    
         
            -
                 * 
     | 
| 
      
 1371 
     | 
    
         
            +
                 *    DOMContentLoaded event is fired.<br/>
         
     | 
| 
       1447 
1372 
     | 
    
         
             
                 *  - `networkidle0` : consider navigation to be finished when there are no
         
     | 
| 
       1448 
     | 
    
         
            -
                 * 
     | 
| 
      
 1373 
     | 
    
         
            +
                 *    more than 0 network connections for at least `500` ms.<br/>
         
     | 
| 
       1449 
1374 
     | 
    
         
             
                 *  - `networkidle2` : consider navigation to be finished when there are no
         
     | 
| 
       1450 
     | 
    
         
            -
                 * 
     | 
| 
      
 1375 
     | 
    
         
            +
                 *    more than 2 network connections for at least `500` ms.
         
     | 
| 
       1451 
1376 
     | 
    
         
             
                 */
         
     | 
| 
       1452 
1377 
     | 
    
         
             
                async goForward(options = {}) {
         
     | 
| 
       1453 
     | 
    
         
            -
                    return this. 
     | 
| 
       1454 
     | 
    
         
            -
                }
         
     | 
| 
       1455 
     | 
    
         
            -
                async _go(delta, options) {
         
     | 
| 
       1456 
     | 
    
         
            -
                    const history = await this._client.send('Page.getNavigationHistory');
         
     | 
| 
       1457 
     | 
    
         
            -
                    const entry = history.entries[history.currentIndex + delta];
         
     | 
| 
       1458 
     | 
    
         
            -
                    if (!entry)
         
     | 
| 
       1459 
     | 
    
         
            -
                        return null;
         
     | 
| 
       1460 
     | 
    
         
            -
                    const result = await Promise.all([
         
     | 
| 
       1461 
     | 
    
         
            -
                        this.waitForNavigation(options),
         
     | 
| 
       1462 
     | 
    
         
            -
                        this._client.send('Page.navigateToHistoryEntry', { entryId: entry.id }),
         
     | 
| 
       1463 
     | 
    
         
            -
                    ]);
         
     | 
| 
       1464 
     | 
    
         
            -
                    return result[0];
         
     | 
| 
      
 1378 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_instances, "m", _Page_go).call(this, +1, options);
         
     | 
| 
       1465 
1379 
     | 
    
         
             
                }
         
     | 
| 
       1466 
1380 
     | 
    
         
             
                /**
         
     | 
| 
       1467 
1381 
     | 
    
         
             
                 * Brings page to front (activates tab).
         
     | 
| 
       1468 
1382 
     | 
    
         
             
                 */
         
     | 
| 
       1469 
1383 
     | 
    
         
             
                async bringToFront() {
         
     | 
| 
       1470 
     | 
    
         
            -
                    await this. 
     | 
| 
      
 1384 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Page.bringToFront');
         
     | 
| 
       1471 
1385 
     | 
    
         
             
                }
         
     | 
| 
       1472 
1386 
     | 
    
         
             
                /**
         
     | 
| 
       1473 
     | 
    
         
            -
                 * Emulates given device metrics and user agent. 
     | 
| 
       1474 
     | 
    
         
            -
                 * 
     | 
| 
       1475 
     | 
    
         
            -
                 *  
     | 
| 
       1476 
     | 
    
         
            -
                 *  
     | 
| 
       1477 
     | 
    
         
            -
                 *  
     | 
| 
       1478 
     | 
    
         
            -
                 *  
     | 
| 
      
 1387 
     | 
    
         
            +
                 * Emulates given device metrics and user agent.
         
     | 
| 
      
 1388 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1389 
     | 
    
         
            +
                 * @remarks
         
     | 
| 
      
 1390 
     | 
    
         
            +
                 * This method is a shortcut for calling two methods:
         
     | 
| 
      
 1391 
     | 
    
         
            +
                 * {@link Page.setUserAgent} and {@link Page.setViewport} To aid emulation,
         
     | 
| 
      
 1392 
     | 
    
         
            +
                 * Puppeteer provides a list of device descriptors that can be obtained via
         
     | 
| 
      
 1393 
     | 
    
         
            +
                 * {@link devices}. `page.emulate` will resize the page. A lot of websites
         
     | 
| 
      
 1394 
     | 
    
         
            +
                 * don't expect phones to change size, so you should emulate before navigating
         
     | 
| 
      
 1395 
     | 
    
         
            +
                 * to the page.
         
     | 
| 
       1479 
1396 
     | 
    
         
             
                 * @example
         
     | 
| 
       1480 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1397 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1481 
1398 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       1482 
1399 
     | 
    
         
             
                 * const iPhone = puppeteer.devices['iPhone 6'];
         
     | 
| 
       1483 
1400 
     | 
    
         
             
                 * (async () => {
         
     | 
| 
         @@ -1506,10 +1423,11 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1506 
1423 
     | 
    
         
             
                 * It will take full effect on the next navigation.
         
     | 
| 
       1507 
1424 
     | 
    
         
             
                 */
         
     | 
| 
       1508 
1425 
     | 
    
         
             
                async setJavaScriptEnabled(enabled) {
         
     | 
| 
       1509 
     | 
    
         
            -
                    if (this 
     | 
| 
      
 1426 
     | 
    
         
            +
                    if (__classPrivateFieldGet(this, _Page_javascriptEnabled, "f") === enabled) {
         
     | 
| 
       1510 
1427 
     | 
    
         
             
                        return;
         
     | 
| 
       1511 
     | 
    
         
            -
                     
     | 
| 
       1512 
     | 
    
         
            -
                     
     | 
| 
      
 1428 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1429 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_javascriptEnabled, enabled, "f");
         
     | 
| 
      
 1430 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setScriptExecutionDisabled', {
         
     | 
| 
       1513 
1431 
     | 
    
         
             
                        value: !enabled,
         
     | 
| 
       1514 
1432 
     | 
    
         
             
                    });
         
     | 
| 
       1515 
1433 
     | 
    
         
             
                }
         
     | 
| 
         @@ -1522,14 +1440,14 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1522 
1440 
     | 
    
         
             
                 * before navigating to the domain.
         
     | 
| 
       1523 
1441 
     | 
    
         
             
                 */
         
     | 
| 
       1524 
1442 
     | 
    
         
             
                async setBypassCSP(enabled) {
         
     | 
| 
       1525 
     | 
    
         
            -
                    await this. 
     | 
| 
      
 1443 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Page.setBypassCSP', { enabled });
         
     | 
| 
       1526 
1444 
     | 
    
         
             
                }
         
     | 
| 
       1527 
1445 
     | 
    
         
             
                /**
         
     | 
| 
       1528 
1446 
     | 
    
         
             
                 * @param type - Changes the CSS media type of the page. The only allowed
         
     | 
| 
       1529 
1447 
     | 
    
         
             
                 * values are `screen`, `print` and `null`. Passing `null` disables CSS media
         
     | 
| 
       1530 
1448 
     | 
    
         
             
                 * emulation.
         
     | 
| 
       1531 
1449 
     | 
    
         
             
                 * @example
         
     | 
| 
       1532 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 1450 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1533 
1451 
     | 
    
         
             
                 * await page.evaluate(() => matchMedia('screen').matches);
         
     | 
| 
       1534 
1452 
     | 
    
         
             
                 * // → true
         
     | 
| 
       1535 
1453 
     | 
    
         
             
                 * await page.evaluate(() => matchMedia('print').matches);
         
     | 
| 
         @@ -1549,8 +1467,10 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1549 
1467 
     | 
    
         
             
                 * ```
         
     | 
| 
       1550 
1468 
     | 
    
         
             
                 */
         
     | 
| 
       1551 
1469 
     | 
    
         
             
                async emulateMediaType(type) {
         
     | 
| 
       1552 
     | 
    
         
            -
                    assert(type === 'screen' || 
     | 
| 
       1553 
     | 
    
         
            -
             
     | 
| 
      
 1470 
     | 
    
         
            +
                    assert(type === 'screen' ||
         
     | 
| 
      
 1471 
     | 
    
         
            +
                        type === 'print' ||
         
     | 
| 
      
 1472 
     | 
    
         
            +
                        (type !== null && type !== void 0 ? type : undefined) === undefined, 'Unsupported media type: ' + type);
         
     | 
| 
      
 1473 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setEmulatedMedia', {
         
     | 
| 
       1554 
1474 
     | 
    
         
             
                        media: type || '',
         
     | 
| 
       1555 
1475 
     | 
    
         
             
                    });
         
     | 
| 
       1556 
1476 
     | 
    
         
             
                }
         
     | 
| 
         @@ -1560,7 +1480,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1560 
1480 
     | 
    
         
             
                 */
         
     | 
| 
       1561 
1481 
     | 
    
         
             
                async emulateCPUThrottling(factor) {
         
     | 
| 
       1562 
1482 
     | 
    
         
             
                    assert(factor === null || factor >= 1, 'Throttling rate should be greater or equal to 1');
         
     | 
| 
       1563 
     | 
    
         
            -
                    await this. 
     | 
| 
      
 1483 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setCPUThrottlingRate', {
         
     | 
| 
       1564 
1484 
     | 
    
         
             
                        rate: factor !== null ? factor : 1,
         
     | 
| 
       1565 
1485 
     | 
    
         
             
                    });
         
     | 
| 
       1566 
1486 
     | 
    
         
             
                }
         
     | 
| 
         @@ -1569,7 +1489,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1569 
1489 
     | 
    
         
             
                 * objects, emulates CSS media features on the page. Each media feature object
         
     | 
| 
       1570 
1490 
     | 
    
         
             
                 * must have the following properties:
         
     | 
| 
       1571 
1491 
     | 
    
         
             
                 * @example
         
     | 
| 
       1572 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1492 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1573 
1493 
     | 
    
         
             
                 * await page.emulateMediaFeatures([
         
     | 
| 
       1574 
1494 
     | 
    
         
             
                 * { name: 'prefers-color-scheme', value: 'dark' },
         
     | 
| 
       1575 
1495 
     | 
    
         
             
                 * ]);
         
     | 
| 
         @@ -1617,15 +1537,15 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1617 
1537 
     | 
    
         
             
                 * ```
         
     | 
| 
       1618 
1538 
     | 
    
         
             
                 */
         
     | 
| 
       1619 
1539 
     | 
    
         
             
                async emulateMediaFeatures(features) {
         
     | 
| 
       1620 
     | 
    
         
            -
                    if (features  
     | 
| 
       1621 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 1540 
     | 
    
         
            +
                    if (!features) {
         
     | 
| 
      
 1541 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setEmulatedMedia', {});
         
     | 
| 
      
 1542 
     | 
    
         
            +
                    }
         
     | 
| 
       1622 
1543 
     | 
    
         
             
                    if (Array.isArray(features)) {
         
     | 
| 
       1623 
     | 
    
         
            -
                         
     | 
| 
      
 1544 
     | 
    
         
            +
                        for (const mediaFeature of features) {
         
     | 
| 
       1624 
1545 
     | 
    
         
             
                            const name = mediaFeature.name;
         
     | 
| 
       1625 
1546 
     | 
    
         
             
                            assert(/^(?:prefers-(?:color-scheme|reduced-motion)|color-gamut)$/.test(name), 'Unsupported media feature: ' + name);
         
     | 
| 
       1626 
     | 
    
         
            -
             
     | 
| 
       1627 
     | 
    
         
            -
                         
     | 
| 
       1628 
     | 
    
         
            -
                        await this._client.send('Emulation.setEmulatedMedia', {
         
     | 
| 
      
 1547 
     | 
    
         
            +
                        }
         
     | 
| 
      
 1548 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setEmulatedMedia', {
         
     | 
| 
       1629 
1549 
     | 
    
         
             
                            features: features,
         
     | 
| 
       1630 
1550 
     | 
    
         
             
                        });
         
     | 
| 
       1631 
1551 
     | 
    
         
             
                    }
         
     | 
| 
         @@ -1638,13 +1558,14 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1638 
1558 
     | 
    
         
             
                 */
         
     | 
| 
       1639 
1559 
     | 
    
         
             
                async emulateTimezone(timezoneId) {
         
     | 
| 
       1640 
1560 
     | 
    
         
             
                    try {
         
     | 
| 
       1641 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 1561 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setTimezoneOverride', {
         
     | 
| 
       1642 
1562 
     | 
    
         
             
                            timezoneId: timezoneId || '',
         
     | 
| 
       1643 
1563 
     | 
    
         
             
                        });
         
     | 
| 
       1644 
1564 
     | 
    
         
             
                    }
         
     | 
| 
       1645 
1565 
     | 
    
         
             
                    catch (error) {
         
     | 
| 
       1646 
     | 
    
         
            -
                        if (error.message.includes('Invalid timezone'))
         
     | 
| 
      
 1566 
     | 
    
         
            +
                        if (isErrorLike(error) && error.message.includes('Invalid timezone')) {
         
     | 
| 
       1647 
1567 
     | 
    
         
             
                            throw new Error(`Invalid timezone ID: ${timezoneId}`);
         
     | 
| 
      
 1568 
     | 
    
         
            +
                        }
         
     | 
| 
       1648 
1569 
     | 
    
         
             
                        throw error;
         
     | 
| 
       1649 
1570 
     | 
    
         
             
                    }
         
     | 
| 
       1650 
1571 
     | 
    
         
             
                }
         
     | 
| 
         @@ -1653,7 +1574,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1653 
1574 
     | 
    
         
             
                 * If no arguments set, clears idle state emulation.
         
     | 
| 
       1654 
1575 
     | 
    
         
             
                 *
         
     | 
| 
       1655 
1576 
     | 
    
         
             
                 * @example
         
     | 
| 
       1656 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1577 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1657 
1578 
     | 
    
         
             
                 * // set idle emulation
         
     | 
| 
       1658 
1579 
     | 
    
         
             
                 * await page.emulateIdleState({isUserActive: true, isScreenUnlocked: false});
         
     | 
| 
       1659 
1580 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -1668,20 +1589,20 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1668 
1589 
     | 
    
         
             
                 */
         
     | 
| 
       1669 
1590 
     | 
    
         
             
                async emulateIdleState(overrides) {
         
     | 
| 
       1670 
1591 
     | 
    
         
             
                    if (overrides) {
         
     | 
| 
       1671 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 1592 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setIdleOverride', {
         
     | 
| 
       1672 
1593 
     | 
    
         
             
                            isUserActive: overrides.isUserActive,
         
     | 
| 
       1673 
1594 
     | 
    
         
             
                            isScreenUnlocked: overrides.isScreenUnlocked,
         
     | 
| 
       1674 
1595 
     | 
    
         
             
                        });
         
     | 
| 
       1675 
1596 
     | 
    
         
             
                    }
         
     | 
| 
       1676 
1597 
     | 
    
         
             
                    else {
         
     | 
| 
       1677 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 1598 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.clearIdleOverride');
         
     | 
| 
       1678 
1599 
     | 
    
         
             
                    }
         
     | 
| 
       1679 
1600 
     | 
    
         
             
                }
         
     | 
| 
       1680 
1601 
     | 
    
         
             
                /**
         
     | 
| 
       1681 
1602 
     | 
    
         
             
                 * Simulates the given vision deficiency on the page.
         
     | 
| 
       1682 
1603 
     | 
    
         
             
                 *
         
     | 
| 
       1683 
1604 
     | 
    
         
             
                 * @example
         
     | 
| 
       1684 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1605 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1685 
1606 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       1686 
1607 
     | 
    
         
             
                 *
         
     | 
| 
       1687 
1608 
     | 
    
         
             
                 * (async () => {
         
     | 
| 
         @@ -1715,7 +1636,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1715 
1636 
     | 
    
         
             
                    ]);
         
     | 
| 
       1716 
1637 
     | 
    
         
             
                    try {
         
     | 
| 
       1717 
1638 
     | 
    
         
             
                        assert(!type || visionDeficiencies.has(type), `Unsupported vision deficiency: ${type}`);
         
     | 
| 
       1718 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 1639 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setEmulatedVisionDeficiency', {
         
     | 
| 
       1719 
1640 
     | 
    
         
             
                            type: type || 'none',
         
     | 
| 
       1720 
1641 
     | 
    
         
             
                        });
         
     | 
| 
       1721 
1642 
     | 
    
         
             
                    }
         
     | 
| 
         @@ -1731,7 +1652,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1731 
1652 
     | 
    
         
             
                 * In the case of multiple pages in a single browser, each page can have its
         
     | 
| 
       1732 
1653 
     | 
    
         
             
                 * own viewport size.
         
     | 
| 
       1733 
1654 
     | 
    
         
             
                 * @example
         
     | 
| 
       1734 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1655 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1735 
1656 
     | 
    
         
             
                 * const page = await browser.newPage();
         
     | 
| 
       1736 
1657 
     | 
    
         
             
                 * await page.setViewport({
         
     | 
| 
       1737 
1658 
     | 
    
         
             
                 * width: 640,
         
     | 
| 
         @@ -1763,10 +1684,11 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1763 
1684 
     | 
    
         
             
                 * set the isMobile or hasTouch properties.
         
     | 
| 
       1764 
1685 
     | 
    
         
             
                 */
         
     | 
| 
       1765 
1686 
     | 
    
         
             
                async setViewport(viewport) {
         
     | 
| 
       1766 
     | 
    
         
            -
                    const needsReload = await this. 
     | 
| 
       1767 
     | 
    
         
            -
                    this 
     | 
| 
       1768 
     | 
    
         
            -
                    if (needsReload)
         
     | 
| 
      
 1687 
     | 
    
         
            +
                    const needsReload = await __classPrivateFieldGet(this, _Page_emulationManager, "f").emulateViewport(viewport);
         
     | 
| 
      
 1688 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_viewport, viewport, "f");
         
     | 
| 
      
 1689 
     | 
    
         
            +
                    if (needsReload) {
         
     | 
| 
       1769 
1690 
     | 
    
         
             
                        await this.reload();
         
     | 
| 
      
 1691 
     | 
    
         
            +
                    }
         
     | 
| 
       1770 
1692 
     | 
    
         
             
                }
         
     | 
| 
       1771 
1693 
     | 
    
         
             
                /**
         
     | 
| 
       1772 
1694 
     | 
    
         
             
                 * @returns
         
     | 
| 
         @@ -1788,7 +1710,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1788 
1710 
     | 
    
         
             
                 *   `false`.
         
     | 
| 
       1789 
1711 
     | 
    
         
             
                 */
         
     | 
| 
       1790 
1712 
     | 
    
         
             
                viewport() {
         
     | 
| 
       1791 
     | 
    
         
            -
                    return this 
     | 
| 
      
 1713 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_viewport, "f");
         
     | 
| 
       1792 
1714 
     | 
    
         
             
                }
         
     | 
| 
       1793 
1715 
     | 
    
         
             
                /**
         
     | 
| 
       1794 
1716 
     | 
    
         
             
                 * @remarks
         
     | 
| 
         @@ -1800,7 +1722,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1800 
1722 
     | 
    
         
             
                 *
         
     | 
| 
       1801 
1723 
     | 
    
         
             
                 * @example
         
     | 
| 
       1802 
1724 
     | 
    
         
             
                 *
         
     | 
| 
       1803 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1725 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1804 
1726 
     | 
    
         
             
                 * const result = await frame.evaluate(() => {
         
     | 
| 
       1805 
1727 
     | 
    
         
             
                 *   return Promise.resolve(8 * 7);
         
     | 
| 
       1806 
1728 
     | 
    
         
             
                 * });
         
     | 
| 
         @@ -1811,15 +1733,15 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1811 
1733 
     | 
    
         
             
                 * recommended as they are easier to debug and use with TypeScript):
         
     | 
| 
       1812 
1734 
     | 
    
         
             
                 *
         
     | 
| 
       1813 
1735 
     | 
    
         
             
                 * @example
         
     | 
| 
       1814 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 1736 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1815 
1737 
     | 
    
         
             
                 * const aHandle = await page.evaluate('1 + 2');
         
     | 
| 
       1816 
1738 
     | 
    
         
             
                 * ```
         
     | 
| 
       1817 
1739 
     | 
    
         
             
                 *
         
     | 
| 
       1818 
1740 
     | 
    
         
             
                 * To get the best TypeScript experience, you should pass in as the
         
     | 
| 
       1819 
1741 
     | 
    
         
             
                 * generic the type of `pageFunction`:
         
     | 
| 
       1820 
1742 
     | 
    
         
             
                 *
         
     | 
| 
       1821 
     | 
    
         
            -
                 * ```
         
     | 
| 
       1822 
     | 
    
         
            -
                 * const aHandle = await page.evaluate 
     | 
| 
      
 1743 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
      
 1744 
     | 
    
         
            +
                 * const aHandle = await page.evaluate(() => 2);
         
     | 
| 
       1823 
1745 
     | 
    
         
             
                 * ```
         
     | 
| 
       1824 
1746 
     | 
    
         
             
                 *
         
     | 
| 
       1825 
1747 
     | 
    
         
             
                 * @example
         
     | 
| 
         @@ -1827,7 +1749,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1827 
1749 
     | 
    
         
             
                 * {@link ElementHandle} instances (including {@link JSHandle}s) can be passed
         
     | 
| 
       1828 
1750 
     | 
    
         
             
                 * as arguments to the `pageFunction`:
         
     | 
| 
       1829 
1751 
     | 
    
         
             
                 *
         
     | 
| 
       1830 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 1752 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1831 
1753 
     | 
    
         
             
                 * const bodyHandle = await page.$('body');
         
     | 
| 
       1832 
1754 
     | 
    
         
             
                 * const html = await page.evaluate(body => body.innerHTML, bodyHandle);
         
     | 
| 
       1833 
1755 
     | 
    
         
             
                 * await bodyHandle.dispose();
         
     | 
| 
         @@ -1839,7 +1761,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1839 
1761 
     | 
    
         
             
                 * @returns the return value of `pageFunction`.
         
     | 
| 
       1840 
1762 
     | 
    
         
             
                 */
         
     | 
| 
       1841 
1763 
     | 
    
         
             
                async evaluate(pageFunction, ...args) {
         
     | 
| 
       1842 
     | 
    
         
            -
                    return this. 
     | 
| 
      
 1764 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_frameManager, "f").mainFrame().evaluate(pageFunction, ...args);
         
     | 
| 
       1843 
1765 
     | 
    
         
             
                }
         
     | 
| 
       1844 
1766 
     | 
    
         
             
                /**
         
     | 
| 
       1845 
1767 
     | 
    
         
             
                 * Adds a function which would be invoked in one of the following scenarios:
         
     | 
| 
         @@ -1856,7 +1778,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1856 
1778 
     | 
    
         
             
                 * @param args - Arguments to pass to `pageFunction`
         
     | 
| 
       1857 
1779 
     | 
    
         
             
                 * @example
         
     | 
| 
       1858 
1780 
     | 
    
         
             
                 * An example of overriding the navigator.languages property before the page loads:
         
     | 
| 
       1859 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 1781 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       1860 
1782 
     | 
    
         
             
                 * // preload.js
         
     | 
| 
       1861 
1783 
     | 
    
         
             
                 *
         
     | 
| 
       1862 
1784 
     | 
    
         
             
                 * // overwrite the `languages` property to use a custom getter
         
     | 
| 
         @@ -1873,8 +1795,8 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1873 
1795 
     | 
    
         
             
                 * ```
         
     | 
| 
       1874 
1796 
     | 
    
         
             
                 */
         
     | 
| 
       1875 
1797 
     | 
    
         
             
                async evaluateOnNewDocument(pageFunction, ...args) {
         
     | 
| 
       1876 
     | 
    
         
            -
                    const source =  
     | 
| 
       1877 
     | 
    
         
            -
                    await this. 
     | 
| 
      
 1798 
     | 
    
         
            +
                    const source = evaluationString(pageFunction, ...args);
         
     | 
| 
      
 1799 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_client, "f").send('Page.addScriptToEvaluateOnNewDocument', {
         
     | 
| 
       1878 
1800 
     | 
    
         
             
                        source,
         
     | 
| 
       1879 
1801 
     | 
    
         
             
                    });
         
     | 
| 
       1880 
1802 
     | 
    
         
             
                }
         
     | 
| 
         @@ -1884,7 +1806,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1884 
1806 
     | 
    
         
             
                 * @param enabled - sets the `enabled` state of cache
         
     | 
| 
       1885 
1807 
     | 
    
         
             
                 */
         
     | 
| 
       1886 
1808 
     | 
    
         
             
                async setCacheEnabled(enabled = true) {
         
     | 
| 
       1887 
     | 
    
         
            -
                    await this. 
     | 
| 
      
 1809 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_frameManager, "f").networkManager().setCacheEnabled(enabled);
         
     | 
| 
       1888 
1810 
     | 
    
         
             
                }
         
     | 
| 
       1889 
1811 
     | 
    
         
             
                /**
         
     | 
| 
       1890 
1812 
     | 
    
         
             
                 * @remarks
         
     | 
| 
         @@ -1904,7 +1826,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1904 
1826 
     | 
    
         
             
                 *   applicable to `png` images.
         
     | 
| 
       1905 
1827 
     | 
    
         
             
                 *
         
     | 
| 
       1906 
1828 
     | 
    
         
             
                 * - `fullPage` : When true, takes a screenshot of the full
         
     | 
| 
       1907 
     | 
    
         
            -
                 *   scrollable page. Defaults to `false 
     | 
| 
      
 1829 
     | 
    
         
            +
                 *   scrollable page. Defaults to `false`.
         
     | 
| 
       1908 
1830 
     | 
    
         
             
                 *
         
     | 
| 
       1909 
1831 
     | 
    
         
             
                 * - `clip` : An object which specifies clipping region of the page.
         
     | 
| 
       1910 
1832 
     | 
    
         
             
                 *   Should have the following fields:<br/>
         
     | 
| 
         @@ -1914,11 +1836,21 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1914 
1836 
     | 
    
         
             
                 *  - `height` : height of clipping area.
         
     | 
| 
       1915 
1837 
     | 
    
         
             
                 *
         
     | 
| 
       1916 
1838 
     | 
    
         
             
                 * - `omitBackground` : Hides default white background and allows
         
     | 
| 
       1917 
     | 
    
         
            -
                 *   capturing screenshots with transparency. Defaults to `false 
     | 
| 
      
 1839 
     | 
    
         
            +
                 *   capturing screenshots with transparency. Defaults to `false`.
         
     | 
| 
       1918 
1840 
     | 
    
         
             
                 *
         
     | 
| 
       1919 
1841 
     | 
    
         
             
                 * - `encoding` : The encoding of the image, can be either base64 or
         
     | 
| 
       1920 
1842 
     | 
    
         
             
                 *   binary. Defaults to `binary`.
         
     | 
| 
       1921 
1843 
     | 
    
         
             
                 *
         
     | 
| 
      
 1844 
     | 
    
         
            +
                 * - `captureBeyondViewport` : When true, captures screenshot
         
     | 
| 
      
 1845 
     | 
    
         
            +
                 *   {@link https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureScreenshot
         
     | 
| 
      
 1846 
     | 
    
         
            +
                 *   | beyond the viewport}. When false, falls back to old behaviour,
         
     | 
| 
      
 1847 
     | 
    
         
            +
                 *   and cuts the screenshot by the viewport size. Defaults to `true`.
         
     | 
| 
      
 1848 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1849 
     | 
    
         
            +
                 * - `fromSurface` : When true, captures screenshot
         
     | 
| 
      
 1850 
     | 
    
         
            +
                 *   {@link https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureScreenshot
         
     | 
| 
      
 1851 
     | 
    
         
            +
                 *   | from the surface rather than the view}. When false, works only in
         
     | 
| 
      
 1852 
     | 
    
         
            +
                 *   headful mode and ignores page viewport (but not browser window's
         
     | 
| 
      
 1853 
     | 
    
         
            +
                 *   bounds). Defaults to `true`.
         
     | 
| 
       1922 
1854 
     | 
    
         
             
                 *
         
     | 
| 
       1923 
1855 
     | 
    
         
             
                 * NOTE: Screenshots take at least 1/6 second on OS X. See
         
     | 
| 
       1924 
1856 
     | 
    
         
             
                 * {@link https://crbug.com/741689} for discussion.
         
     | 
| 
         @@ -1926,34 +1858,37 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1926 
1858 
     | 
    
         
             
                 * the value of `encoding`) with captured screenshot.
         
     | 
| 
       1927 
1859 
     | 
    
         
             
                 */
         
     | 
| 
       1928 
1860 
     | 
    
         
             
                async screenshot(options = {}) {
         
     | 
| 
       1929 
     | 
    
         
            -
                    let screenshotType =  
     | 
| 
      
 1861 
     | 
    
         
            +
                    let screenshotType = "png" /* Protocol.Page.CaptureScreenshotRequestFormat.Png */;
         
     | 
| 
       1930 
1862 
     | 
    
         
             
                    // options.type takes precedence over inferring the type from options.path
         
     | 
| 
       1931 
1863 
     | 
    
         
             
                    // because it may be a 0-length file with no extension created beforehand
         
     | 
| 
       1932 
1864 
     | 
    
         
             
                    // (i.e. as a temp file).
         
     | 
| 
       1933 
1865 
     | 
    
         
             
                    if (options.type) {
         
     | 
| 
       1934 
     | 
    
         
            -
                         
     | 
| 
       1935 
     | 
    
         
            -
             
     | 
| 
       1936 
     | 
    
         
            -
                            assertNever(type, 'Unknown options.type value: ' + type);
         
     | 
| 
       1937 
     | 
    
         
            -
                        }
         
     | 
| 
       1938 
     | 
    
         
            -
                        screenshotType = options.type;
         
     | 
| 
      
 1866 
     | 
    
         
            +
                        screenshotType =
         
     | 
| 
      
 1867 
     | 
    
         
            +
                            options.type;
         
     | 
| 
       1939 
1868 
     | 
    
         
             
                    }
         
     | 
| 
       1940 
1869 
     | 
    
         
             
                    else if (options.path) {
         
     | 
| 
       1941 
1870 
     | 
    
         
             
                        const filePath = options.path;
         
     | 
| 
       1942 
1871 
     | 
    
         
             
                        const extension = filePath
         
     | 
| 
       1943 
1872 
     | 
    
         
             
                            .slice(filePath.lastIndexOf('.') + 1)
         
     | 
| 
       1944 
1873 
     | 
    
         
             
                            .toLowerCase();
         
     | 
| 
       1945 
     | 
    
         
            -
                         
     | 
| 
       1946 
     | 
    
         
            -
                             
     | 
| 
       1947 
     | 
    
         
            -
             
     | 
| 
       1948 
     | 
    
         
            -
             
     | 
| 
       1949 
     | 
    
         
            -
             
     | 
| 
       1950 
     | 
    
         
            -
                             
     | 
| 
       1951 
     | 
    
         
            -
             
     | 
| 
      
 1874 
     | 
    
         
            +
                        switch (extension) {
         
     | 
| 
      
 1875 
     | 
    
         
            +
                            case 'png':
         
     | 
| 
      
 1876 
     | 
    
         
            +
                                screenshotType = "png" /* Protocol.Page.CaptureScreenshotRequestFormat.Png */;
         
     | 
| 
      
 1877 
     | 
    
         
            +
                                break;
         
     | 
| 
      
 1878 
     | 
    
         
            +
                            case 'jpeg':
         
     | 
| 
      
 1879 
     | 
    
         
            +
                            case 'jpg':
         
     | 
| 
      
 1880 
     | 
    
         
            +
                                screenshotType = "jpeg" /* Protocol.Page.CaptureScreenshotRequestFormat.Jpeg */;
         
     | 
| 
      
 1881 
     | 
    
         
            +
                                break;
         
     | 
| 
      
 1882 
     | 
    
         
            +
                            case 'webp':
         
     | 
| 
      
 1883 
     | 
    
         
            +
                                screenshotType = "webp" /* Protocol.Page.CaptureScreenshotRequestFormat.Webp */;
         
     | 
| 
      
 1884 
     | 
    
         
            +
                                break;
         
     | 
| 
      
 1885 
     | 
    
         
            +
                            default:
         
     | 
| 
      
 1886 
     | 
    
         
            +
                                throw new Error(`Unsupported screenshot type for extension \`.${extension}\``);
         
     | 
| 
      
 1887 
     | 
    
         
            +
                        }
         
     | 
| 
       1952 
1888 
     | 
    
         
             
                    }
         
     | 
| 
       1953 
     | 
    
         
            -
                    if (!screenshotType)
         
     | 
| 
       1954 
     | 
    
         
            -
                        screenshotType = 'png';
         
     | 
| 
       1955 
1889 
     | 
    
         
             
                    if (options.quality) {
         
     | 
| 
       1956 
     | 
    
         
            -
                        assert(screenshotType ===  
     | 
| 
      
 1890 
     | 
    
         
            +
                        assert(screenshotType === "jpeg" /* Protocol.Page.CaptureScreenshotRequestFormat.Jpeg */ ||
         
     | 
| 
      
 1891 
     | 
    
         
            +
                            screenshotType === "webp" /* Protocol.Page.CaptureScreenshotRequestFormat.Webp */, 'options.quality is unsupported for the ' +
         
     | 
| 
       1957 
1892 
     | 
    
         
             
                            screenshotType +
         
     | 
| 
       1958 
1893 
     | 
    
         
             
                            ' screenshots');
         
     | 
| 
       1959 
1894 
     | 
    
         
             
                        assert(typeof options.quality === 'number', 'Expected options.quality to be a number but found ' +
         
     | 
| 
         @@ -1975,69 +1910,9 @@ export class Page extends EventEmitter { 
     | 
|
| 
       1975 
1910 
     | 
    
         
             
                        assert(options.clip.width !== 0, 'Expected options.clip.width not to be 0.');
         
     | 
| 
       1976 
1911 
     | 
    
         
             
                        assert(options.clip.height !== 0, 'Expected options.clip.height not to be 0.');
         
     | 
| 
       1977 
1912 
     | 
    
         
             
                    }
         
     | 
| 
       1978 
     | 
    
         
            -
                    return this. 
     | 
| 
       1979 
     | 
    
         
            -
             
     | 
| 
       1980 
     | 
    
         
            -
                async _screenshotTask(format, options) {
         
     | 
| 
       1981 
     | 
    
         
            -
                    await this._client.send('Target.activateTarget', {
         
     | 
| 
       1982 
     | 
    
         
            -
                        targetId: this._target._targetId,
         
     | 
| 
       1983 
     | 
    
         
            -
                    });
         
     | 
| 
       1984 
     | 
    
         
            -
                    let clip = options.clip ? processClip(options.clip) : undefined;
         
     | 
| 
       1985 
     | 
    
         
            -
                    let { captureBeyondViewport = true } = options;
         
     | 
| 
       1986 
     | 
    
         
            -
                    captureBeyondViewport =
         
     | 
| 
       1987 
     | 
    
         
            -
                        typeof captureBeyondViewport === 'boolean' ? captureBeyondViewport : true;
         
     | 
| 
       1988 
     | 
    
         
            -
                    if (options.fullPage) {
         
     | 
| 
       1989 
     | 
    
         
            -
                        const metrics = await this._client.send('Page.getLayoutMetrics');
         
     | 
| 
       1990 
     | 
    
         
            -
                        // Fallback to `contentSize` in case of using Firefox.
         
     | 
| 
       1991 
     | 
    
         
            -
                        const { width, height } = metrics.cssContentSize || metrics.contentSize;
         
     | 
| 
       1992 
     | 
    
         
            -
                        // Overwrite clip for full page.
         
     | 
| 
       1993 
     | 
    
         
            -
                        clip = { x: 0, y: 0, width, height, scale: 1 };
         
     | 
| 
       1994 
     | 
    
         
            -
                        if (!captureBeyondViewport) {
         
     | 
| 
       1995 
     | 
    
         
            -
                            const { isMobile = false, deviceScaleFactor = 1, isLandscape = false, } = this._viewport || {};
         
     | 
| 
       1996 
     | 
    
         
            -
                            const screenOrientation = isLandscape
         
     | 
| 
       1997 
     | 
    
         
            -
                                ? { angle: 90, type: 'landscapePrimary' }
         
     | 
| 
       1998 
     | 
    
         
            -
                                : { angle: 0, type: 'portraitPrimary' };
         
     | 
| 
       1999 
     | 
    
         
            -
                            await this._client.send('Emulation.setDeviceMetricsOverride', {
         
     | 
| 
       2000 
     | 
    
         
            -
                                mobile: isMobile,
         
     | 
| 
       2001 
     | 
    
         
            -
                                width,
         
     | 
| 
       2002 
     | 
    
         
            -
                                height,
         
     | 
| 
       2003 
     | 
    
         
            -
                                deviceScaleFactor,
         
     | 
| 
       2004 
     | 
    
         
            -
                                screenOrientation,
         
     | 
| 
       2005 
     | 
    
         
            -
                            });
         
     | 
| 
       2006 
     | 
    
         
            -
                        }
         
     | 
| 
       2007 
     | 
    
         
            -
                    }
         
     | 
| 
       2008 
     | 
    
         
            -
                    const shouldSetDefaultBackground = options.omitBackground && (format === 'png' || format === 'webp');
         
     | 
| 
       2009 
     | 
    
         
            -
                    if (shouldSetDefaultBackground) {
         
     | 
| 
       2010 
     | 
    
         
            -
                        await this._setTransparentBackgroundColor();
         
     | 
| 
       2011 
     | 
    
         
            -
                    }
         
     | 
| 
       2012 
     | 
    
         
            -
                    const result = await this._client.send('Page.captureScreenshot', {
         
     | 
| 
       2013 
     | 
    
         
            -
                        format,
         
     | 
| 
       2014 
     | 
    
         
            -
                        quality: options.quality,
         
     | 
| 
       2015 
     | 
    
         
            -
                        clip,
         
     | 
| 
       2016 
     | 
    
         
            -
                        captureBeyondViewport,
         
     | 
| 
      
 1913 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_screenshotTaskQueue, "f").postTask(() => {
         
     | 
| 
      
 1914 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_instances, "m", _Page_screenshotTask).call(this, screenshotType, options);
         
     | 
| 
       2017 
1915 
     | 
    
         
             
                    });
         
     | 
| 
       2018 
     | 
    
         
            -
                    if (shouldSetDefaultBackground) {
         
     | 
| 
       2019 
     | 
    
         
            -
                        await this._resetDefaultBackgroundColor();
         
     | 
| 
       2020 
     | 
    
         
            -
                    }
         
     | 
| 
       2021 
     | 
    
         
            -
                    if (options.fullPage && this._viewport)
         
     | 
| 
       2022 
     | 
    
         
            -
                        await this.setViewport(this._viewport);
         
     | 
| 
       2023 
     | 
    
         
            -
                    const buffer = options.encoding === 'base64'
         
     | 
| 
       2024 
     | 
    
         
            -
                        ? result.data
         
     | 
| 
       2025 
     | 
    
         
            -
                        : Buffer.from(result.data, 'base64');
         
     | 
| 
       2026 
     | 
    
         
            -
                    if (options.path) {
         
     | 
| 
       2027 
     | 
    
         
            -
                        if (!isNode) {
         
     | 
| 
       2028 
     | 
    
         
            -
                            throw new Error('Screenshots can only be written to a file path in a Node environment.');
         
     | 
| 
       2029 
     | 
    
         
            -
                        }
         
     | 
| 
       2030 
     | 
    
         
            -
                        const fs = await helper.importFSModule();
         
     | 
| 
       2031 
     | 
    
         
            -
                        await fs.promises.writeFile(options.path, buffer);
         
     | 
| 
       2032 
     | 
    
         
            -
                    }
         
     | 
| 
       2033 
     | 
    
         
            -
                    return buffer;
         
     | 
| 
       2034 
     | 
    
         
            -
                    function processClip(clip) {
         
     | 
| 
       2035 
     | 
    
         
            -
                        const x = Math.round(clip.x);
         
     | 
| 
       2036 
     | 
    
         
            -
                        const y = Math.round(clip.y);
         
     | 
| 
       2037 
     | 
    
         
            -
                        const width = Math.round(clip.width + clip.x - x);
         
     | 
| 
       2038 
     | 
    
         
            -
                        const height = Math.round(clip.height + clip.y - y);
         
     | 
| 
       2039 
     | 
    
         
            -
                        return { x, y, width, height, scale: 1 };
         
     | 
| 
       2040 
     | 
    
         
            -
                    }
         
     | 
| 
       2041 
1916 
     | 
    
         
             
                }
         
     | 
| 
       2042 
1917 
     | 
    
         
             
                /**
         
     | 
| 
       2043 
1918 
     | 
    
         
             
                 * Generates a PDF of the page with the `print` CSS media type.
         
     | 
| 
         @@ -2062,7 +1937,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2062 
1937 
     | 
    
         
             
                    let paperWidth = 8.5;
         
     | 
| 
       2063 
1938 
     | 
    
         
             
                    let paperHeight = 11;
         
     | 
| 
       2064 
1939 
     | 
    
         
             
                    if (options.format) {
         
     | 
| 
       2065 
     | 
    
         
            -
                        const format =  
     | 
| 
      
 1940 
     | 
    
         
            +
                        const format = _paperFormats[options.format.toLowerCase()];
         
     | 
| 
       2066 
1941 
     | 
    
         
             
                        assert(format, 'Unknown paper format: ' + options.format);
         
     | 
| 
       2067 
1942 
     | 
    
         
             
                        paperWidth = format.width;
         
     | 
| 
       2068 
1943 
     | 
    
         
             
                        paperHeight = format.height;
         
     | 
| 
         @@ -2077,9 +1952,9 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2077 
1952 
     | 
    
         
             
                    const marginBottom = convertPrintParameterToInches(margin.bottom) || 0;
         
     | 
| 
       2078 
1953 
     | 
    
         
             
                    const marginRight = convertPrintParameterToInches(margin.right) || 0;
         
     | 
| 
       2079 
1954 
     | 
    
         
             
                    if (omitBackground) {
         
     | 
| 
       2080 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 1955 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_instances, "m", _Page_setTransparentBackgroundColor).call(this);
         
     | 
| 
       2081 
1956 
     | 
    
         
             
                    }
         
     | 
| 
       2082 
     | 
    
         
            -
                    const printCommandPromise = this. 
     | 
| 
      
 1957 
     | 
    
         
            +
                    const printCommandPromise = __classPrivateFieldGet(this, _Page_client, "f").send('Page.printToPDF', {
         
     | 
| 
       2083 
1958 
     | 
    
         
             
                        transferMode: 'ReturnAsStream',
         
     | 
| 
       2084 
1959 
     | 
    
         
             
                        landscape,
         
     | 
| 
       2085 
1960 
     | 
    
         
             
                        displayHeaderFooter,
         
     | 
| 
         @@ -2096,11 +1971,12 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2096 
1971 
     | 
    
         
             
                        pageRanges,
         
     | 
| 
       2097 
1972 
     | 
    
         
             
                        preferCSSPageSize,
         
     | 
| 
       2098 
1973 
     | 
    
         
             
                    });
         
     | 
| 
       2099 
     | 
    
         
            -
                    const result = await  
     | 
| 
      
 1974 
     | 
    
         
            +
                    const result = await waitWithTimeout(printCommandPromise, 'Page.printToPDF', timeout);
         
     | 
| 
       2100 
1975 
     | 
    
         
             
                    if (omitBackground) {
         
     | 
| 
       2101 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 1976 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_instances, "m", _Page_resetDefaultBackgroundColor).call(this);
         
     | 
| 
       2102 
1977 
     | 
    
         
             
                    }
         
     | 
| 
       2103 
     | 
    
         
            -
                     
     | 
| 
      
 1978 
     | 
    
         
            +
                    assert(result.stream, '`stream` is missing from `Page.printToPDF');
         
     | 
| 
      
 1979 
     | 
    
         
            +
                    return getReadableFromProtocolStream(__classPrivateFieldGet(this, _Page_client, "f"), result.stream);
         
     | 
| 
       2104 
1980 
     | 
    
         
             
                }
         
     | 
| 
       2105 
1981 
     | 
    
         
             
                /**
         
     | 
| 
       2106 
1982 
     | 
    
         
             
                 * @param options -
         
     | 
| 
         @@ -2109,7 +1985,9 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2109 
1985 
     | 
    
         
             
                async pdf(options = {}) {
         
     | 
| 
       2110 
1986 
     | 
    
         
             
                    const { path = undefined } = options;
         
     | 
| 
       2111 
1987 
     | 
    
         
             
                    const readable = await this.createPDFStream(options);
         
     | 
| 
       2112 
     | 
    
         
            -
                     
     | 
| 
      
 1988 
     | 
    
         
            +
                    const buffer = await getReadableAsBuffer(readable, path);
         
     | 
| 
      
 1989 
     | 
    
         
            +
                    assert(buffer, 'Could not create buffer');
         
     | 
| 
      
 1990 
     | 
    
         
            +
                    return buffer;
         
     | 
| 
       2113 
1991 
     | 
    
         
             
                }
         
     | 
| 
       2114 
1992 
     | 
    
         
             
                /**
         
     | 
| 
       2115 
1993 
     | 
    
         
             
                 * @returns The page's title
         
     | 
| 
         @@ -2120,16 +1998,17 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2120 
1998 
     | 
    
         
             
                    return this.mainFrame().title();
         
     | 
| 
       2121 
1999 
     | 
    
         
             
                }
         
     | 
| 
       2122 
2000 
     | 
    
         
             
                async close(options = { runBeforeUnload: undefined }) {
         
     | 
| 
       2123 
     | 
    
         
            -
                     
     | 
| 
      
 2001 
     | 
    
         
            +
                    const connection = __classPrivateFieldGet(this, _Page_client, "f").connection();
         
     | 
| 
      
 2002 
     | 
    
         
            +
                    assert(connection, 'Protocol error: Connection closed. Most likely the page has been closed.');
         
     | 
| 
       2124 
2003 
     | 
    
         
             
                    const runBeforeUnload = !!options.runBeforeUnload;
         
     | 
| 
       2125 
2004 
     | 
    
         
             
                    if (runBeforeUnload) {
         
     | 
| 
       2126 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 2005 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Page.close');
         
     | 
| 
       2127 
2006 
     | 
    
         
             
                    }
         
     | 
| 
       2128 
2007 
     | 
    
         
             
                    else {
         
     | 
| 
       2129 
     | 
    
         
            -
                        await  
     | 
| 
       2130 
     | 
    
         
            -
                            targetId: this. 
     | 
| 
      
 2008 
     | 
    
         
            +
                        await connection.send('Target.closeTarget', {
         
     | 
| 
      
 2009 
     | 
    
         
            +
                            targetId: __classPrivateFieldGet(this, _Page_target, "f")._targetId,
         
     | 
| 
       2131 
2010 
     | 
    
         
             
                        });
         
     | 
| 
       2132 
     | 
    
         
            -
                        await this. 
     | 
| 
      
 2011 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_target, "f")._isClosedPromise;
         
     | 
| 
       2133 
2012 
     | 
    
         
             
                    }
         
     | 
| 
       2134 
2013 
     | 
    
         
             
                }
         
     | 
| 
       2135 
2014 
     | 
    
         
             
                /**
         
     | 
| 
         @@ -2137,10 +2016,10 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2137 
2016 
     | 
    
         
             
                 * @returns
         
     | 
| 
       2138 
2017 
     | 
    
         
             
                 */
         
     | 
| 
       2139 
2018 
     | 
    
         
             
                isClosed() {
         
     | 
| 
       2140 
     | 
    
         
            -
                    return this 
     | 
| 
      
 2019 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_closed, "f");
         
     | 
| 
       2141 
2020 
     | 
    
         
             
                }
         
     | 
| 
       2142 
2021 
     | 
    
         
             
                get mouse() {
         
     | 
| 
       2143 
     | 
    
         
            -
                    return this 
     | 
| 
      
 2022 
     | 
    
         
            +
                    return __classPrivateFieldGet(this, _Page_mouse, "f");
         
     | 
| 
       2144 
2023 
     | 
    
         
             
                }
         
     | 
| 
       2145 
2024 
     | 
    
         
             
                /**
         
     | 
| 
       2146 
2025 
     | 
    
         
             
                 * This method fetches an element with `selector`, scrolls it into view if
         
     | 
| 
         @@ -2151,7 +2030,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2151 
2030 
     | 
    
         
             
                 * there's a separate `page.waitForNavigation()` promise to be resolved, you
         
     | 
| 
       2152 
2031 
     | 
    
         
             
                 * may end up with a race condition that yields unexpected results. The
         
     | 
| 
       2153 
2032 
     | 
    
         
             
                 * correct pattern for click and wait for navigation is the following:
         
     | 
| 
       2154 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 2033 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2155 
2034 
     | 
    
         
             
                 * const [response] = await Promise.all([
         
     | 
| 
       2156 
2035 
     | 
    
         
             
                 * page.waitForNavigation(waitOptions),
         
     | 
| 
       2157 
2036 
     | 
    
         
             
                 * page.click(selector, clickOptions),
         
     | 
| 
         @@ -2207,7 +2086,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2207 
2086 
     | 
    
         
             
                 * throws an error.
         
     | 
| 
       2208 
2087 
     | 
    
         
             
                 *
         
     | 
| 
       2209 
2088 
     | 
    
         
             
                 * @example
         
     | 
| 
       2210 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 2089 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2211 
2090 
     | 
    
         
             
                 * page.select('select#colors', 'blue'); // single selection
         
     | 
| 
       2212 
2091 
     | 
    
         
             
                 * page.select('select#colors', 'red', 'green', 'blue'); // multiple selections
         
     | 
| 
       2213 
2092 
     | 
    
         
             
                 * ```
         
     | 
| 
         @@ -2246,7 +2125,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2246 
2125 
     | 
    
         
             
                 *
         
     | 
| 
       2247 
2126 
     | 
    
         
             
                 * To press a special key, like `Control` or `ArrowDown`, use {@link Keyboard.press}.
         
     | 
| 
       2248 
2127 
     | 
    
         
             
                 * @example
         
     | 
| 
       2249 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 2128 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2250 
2129 
     | 
    
         
             
                 * await page.type('#mytextarea', 'Hello');
         
     | 
| 
       2251 
2130 
     | 
    
         
             
                 * // Types instantly
         
     | 
| 
       2252 
2131 
     | 
    
         
             
                 * await page.type('#mytextarea', 'World', { delay: 100 });
         
     | 
| 
         @@ -2265,34 +2144,6 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2265 
2144 
     | 
    
         
             
                type(selector, text, options) {
         
     | 
| 
       2266 
2145 
     | 
    
         
             
                    return this.mainFrame().type(selector, text, options);
         
     | 
| 
       2267 
2146 
     | 
    
         
             
                }
         
     | 
| 
       2268 
     | 
    
         
            -
                /**
         
     | 
| 
       2269 
     | 
    
         
            -
                 * @remarks
         
     | 
| 
       2270 
     | 
    
         
            -
                 *
         
     | 
| 
       2271 
     | 
    
         
            -
                 * This method behaves differently depending on the first parameter. If it's a
         
     | 
| 
       2272 
     | 
    
         
            -
                 * `string`, it will be treated as a `selector` or `xpath` (if the string
         
     | 
| 
       2273 
     | 
    
         
            -
                 * starts with `//`). This method then is a shortcut for
         
     | 
| 
       2274 
     | 
    
         
            -
                 * {@link Page.waitForSelector} or {@link Page.waitForXPath}.
         
     | 
| 
       2275 
     | 
    
         
            -
                 *
         
     | 
| 
       2276 
     | 
    
         
            -
                 * If the first argument is a function this method is a shortcut for
         
     | 
| 
       2277 
     | 
    
         
            -
                 * {@link Page.waitForFunction}.
         
     | 
| 
       2278 
     | 
    
         
            -
                 *
         
     | 
| 
       2279 
     | 
    
         
            -
                 * If the first argument is a `number`, it's treated as a timeout in
         
     | 
| 
       2280 
     | 
    
         
            -
                 * milliseconds and the method returns a promise which resolves after the
         
     | 
| 
       2281 
     | 
    
         
            -
                 * timeout.
         
     | 
| 
       2282 
     | 
    
         
            -
                 *
         
     | 
| 
       2283 
     | 
    
         
            -
                 * @param selectorOrFunctionOrTimeout - a selector, predicate or timeout to
         
     | 
| 
       2284 
     | 
    
         
            -
                 * wait for.
         
     | 
| 
       2285 
     | 
    
         
            -
                 * @param options - optional waiting parameters.
         
     | 
| 
       2286 
     | 
    
         
            -
                 * @param args - arguments to pass to `pageFunction`.
         
     | 
| 
       2287 
     | 
    
         
            -
                 *
         
     | 
| 
       2288 
     | 
    
         
            -
                 * @deprecated Don't use this method directly. Instead use the more explicit
         
     | 
| 
       2289 
     | 
    
         
            -
                 * methods available: {@link Page.waitForSelector},
         
     | 
| 
       2290 
     | 
    
         
            -
                 * {@link Page.waitForXPath}, {@link Page.waitForFunction} or
         
     | 
| 
       2291 
     | 
    
         
            -
                 * {@link Page.waitForTimeout}.
         
     | 
| 
       2292 
     | 
    
         
            -
                 */
         
     | 
| 
       2293 
     | 
    
         
            -
                waitFor(selectorOrFunctionOrTimeout, options = {}, ...args) {
         
     | 
| 
       2294 
     | 
    
         
            -
                    return this.mainFrame().waitFor(selectorOrFunctionOrTimeout, options, ...args);
         
     | 
| 
       2295 
     | 
    
         
            -
                }
         
     | 
| 
       2296 
2147 
     | 
    
         
             
                /**
         
     | 
| 
       2297 
2148 
     | 
    
         
             
                 * Causes your script to wait for the given number of milliseconds.
         
     | 
| 
       2298 
2149 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -2306,7 +2157,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2306 
2157 
     | 
    
         
             
                 *
         
     | 
| 
       2307 
2158 
     | 
    
         
             
                 * Wait for 1 second:
         
     | 
| 
       2308 
2159 
     | 
    
         
             
                 *
         
     | 
| 
       2309 
     | 
    
         
            -
                 * ```
         
     | 
| 
      
 2160 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2310 
2161 
     | 
    
         
             
                 * await page.waitForTimeout(1000);
         
     | 
| 
       2311 
2162 
     | 
    
         
             
                 * ```
         
     | 
| 
       2312 
2163 
     | 
    
         
             
                 *
         
     | 
| 
         @@ -2322,7 +2173,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2322 
2173 
     | 
    
         
             
                 * function will throw.
         
     | 
| 
       2323 
2174 
     | 
    
         
             
                 *
         
     | 
| 
       2324 
2175 
     | 
    
         
             
                 * This method works across navigations:
         
     | 
| 
       2325 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 2176 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2326 
2177 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       2327 
2178 
     | 
    
         
             
                 * (async () => {
         
     | 
| 
       2328 
2179 
     | 
    
         
             
                 * const browser = await puppeteer.launch();
         
     | 
| 
         @@ -2363,8 +2214,8 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2363 
2214 
     | 
    
         
             
                 * (30 seconds). Pass `0` to disable timeout. The default value can be changed
         
     | 
| 
       2364 
2215 
     | 
    
         
             
                 * by using the {@link Page.setDefaultTimeout} method.
         
     | 
| 
       2365 
2216 
     | 
    
         
             
                 */
         
     | 
| 
       2366 
     | 
    
         
            -
                waitForSelector(selector, options = {}) {
         
     | 
| 
       2367 
     | 
    
         
            -
                    return this.mainFrame().waitForSelector(selector, options);
         
     | 
| 
      
 2217 
     | 
    
         
            +
                async waitForSelector(selector, options = {}) {
         
     | 
| 
      
 2218 
     | 
    
         
            +
                    return await this.mainFrame().waitForSelector(selector, options);
         
     | 
| 
       2368 
2219 
     | 
    
         
             
                }
         
     | 
| 
       2369 
2220 
     | 
    
         
             
                /**
         
     | 
| 
       2370 
2221 
     | 
    
         
             
                 * Wait for the `xpath` to appear in page. If at the moment of calling the
         
     | 
| 
         @@ -2373,7 +2224,7 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2373 
2224 
     | 
    
         
             
                 * function will throw.
         
     | 
| 
       2374 
2225 
     | 
    
         
             
                 *
         
     | 
| 
       2375 
2226 
     | 
    
         
             
                 * This method works across navigation
         
     | 
| 
       2376 
     | 
    
         
            -
                 * ``` 
     | 
| 
      
 2227 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2377 
2228 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       2378 
2229 
     | 
    
         
             
                 * (async () => {
         
     | 
| 
       2379 
2230 
     | 
    
         
             
                 * const browser = await puppeteer.launch();
         
     | 
| 
         @@ -2418,9 +2269,12 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2418 
2269 
     | 
    
         
             
                    return this.mainFrame().waitForXPath(xpath, options);
         
     | 
| 
       2419 
2270 
     | 
    
         
             
                }
         
     | 
| 
       2420 
2271 
     | 
    
         
             
                /**
         
     | 
| 
       2421 
     | 
    
         
            -
                 *  
     | 
| 
      
 2272 
     | 
    
         
            +
                 * Waits for a function to finish evaluating in the page's context.
         
     | 
| 
       2422 
2273 
     | 
    
         
             
                 *
         
     | 
| 
       2423 
     | 
    
         
            -
                 *  
     | 
| 
      
 2274 
     | 
    
         
            +
                 * @example
         
     | 
| 
      
 2275 
     | 
    
         
            +
                 * The {@link Page.waitForFunction} can be used to observe viewport size change:
         
     | 
| 
      
 2276 
     | 
    
         
            +
                 *
         
     | 
| 
      
 2277 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2424 
2278 
     | 
    
         
             
                 * const puppeteer = require('puppeteer');
         
     | 
| 
       2425 
2279 
     | 
    
         
             
                 * (async () => {
         
     | 
| 
       2426 
2280 
     | 
    
         
             
                 * const browser = await puppeteer.launch();
         
     | 
| 
         @@ -2431,8 +2285,11 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2431 
2285 
     | 
    
         
             
                 * await browser.close();
         
     | 
| 
       2432 
2286 
     | 
    
         
             
                 * })();
         
     | 
| 
       2433 
2287 
     | 
    
         
             
                 * ```
         
     | 
| 
       2434 
     | 
    
         
            -
                 * 
     | 
| 
       2435 
     | 
    
         
            -
                 *  
     | 
| 
      
 2288 
     | 
    
         
            +
                 *
         
     | 
| 
      
 2289 
     | 
    
         
            +
                 * @example
         
     | 
| 
      
 2290 
     | 
    
         
            +
                 * To pass arguments from node.js to the predicate of
         
     | 
| 
      
 2291 
     | 
    
         
            +
                 * {@link Page.waitForFunction} function:
         
     | 
| 
      
 2292 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2436 
2293 
     | 
    
         
             
                 * const selector = '.foo';
         
     | 
| 
       2437 
2294 
     | 
    
         
             
                 * await page.waitForFunction(
         
     | 
| 
       2438 
2295 
     | 
    
         
             
                 * (selector) => !!document.querySelector(selector),
         
     | 
| 
         @@ -2440,8 +2297,10 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2440 
2297 
     | 
    
         
             
                 * selector
         
     | 
| 
       2441 
2298 
     | 
    
         
             
                 * );
         
     | 
| 
       2442 
2299 
     | 
    
         
             
                 * ```
         
     | 
| 
       2443 
     | 
    
         
            -
                 * 
     | 
| 
       2444 
     | 
    
         
            -
                 *  
     | 
| 
      
 2300 
     | 
    
         
            +
                 *
         
     | 
| 
      
 2301 
     | 
    
         
            +
                 * @example
         
     | 
| 
      
 2302 
     | 
    
         
            +
                 * The predicate of {@link Page.waitForFunction} can be asynchronous too:
         
     | 
| 
      
 2303 
     | 
    
         
            +
                 * ```ts
         
     | 
| 
       2445 
2304 
     | 
    
         
             
                 * const username = 'github-username';
         
     | 
| 
       2446 
2305 
     | 
    
         
             
                 * await page.waitForFunction(
         
     | 
| 
       2447 
2306 
     | 
    
         
             
                 * async (username) => {
         
     | 
| 
         @@ -2460,33 +2319,291 @@ export class Page extends EventEmitter { 
     | 
|
| 
       2460 
2319 
     | 
    
         
             
                 * username
         
     | 
| 
       2461 
2320 
     | 
    
         
             
                 * );
         
     | 
| 
       2462 
2321 
     | 
    
         
             
                 * ```
         
     | 
| 
      
 2322 
     | 
    
         
            +
                 *
         
     | 
| 
       2463 
2323 
     | 
    
         
             
                 * @param pageFunction - Function to be evaluated in browser context
         
     | 
| 
       2464 
2324 
     | 
    
         
             
                 * @param options - Optional waiting parameters
         
     | 
| 
       2465 
     | 
    
         
            -
                 *  
     | 
| 
       2466 
     | 
    
         
            -
                 *  
     | 
| 
       2467 
     | 
    
         
            -
                 * value. It resolves to a JSHandle of the truthy value.
         
     | 
| 
       2468 
     | 
    
         
            -
                 *
         
     | 
| 
       2469 
     | 
    
         
            -
                 * The optional waiting parameter can be:
         
     | 
| 
       2470 
     | 
    
         
            -
                 *
         
     | 
| 
       2471 
     | 
    
         
            -
                 * - `Polling`: An interval at which the `pageFunction` is executed, defaults to
         
     | 
| 
       2472 
     | 
    
         
            -
                 *   `raf`. If `polling` is a number, then it is treated as an interval in
         
     | 
| 
      
 2325 
     | 
    
         
            +
                 * - `polling` - An interval at which the `pageFunction` is executed, defaults
         
     | 
| 
      
 2326 
     | 
    
         
            +
                 *   to `raf`. If `polling` is a number, then it is treated as an interval in
         
     | 
| 
       2473 
2327 
     | 
    
         
             
                 *   milliseconds at which the function would be executed. If polling is a
         
     | 
| 
       2474 
     | 
    
         
            -
                 *   string, then it can be one of the following values 
     | 
| 
       2475 
     | 
    
         
            -
                 *    - `raf 
     | 
| 
       2476 
     | 
    
         
            -
                 *      callback. This is the tightest polling mode 
     | 
| 
       2477 
     | 
    
         
            -
                 *      observe styling changes 
     | 
| 
       2478 
     | 
    
         
            -
                 *    - `mutation 
     | 
| 
       2479 
     | 
    
         
            -
                 *
         
     | 
| 
       2480 
     | 
    
         
            -
                 *  
     | 
| 
       2481 
     | 
    
         
            -
                 *  
     | 
| 
       2482 
     | 
    
         
            -
                 *  
     | 
| 
       2483 
     | 
    
         
            -
                 *  
     | 
| 
       2484 
     | 
    
         
            -
                 *
         
     | 
| 
      
 2328 
     | 
    
         
            +
                 *   string, then it can be one of the following values:
         
     | 
| 
      
 2329 
     | 
    
         
            +
                 *    - `raf` - to constantly execute `pageFunction` in
         
     | 
| 
      
 2330 
     | 
    
         
            +
                 *      `requestAnimationFrame` callback. This is the tightest polling mode
         
     | 
| 
      
 2331 
     | 
    
         
            +
                 *      which is suitable to observe styling changes.
         
     | 
| 
      
 2332 
     | 
    
         
            +
                 *    - `mutation`-  to execute pageFunction on every DOM mutation.
         
     | 
| 
      
 2333 
     | 
    
         
            +
                 * - `timeout` - maximum time to wait for in milliseconds. Defaults to `30000`
         
     | 
| 
      
 2334 
     | 
    
         
            +
                 *   (30 seconds). Pass `0` to disable timeout. The default value can be
         
     | 
| 
      
 2335 
     | 
    
         
            +
                 *   changed by using the {@link Page.setDefaultTimeout} method.
         
     | 
| 
      
 2336 
     | 
    
         
            +
                 * @param args -  Arguments to pass to `pageFunction`
         
     | 
| 
      
 2337 
     | 
    
         
            +
                 * @returns A `Promise` which resolves to a JSHandle/ElementHandle of the the
         
     | 
| 
      
 2338 
     | 
    
         
            +
                 * `pageFunction`'s return value.
         
     | 
| 
       2485 
2339 
     | 
    
         
             
                 */
         
     | 
| 
       2486 
2340 
     | 
    
         
             
                waitForFunction(pageFunction, options = {}, ...args) {
         
     | 
| 
       2487 
2341 
     | 
    
         
             
                    return this.mainFrame().waitForFunction(pageFunction, options, ...args);
         
     | 
| 
       2488 
2342 
     | 
    
         
             
                }
         
     | 
| 
       2489 
2343 
     | 
    
         
             
            }
         
     | 
| 
      
 2344 
     | 
    
         
            +
            _Page_closed = new WeakMap(), _Page_client = new WeakMap(), _Page_target = new WeakMap(), _Page_keyboard = new WeakMap(), _Page_mouse = new WeakMap(), _Page_timeoutSettings = new WeakMap(), _Page_touchscreen = new WeakMap(), _Page_accessibility = new WeakMap(), _Page_frameManager = new WeakMap(), _Page_emulationManager = new WeakMap(), _Page_tracing = new WeakMap(), _Page_pageBindings = new WeakMap(), _Page_coverage = new WeakMap(), _Page_javascriptEnabled = new WeakMap(), _Page_viewport = new WeakMap(), _Page_screenshotTaskQueue = new WeakMap(), _Page_workers = new WeakMap(), _Page_fileChooserInterceptors = new WeakMap(), _Page_disconnectPromise = new WeakMap(), _Page_userDragInterceptionEnabled = new WeakMap(), _Page_handlerMap = new WeakMap(), _Page_instances = new WeakSet(), _Page_initialize = async function _Page_initialize() {
         
     | 
| 
      
 2345 
     | 
    
         
            +
                await Promise.all([
         
     | 
| 
      
 2346 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_frameManager, "f").initialize(),
         
     | 
| 
      
 2347 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_client, "f").send('Target.setAutoAttach', {
         
     | 
| 
      
 2348 
     | 
    
         
            +
                        autoAttach: true,
         
     | 
| 
      
 2349 
     | 
    
         
            +
                        waitForDebuggerOnStart: false,
         
     | 
| 
      
 2350 
     | 
    
         
            +
                        flatten: true,
         
     | 
| 
      
 2351 
     | 
    
         
            +
                    }),
         
     | 
| 
      
 2352 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_client, "f").send('Performance.enable'),
         
     | 
| 
      
 2353 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_client, "f").send('Log.enable'),
         
     | 
| 
      
 2354 
     | 
    
         
            +
                ]);
         
     | 
| 
      
 2355 
     | 
    
         
            +
            }, _Page_onFileChooser = async function _Page_onFileChooser(event) {
         
     | 
| 
      
 2356 
     | 
    
         
            +
                if (!__classPrivateFieldGet(this, _Page_fileChooserInterceptors, "f").size) {
         
     | 
| 
      
 2357 
     | 
    
         
            +
                    return;
         
     | 
| 
      
 2358 
     | 
    
         
            +
                }
         
     | 
| 
      
 2359 
     | 
    
         
            +
                const frame = __classPrivateFieldGet(this, _Page_frameManager, "f").frame(event.frameId);
         
     | 
| 
      
 2360 
     | 
    
         
            +
                assert(frame);
         
     | 
| 
      
 2361 
     | 
    
         
            +
                const context = await frame.executionContext();
         
     | 
| 
      
 2362 
     | 
    
         
            +
                const element = await context._adoptBackendNodeId(event.backendNodeId);
         
     | 
| 
      
 2363 
     | 
    
         
            +
                const interceptors = Array.from(__classPrivateFieldGet(this, _Page_fileChooserInterceptors, "f"));
         
     | 
| 
      
 2364 
     | 
    
         
            +
                __classPrivateFieldGet(this, _Page_fileChooserInterceptors, "f").clear();
         
     | 
| 
      
 2365 
     | 
    
         
            +
                const fileChooser = new FileChooser(
         
     | 
| 
      
 2366 
     | 
    
         
            +
                // This is guaranteed by the event.
         
     | 
| 
      
 2367 
     | 
    
         
            +
                element, event);
         
     | 
| 
      
 2368 
     | 
    
         
            +
                for (const interceptor of interceptors) {
         
     | 
| 
      
 2369 
     | 
    
         
            +
                    interceptor.call(undefined, fileChooser);
         
     | 
| 
      
 2370 
     | 
    
         
            +
                }
         
     | 
| 
      
 2371 
     | 
    
         
            +
            }, _Page_onTargetCrashed = function _Page_onTargetCrashed() {
         
     | 
| 
      
 2372 
     | 
    
         
            +
                this.emit('error', new Error('Page crashed!'));
         
     | 
| 
      
 2373 
     | 
    
         
            +
            }, _Page_onLogEntryAdded = function _Page_onLogEntryAdded(event) {
         
     | 
| 
      
 2374 
     | 
    
         
            +
                const { level, text, args, source, url, lineNumber } = event.entry;
         
     | 
| 
      
 2375 
     | 
    
         
            +
                if (args) {
         
     | 
| 
      
 2376 
     | 
    
         
            +
                    args.map(arg => {
         
     | 
| 
      
 2377 
     | 
    
         
            +
                        return releaseObject(__classPrivateFieldGet(this, _Page_client, "f"), arg);
         
     | 
| 
      
 2378 
     | 
    
         
            +
                    });
         
     | 
| 
      
 2379 
     | 
    
         
            +
                }
         
     | 
| 
      
 2380 
     | 
    
         
            +
                if (source !== 'worker') {
         
     | 
| 
      
 2381 
     | 
    
         
            +
                    this.emit("console" /* PageEmittedEvents.Console */, new ConsoleMessage(level, text, [], [{ url, lineNumber }]));
         
     | 
| 
      
 2382 
     | 
    
         
            +
                }
         
     | 
| 
      
 2383 
     | 
    
         
            +
            }, _Page_emitMetrics = function _Page_emitMetrics(event) {
         
     | 
| 
      
 2384 
     | 
    
         
            +
                this.emit("metrics" /* PageEmittedEvents.Metrics */, {
         
     | 
| 
      
 2385 
     | 
    
         
            +
                    title: event.title,
         
     | 
| 
      
 2386 
     | 
    
         
            +
                    metrics: __classPrivateFieldGet(this, _Page_instances, "m", _Page_buildMetricsObject).call(this, event.metrics),
         
     | 
| 
      
 2387 
     | 
    
         
            +
                });
         
     | 
| 
      
 2388 
     | 
    
         
            +
            }, _Page_buildMetricsObject = function _Page_buildMetricsObject(metrics) {
         
     | 
| 
      
 2389 
     | 
    
         
            +
                const result = {};
         
     | 
| 
      
 2390 
     | 
    
         
            +
                for (const metric of metrics || []) {
         
     | 
| 
      
 2391 
     | 
    
         
            +
                    if (supportedMetrics.has(metric.name)) {
         
     | 
| 
      
 2392 
     | 
    
         
            +
                        result[metric.name] = metric.value;
         
     | 
| 
      
 2393 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2394 
     | 
    
         
            +
                }
         
     | 
| 
      
 2395 
     | 
    
         
            +
                return result;
         
     | 
| 
      
 2396 
     | 
    
         
            +
            }, _Page_handleException = function _Page_handleException(exceptionDetails) {
         
     | 
| 
      
 2397 
     | 
    
         
            +
                const message = getExceptionMessage(exceptionDetails);
         
     | 
| 
      
 2398 
     | 
    
         
            +
                const err = new Error(message);
         
     | 
| 
      
 2399 
     | 
    
         
            +
                err.stack = ''; // Don't report clientside error with a node stack attached
         
     | 
| 
      
 2400 
     | 
    
         
            +
                this.emit("pageerror" /* PageEmittedEvents.PageError */, err);
         
     | 
| 
      
 2401 
     | 
    
         
            +
            }, _Page_onConsoleAPI = async function _Page_onConsoleAPI(event) {
         
     | 
| 
      
 2402 
     | 
    
         
            +
                if (event.executionContextId === 0) {
         
     | 
| 
      
 2403 
     | 
    
         
            +
                    // DevTools protocol stores the last 1000 console messages. These
         
     | 
| 
      
 2404 
     | 
    
         
            +
                    // messages are always reported even for removed execution contexts. In
         
     | 
| 
      
 2405 
     | 
    
         
            +
                    // this case, they are marked with executionContextId = 0 and are
         
     | 
| 
      
 2406 
     | 
    
         
            +
                    // reported upon enabling Runtime agent.
         
     | 
| 
      
 2407 
     | 
    
         
            +
                    //
         
     | 
| 
      
 2408 
     | 
    
         
            +
                    // Ignore these messages since:
         
     | 
| 
      
 2409 
     | 
    
         
            +
                    // - there's no execution context we can use to operate with message
         
     | 
| 
      
 2410 
     | 
    
         
            +
                    //   arguments
         
     | 
| 
      
 2411 
     | 
    
         
            +
                    // - these messages are reported before Puppeteer clients can subscribe
         
     | 
| 
      
 2412 
     | 
    
         
            +
                    //   to the 'console'
         
     | 
| 
      
 2413 
     | 
    
         
            +
                    //   page event.
         
     | 
| 
      
 2414 
     | 
    
         
            +
                    //
         
     | 
| 
      
 2415 
     | 
    
         
            +
                    // @see https://github.com/puppeteer/puppeteer/issues/3865
         
     | 
| 
      
 2416 
     | 
    
         
            +
                    return;
         
     | 
| 
      
 2417 
     | 
    
         
            +
                }
         
     | 
| 
      
 2418 
     | 
    
         
            +
                const context = __classPrivateFieldGet(this, _Page_frameManager, "f").executionContextById(event.executionContextId, __classPrivateFieldGet(this, _Page_client, "f"));
         
     | 
| 
      
 2419 
     | 
    
         
            +
                const values = event.args.map(arg => {
         
     | 
| 
      
 2420 
     | 
    
         
            +
                    return createJSHandle(context, arg);
         
     | 
| 
      
 2421 
     | 
    
         
            +
                });
         
     | 
| 
      
 2422 
     | 
    
         
            +
                __classPrivateFieldGet(this, _Page_instances, "m", _Page_addConsoleMessage).call(this, event.type, values, event.stackTrace);
         
     | 
| 
      
 2423 
     | 
    
         
            +
            }, _Page_onBindingCalled = async function _Page_onBindingCalled(event) {
         
     | 
| 
      
 2424 
     | 
    
         
            +
                let payload;
         
     | 
| 
      
 2425 
     | 
    
         
            +
                try {
         
     | 
| 
      
 2426 
     | 
    
         
            +
                    payload = JSON.parse(event.payload);
         
     | 
| 
      
 2427 
     | 
    
         
            +
                }
         
     | 
| 
      
 2428 
     | 
    
         
            +
                catch {
         
     | 
| 
      
 2429 
     | 
    
         
            +
                    // The binding was either called by something in the page or it was
         
     | 
| 
      
 2430 
     | 
    
         
            +
                    // called before our wrapper was initialized.
         
     | 
| 
      
 2431 
     | 
    
         
            +
                    return;
         
     | 
| 
      
 2432 
     | 
    
         
            +
                }
         
     | 
| 
      
 2433 
     | 
    
         
            +
                const { type, name, seq, args } = payload;
         
     | 
| 
      
 2434 
     | 
    
         
            +
                if (type !== 'exposedFun' || !__classPrivateFieldGet(this, _Page_pageBindings, "f").has(name)) {
         
     | 
| 
      
 2435 
     | 
    
         
            +
                    return;
         
     | 
| 
      
 2436 
     | 
    
         
            +
                }
         
     | 
| 
      
 2437 
     | 
    
         
            +
                let expression = null;
         
     | 
| 
      
 2438 
     | 
    
         
            +
                try {
         
     | 
| 
      
 2439 
     | 
    
         
            +
                    const pageBinding = __classPrivateFieldGet(this, _Page_pageBindings, "f").get(name);
         
     | 
| 
      
 2440 
     | 
    
         
            +
                    assert(pageBinding);
         
     | 
| 
      
 2441 
     | 
    
         
            +
                    const result = await pageBinding(...args);
         
     | 
| 
      
 2442 
     | 
    
         
            +
                    expression = pageBindingDeliverResultString(name, seq, result);
         
     | 
| 
      
 2443 
     | 
    
         
            +
                }
         
     | 
| 
      
 2444 
     | 
    
         
            +
                catch (error) {
         
     | 
| 
      
 2445 
     | 
    
         
            +
                    if (isErrorLike(error)) {
         
     | 
| 
      
 2446 
     | 
    
         
            +
                        expression = pageBindingDeliverErrorString(name, seq, error.message, error.stack);
         
     | 
| 
      
 2447 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2448 
     | 
    
         
            +
                    else {
         
     | 
| 
      
 2449 
     | 
    
         
            +
                        expression = pageBindingDeliverErrorValueString(name, seq, error);
         
     | 
| 
      
 2450 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2451 
     | 
    
         
            +
                }
         
     | 
| 
      
 2452 
     | 
    
         
            +
                __classPrivateFieldGet(this, _Page_client, "f")
         
     | 
| 
      
 2453 
     | 
    
         
            +
                    .send('Runtime.evaluate', {
         
     | 
| 
      
 2454 
     | 
    
         
            +
                    expression,
         
     | 
| 
      
 2455 
     | 
    
         
            +
                    contextId: event.executionContextId,
         
     | 
| 
      
 2456 
     | 
    
         
            +
                })
         
     | 
| 
      
 2457 
     | 
    
         
            +
                    .catch(debugError);
         
     | 
| 
      
 2458 
     | 
    
         
            +
            }, _Page_addConsoleMessage = function _Page_addConsoleMessage(eventType, args, stackTrace) {
         
     | 
| 
      
 2459 
     | 
    
         
            +
                if (!this.listenerCount("console" /* PageEmittedEvents.Console */)) {
         
     | 
| 
      
 2460 
     | 
    
         
            +
                    args.forEach(arg => {
         
     | 
| 
      
 2461 
     | 
    
         
            +
                        return arg.dispose();
         
     | 
| 
      
 2462 
     | 
    
         
            +
                    });
         
     | 
| 
      
 2463 
     | 
    
         
            +
                    return;
         
     | 
| 
      
 2464 
     | 
    
         
            +
                }
         
     | 
| 
      
 2465 
     | 
    
         
            +
                const textTokens = [];
         
     | 
| 
      
 2466 
     | 
    
         
            +
                for (const arg of args) {
         
     | 
| 
      
 2467 
     | 
    
         
            +
                    const remoteObject = arg._remoteObject;
         
     | 
| 
      
 2468 
     | 
    
         
            +
                    if (remoteObject.objectId) {
         
     | 
| 
      
 2469 
     | 
    
         
            +
                        textTokens.push(arg.toString());
         
     | 
| 
      
 2470 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2471 
     | 
    
         
            +
                    else {
         
     | 
| 
      
 2472 
     | 
    
         
            +
                        textTokens.push(valueFromRemoteObject(remoteObject));
         
     | 
| 
      
 2473 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2474 
     | 
    
         
            +
                }
         
     | 
| 
      
 2475 
     | 
    
         
            +
                const stackTraceLocations = [];
         
     | 
| 
      
 2476 
     | 
    
         
            +
                if (stackTrace) {
         
     | 
| 
      
 2477 
     | 
    
         
            +
                    for (const callFrame of stackTrace.callFrames) {
         
     | 
| 
      
 2478 
     | 
    
         
            +
                        stackTraceLocations.push({
         
     | 
| 
      
 2479 
     | 
    
         
            +
                            url: callFrame.url,
         
     | 
| 
      
 2480 
     | 
    
         
            +
                            lineNumber: callFrame.lineNumber,
         
     | 
| 
      
 2481 
     | 
    
         
            +
                            columnNumber: callFrame.columnNumber,
         
     | 
| 
      
 2482 
     | 
    
         
            +
                        });
         
     | 
| 
      
 2483 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2484 
     | 
    
         
            +
                }
         
     | 
| 
      
 2485 
     | 
    
         
            +
                const message = new ConsoleMessage(eventType, textTokens.join(' '), args, stackTraceLocations);
         
     | 
| 
      
 2486 
     | 
    
         
            +
                this.emit("console" /* PageEmittedEvents.Console */, message);
         
     | 
| 
      
 2487 
     | 
    
         
            +
            }, _Page_onDialog = function _Page_onDialog(event) {
         
     | 
| 
      
 2488 
     | 
    
         
            +
                let dialogType = null;
         
     | 
| 
      
 2489 
     | 
    
         
            +
                const validDialogTypes = new Set([
         
     | 
| 
      
 2490 
     | 
    
         
            +
                    'alert',
         
     | 
| 
      
 2491 
     | 
    
         
            +
                    'confirm',
         
     | 
| 
      
 2492 
     | 
    
         
            +
                    'prompt',
         
     | 
| 
      
 2493 
     | 
    
         
            +
                    'beforeunload',
         
     | 
| 
      
 2494 
     | 
    
         
            +
                ]);
         
     | 
| 
      
 2495 
     | 
    
         
            +
                if (validDialogTypes.has(event.type)) {
         
     | 
| 
      
 2496 
     | 
    
         
            +
                    dialogType = event.type;
         
     | 
| 
      
 2497 
     | 
    
         
            +
                }
         
     | 
| 
      
 2498 
     | 
    
         
            +
                assert(dialogType, 'Unknown javascript dialog type: ' + event.type);
         
     | 
| 
      
 2499 
     | 
    
         
            +
                const dialog = new Dialog(__classPrivateFieldGet(this, _Page_client, "f"), dialogType, event.message, event.defaultPrompt);
         
     | 
| 
      
 2500 
     | 
    
         
            +
                this.emit("dialog" /* PageEmittedEvents.Dialog */, dialog);
         
     | 
| 
      
 2501 
     | 
    
         
            +
            }, _Page_resetDefaultBackgroundColor = 
         
     | 
| 
      
 2502 
     | 
    
         
            +
            /**
         
     | 
| 
      
 2503 
     | 
    
         
            +
             * Resets default white background
         
     | 
| 
      
 2504 
     | 
    
         
            +
             */
         
     | 
| 
      
 2505 
     | 
    
         
            +
            async function _Page_resetDefaultBackgroundColor() {
         
     | 
| 
      
 2506 
     | 
    
         
            +
                await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setDefaultBackgroundColorOverride');
         
     | 
| 
      
 2507 
     | 
    
         
            +
            }, _Page_setTransparentBackgroundColor = 
         
     | 
| 
      
 2508 
     | 
    
         
            +
            /**
         
     | 
| 
      
 2509 
     | 
    
         
            +
             * Hides default white background
         
     | 
| 
      
 2510 
     | 
    
         
            +
             */
         
     | 
| 
      
 2511 
     | 
    
         
            +
            async function _Page_setTransparentBackgroundColor() {
         
     | 
| 
      
 2512 
     | 
    
         
            +
                await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setDefaultBackgroundColorOverride', {
         
     | 
| 
      
 2513 
     | 
    
         
            +
                    color: { r: 0, g: 0, b: 0, a: 0 },
         
     | 
| 
      
 2514 
     | 
    
         
            +
                });
         
     | 
| 
      
 2515 
     | 
    
         
            +
            }, _Page_sessionClosePromise = function _Page_sessionClosePromise() {
         
     | 
| 
      
 2516 
     | 
    
         
            +
                if (!__classPrivateFieldGet(this, _Page_disconnectPromise, "f")) {
         
     | 
| 
      
 2517 
     | 
    
         
            +
                    __classPrivateFieldSet(this, _Page_disconnectPromise, new Promise(fulfill => {
         
     | 
| 
      
 2518 
     | 
    
         
            +
                        return __classPrivateFieldGet(this, _Page_client, "f").once(CDPSessionEmittedEvents.Disconnected, () => {
         
     | 
| 
      
 2519 
     | 
    
         
            +
                            return fulfill(new Error('Target closed'));
         
     | 
| 
      
 2520 
     | 
    
         
            +
                        });
         
     | 
| 
      
 2521 
     | 
    
         
            +
                    }), "f");
         
     | 
| 
      
 2522 
     | 
    
         
            +
                }
         
     | 
| 
      
 2523 
     | 
    
         
            +
                return __classPrivateFieldGet(this, _Page_disconnectPromise, "f");
         
     | 
| 
      
 2524 
     | 
    
         
            +
            }, _Page_go = async function _Page_go(delta, options) {
         
     | 
| 
      
 2525 
     | 
    
         
            +
                const history = await __classPrivateFieldGet(this, _Page_client, "f").send('Page.getNavigationHistory');
         
     | 
| 
      
 2526 
     | 
    
         
            +
                const entry = history.entries[history.currentIndex + delta];
         
     | 
| 
      
 2527 
     | 
    
         
            +
                if (!entry) {
         
     | 
| 
      
 2528 
     | 
    
         
            +
                    return null;
         
     | 
| 
      
 2529 
     | 
    
         
            +
                }
         
     | 
| 
      
 2530 
     | 
    
         
            +
                const result = await Promise.all([
         
     | 
| 
      
 2531 
     | 
    
         
            +
                    this.waitForNavigation(options),
         
     | 
| 
      
 2532 
     | 
    
         
            +
                    __classPrivateFieldGet(this, _Page_client, "f").send('Page.navigateToHistoryEntry', { entryId: entry.id }),
         
     | 
| 
      
 2533 
     | 
    
         
            +
                ]);
         
     | 
| 
      
 2534 
     | 
    
         
            +
                return result[0];
         
     | 
| 
      
 2535 
     | 
    
         
            +
            }, _Page_screenshotTask = async function _Page_screenshotTask(format, options = {}) {
         
     | 
| 
      
 2536 
     | 
    
         
            +
                await __classPrivateFieldGet(this, _Page_client, "f").send('Target.activateTarget', {
         
     | 
| 
      
 2537 
     | 
    
         
            +
                    targetId: __classPrivateFieldGet(this, _Page_target, "f")._targetId,
         
     | 
| 
      
 2538 
     | 
    
         
            +
                });
         
     | 
| 
      
 2539 
     | 
    
         
            +
                let clip = options.clip ? processClip(options.clip) : undefined;
         
     | 
| 
      
 2540 
     | 
    
         
            +
                const captureBeyondViewport = typeof options.captureBeyondViewport === 'boolean'
         
     | 
| 
      
 2541 
     | 
    
         
            +
                    ? options.captureBeyondViewport
         
     | 
| 
      
 2542 
     | 
    
         
            +
                    : true;
         
     | 
| 
      
 2543 
     | 
    
         
            +
                const fromSurface = typeof options.fromSurface === 'boolean'
         
     | 
| 
      
 2544 
     | 
    
         
            +
                    ? options.fromSurface
         
     | 
| 
      
 2545 
     | 
    
         
            +
                    : undefined;
         
     | 
| 
      
 2546 
     | 
    
         
            +
                if (options.fullPage) {
         
     | 
| 
      
 2547 
     | 
    
         
            +
                    const metrics = await __classPrivateFieldGet(this, _Page_client, "f").send('Page.getLayoutMetrics');
         
     | 
| 
      
 2548 
     | 
    
         
            +
                    // Fallback to `contentSize` in case of using Firefox.
         
     | 
| 
      
 2549 
     | 
    
         
            +
                    const { width, height } = metrics.cssContentSize || metrics.contentSize;
         
     | 
| 
      
 2550 
     | 
    
         
            +
                    // Overwrite clip for full page.
         
     | 
| 
      
 2551 
     | 
    
         
            +
                    clip = { x: 0, y: 0, width, height, scale: 1 };
         
     | 
| 
      
 2552 
     | 
    
         
            +
                    if (!captureBeyondViewport) {
         
     | 
| 
      
 2553 
     | 
    
         
            +
                        const { isMobile = false, deviceScaleFactor = 1, isLandscape = false, } = __classPrivateFieldGet(this, _Page_viewport, "f") || {};
         
     | 
| 
      
 2554 
     | 
    
         
            +
                        const screenOrientation = isLandscape
         
     | 
| 
      
 2555 
     | 
    
         
            +
                            ? { angle: 90, type: 'landscapePrimary' }
         
     | 
| 
      
 2556 
     | 
    
         
            +
                            : { angle: 0, type: 'portraitPrimary' };
         
     | 
| 
      
 2557 
     | 
    
         
            +
                        await __classPrivateFieldGet(this, _Page_client, "f").send('Emulation.setDeviceMetricsOverride', {
         
     | 
| 
      
 2558 
     | 
    
         
            +
                            mobile: isMobile,
         
     | 
| 
      
 2559 
     | 
    
         
            +
                            width,
         
     | 
| 
      
 2560 
     | 
    
         
            +
                            height,
         
     | 
| 
      
 2561 
     | 
    
         
            +
                            deviceScaleFactor,
         
     | 
| 
      
 2562 
     | 
    
         
            +
                            screenOrientation,
         
     | 
| 
      
 2563 
     | 
    
         
            +
                        });
         
     | 
| 
      
 2564 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2565 
     | 
    
         
            +
                }
         
     | 
| 
      
 2566 
     | 
    
         
            +
                const shouldSetDefaultBackground = options.omitBackground && (format === 'png' || format === 'webp');
         
     | 
| 
      
 2567 
     | 
    
         
            +
                if (shouldSetDefaultBackground) {
         
     | 
| 
      
 2568 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_instances, "m", _Page_setTransparentBackgroundColor).call(this);
         
     | 
| 
      
 2569 
     | 
    
         
            +
                }
         
     | 
| 
      
 2570 
     | 
    
         
            +
                const result = await __classPrivateFieldGet(this, _Page_client, "f").send('Page.captureScreenshot', {
         
     | 
| 
      
 2571 
     | 
    
         
            +
                    format,
         
     | 
| 
      
 2572 
     | 
    
         
            +
                    quality: options.quality,
         
     | 
| 
      
 2573 
     | 
    
         
            +
                    clip,
         
     | 
| 
      
 2574 
     | 
    
         
            +
                    captureBeyondViewport,
         
     | 
| 
      
 2575 
     | 
    
         
            +
                    fromSurface,
         
     | 
| 
      
 2576 
     | 
    
         
            +
                });
         
     | 
| 
      
 2577 
     | 
    
         
            +
                if (shouldSetDefaultBackground) {
         
     | 
| 
      
 2578 
     | 
    
         
            +
                    await __classPrivateFieldGet(this, _Page_instances, "m", _Page_resetDefaultBackgroundColor).call(this);
         
     | 
| 
      
 2579 
     | 
    
         
            +
                }
         
     | 
| 
      
 2580 
     | 
    
         
            +
                if (options.fullPage && __classPrivateFieldGet(this, _Page_viewport, "f")) {
         
     | 
| 
      
 2581 
     | 
    
         
            +
                    await this.setViewport(__classPrivateFieldGet(this, _Page_viewport, "f"));
         
     | 
| 
      
 2582 
     | 
    
         
            +
                }
         
     | 
| 
      
 2583 
     | 
    
         
            +
                const buffer = options.encoding === 'base64'
         
     | 
| 
      
 2584 
     | 
    
         
            +
                    ? result.data
         
     | 
| 
      
 2585 
     | 
    
         
            +
                    : Buffer.from(result.data, 'base64');
         
     | 
| 
      
 2586 
     | 
    
         
            +
                if (options.path) {
         
     | 
| 
      
 2587 
     | 
    
         
            +
                    try {
         
     | 
| 
      
 2588 
     | 
    
         
            +
                        const fs = (await import('fs')).promises;
         
     | 
| 
      
 2589 
     | 
    
         
            +
                        await fs.writeFile(options.path, buffer);
         
     | 
| 
      
 2590 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2591 
     | 
    
         
            +
                    catch (error) {
         
     | 
| 
      
 2592 
     | 
    
         
            +
                        if (error instanceof TypeError) {
         
     | 
| 
      
 2593 
     | 
    
         
            +
                            throw new Error('Screenshots can only be written to a file path in a Node-like environment.');
         
     | 
| 
      
 2594 
     | 
    
         
            +
                        }
         
     | 
| 
      
 2595 
     | 
    
         
            +
                        throw error;
         
     | 
| 
      
 2596 
     | 
    
         
            +
                    }
         
     | 
| 
      
 2597 
     | 
    
         
            +
                }
         
     | 
| 
      
 2598 
     | 
    
         
            +
                return buffer;
         
     | 
| 
      
 2599 
     | 
    
         
            +
                function processClip(clip) {
         
     | 
| 
      
 2600 
     | 
    
         
            +
                    const x = Math.round(clip.x);
         
     | 
| 
      
 2601 
     | 
    
         
            +
                    const y = Math.round(clip.y);
         
     | 
| 
      
 2602 
     | 
    
         
            +
                    const width = Math.round(clip.width + clip.x - x);
         
     | 
| 
      
 2603 
     | 
    
         
            +
                    const height = Math.round(clip.height + clip.y - y);
         
     | 
| 
      
 2604 
     | 
    
         
            +
                    return { x, y, width, height, scale: 1 };
         
     | 
| 
      
 2605 
     | 
    
         
            +
                }
         
     | 
| 
      
 2606 
     | 
    
         
            +
            };
         
     | 
| 
       2490 
2607 
     | 
    
         
             
            const supportedMetrics = new Set([
         
     | 
| 
       2491 
2608 
     | 
    
         
             
                'Timestamp',
         
     | 
| 
       2492 
2609 
     | 
    
         
             
                'Documents',
         
     | 
| 
         @@ -2509,18 +2626,19 @@ const unitToPixels = { 
     | 
|
| 
       2509 
2626 
     | 
    
         
             
                mm: 3.78,
         
     | 
| 
       2510 
2627 
     | 
    
         
             
            };
         
     | 
| 
       2511 
2628 
     | 
    
         
             
            function convertPrintParameterToInches(parameter) {
         
     | 
| 
       2512 
     | 
    
         
            -
                if (typeof parameter === 'undefined')
         
     | 
| 
      
 2629 
     | 
    
         
            +
                if (typeof parameter === 'undefined') {
         
     | 
| 
       2513 
2630 
     | 
    
         
             
                    return undefined;
         
     | 
| 
      
 2631 
     | 
    
         
            +
                }
         
     | 
| 
       2514 
2632 
     | 
    
         
             
                let pixels;
         
     | 
| 
       2515 
     | 
    
         
            -
                if ( 
     | 
| 
      
 2633 
     | 
    
         
            +
                if (isNumber(parameter)) {
         
     | 
| 
       2516 
2634 
     | 
    
         
             
                    // Treat numbers as pixel values to be aligned with phantom's paperSize.
         
     | 
| 
       2517 
     | 
    
         
            -
                    pixels =  
     | 
| 
      
 2635 
     | 
    
         
            +
                    pixels = parameter;
         
     | 
| 
       2518 
2636 
     | 
    
         
             
                }
         
     | 
| 
       2519 
     | 
    
         
            -
                else if ( 
     | 
| 
       2520 
     | 
    
         
            -
                    const text =  
     | 
| 
      
 2637 
     | 
    
         
            +
                else if (isString(parameter)) {
         
     | 
| 
      
 2638 
     | 
    
         
            +
                    const text = parameter;
         
     | 
| 
       2521 
2639 
     | 
    
         
             
                    let unit = text.substring(text.length - 2).toLowerCase();
         
     | 
| 
       2522 
2640 
     | 
    
         
             
                    let valueText = '';
         
     | 
| 
       2523 
     | 
    
         
            -
                    if (unitToPixels 
     | 
| 
      
 2641 
     | 
    
         
            +
                    if (unit in unitToPixels) {
         
     | 
| 
       2524 
2642 
     | 
    
         
             
                        valueText = text.substring(0, text.length - 2);
         
     | 
| 
       2525 
2643 
     | 
    
         
             
                    }
         
     | 
| 
       2526 
2644 
     | 
    
         
             
                    else {
         
     |