@checkly/playwright-core 1.41.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +5 -0
  3. package/README.md +3 -0
  4. package/ThirdPartyNotices.txt +1513 -0
  5. package/bin/PrintDeps.exe +0 -0
  6. package/bin/README.md +2 -0
  7. package/bin/install_media_pack.ps1 +5 -0
  8. package/bin/reinstall_chrome_beta_linux.sh +40 -0
  9. package/bin/reinstall_chrome_beta_mac.sh +13 -0
  10. package/bin/reinstall_chrome_beta_win.ps1 +23 -0
  11. package/bin/reinstall_chrome_stable_linux.sh +40 -0
  12. package/bin/reinstall_chrome_stable_mac.sh +12 -0
  13. package/bin/reinstall_chrome_stable_win.ps1 +23 -0
  14. package/bin/reinstall_msedge_beta_linux.sh +40 -0
  15. package/bin/reinstall_msedge_beta_mac.sh +11 -0
  16. package/bin/reinstall_msedge_beta_win.ps1 +22 -0
  17. package/bin/reinstall_msedge_dev_linux.sh +40 -0
  18. package/bin/reinstall_msedge_dev_mac.sh +11 -0
  19. package/bin/reinstall_msedge_dev_win.ps1 +22 -0
  20. package/bin/reinstall_msedge_stable_linux.sh +40 -0
  21. package/bin/reinstall_msedge_stable_mac.sh +11 -0
  22. package/bin/reinstall_msedge_stable_win.ps1 +23 -0
  23. package/browsers.json +64 -0
  24. package/cli.js +17 -0
  25. package/index.d.ts +17 -0
  26. package/index.js +33 -0
  27. package/index.mjs +28 -0
  28. package/lib/androidServerImpl.js +69 -0
  29. package/lib/browserServerImpl.js +92 -0
  30. package/lib/cli/driver.js +97 -0
  31. package/lib/cli/program.js +582 -0
  32. package/lib/cli/programWithTestStub.js +67 -0
  33. package/lib/client/accessibility.js +50 -0
  34. package/lib/client/android.js +473 -0
  35. package/lib/client/api.js +272 -0
  36. package/lib/client/artifact.js +79 -0
  37. package/lib/client/browser.js +145 -0
  38. package/lib/client/browserContext.js +509 -0
  39. package/lib/client/browserType.js +233 -0
  40. package/lib/client/cdpSession.js +53 -0
  41. package/lib/client/channelOwner.js +229 -0
  42. package/lib/client/clientHelper.js +57 -0
  43. package/lib/client/clientInstrumentation.js +40 -0
  44. package/lib/client/connection.js +327 -0
  45. package/lib/client/consoleMessage.js +55 -0
  46. package/lib/client/coverage.js +41 -0
  47. package/lib/client/dialog.js +57 -0
  48. package/lib/client/download.js +62 -0
  49. package/lib/client/electron.js +130 -0
  50. package/lib/client/elementHandle.js +291 -0
  51. package/lib/client/errors.js +77 -0
  52. package/lib/client/events.js +93 -0
  53. package/lib/client/fetch.js +343 -0
  54. package/lib/client/fileChooser.js +45 -0
  55. package/lib/client/frame.js +506 -0
  56. package/lib/client/harRouter.js +93 -0
  57. package/lib/client/input.js +111 -0
  58. package/lib/client/jsHandle.js +123 -0
  59. package/lib/client/jsonPipe.js +35 -0
  60. package/lib/client/localUtils.js +35 -0
  61. package/lib/client/locator.js +432 -0
  62. package/lib/client/network.js +601 -0
  63. package/lib/client/page.js +707 -0
  64. package/lib/client/playwright.js +74 -0
  65. package/lib/client/selectors.js +67 -0
  66. package/lib/client/stream.js +54 -0
  67. package/lib/client/tracing.js +135 -0
  68. package/lib/client/types.js +24 -0
  69. package/lib/client/video.js +51 -0
  70. package/lib/client/waiter.js +158 -0
  71. package/lib/client/webError.js +37 -0
  72. package/lib/client/worker.js +71 -0
  73. package/lib/client/writableStream.js +54 -0
  74. package/lib/common/socksProxy.js +569 -0
  75. package/lib/common/timeoutSettings.js +73 -0
  76. package/lib/common/types.js +5 -0
  77. package/lib/generated/consoleApiSource.js +7 -0
  78. package/lib/generated/injectedScriptSource.js +7 -0
  79. package/lib/generated/recorderSource.js +7 -0
  80. package/lib/generated/utilityScriptSource.js +7 -0
  81. package/lib/image_tools/colorUtils.js +98 -0
  82. package/lib/image_tools/compare.js +108 -0
  83. package/lib/image_tools/imageChannel.js +70 -0
  84. package/lib/image_tools/stats.js +102 -0
  85. package/lib/inProcessFactory.js +54 -0
  86. package/lib/inprocess.js +20 -0
  87. package/lib/outofprocess.js +67 -0
  88. package/lib/protocol/debug.js +27 -0
  89. package/lib/protocol/serializers.js +172 -0
  90. package/lib/protocol/transport.js +82 -0
  91. package/lib/protocol/validator.js +2599 -0
  92. package/lib/protocol/validatorPrimitives.js +139 -0
  93. package/lib/remote/playwrightConnection.js +274 -0
  94. package/lib/remote/playwrightServer.js +110 -0
  95. package/lib/server/accessibility.js +62 -0
  96. package/lib/server/android/android.js +441 -0
  97. package/lib/server/android/backendAdb.js +172 -0
  98. package/lib/server/artifact.js +104 -0
  99. package/lib/server/browser.js +129 -0
  100. package/lib/server/browserContext.js +609 -0
  101. package/lib/server/browserType.js +300 -0
  102. package/lib/server/chromium/appIcon.png +0 -0
  103. package/lib/server/chromium/chromium.js +346 -0
  104. package/lib/server/chromium/chromiumSwitches.js +41 -0
  105. package/lib/server/chromium/crAccessibility.js +237 -0
  106. package/lib/server/chromium/crBrowser.js +521 -0
  107. package/lib/server/chromium/crConnection.js +228 -0
  108. package/lib/server/chromium/crCoverage.js +246 -0
  109. package/lib/server/chromium/crDevTools.js +104 -0
  110. package/lib/server/chromium/crDragDrop.js +144 -0
  111. package/lib/server/chromium/crExecutionContext.js +156 -0
  112. package/lib/server/chromium/crInput.js +171 -0
  113. package/lib/server/chromium/crNetworkManager.js +723 -0
  114. package/lib/server/chromium/crPage.js +1173 -0
  115. package/lib/server/chromium/crPdf.js +147 -0
  116. package/lib/server/chromium/crProtocolHelper.js +131 -0
  117. package/lib/server/chromium/crServiceWorker.js +115 -0
  118. package/lib/server/chromium/defaultFontFamilies.js +145 -0
  119. package/lib/server/chromium/videoRecorder.js +155 -0
  120. package/lib/server/console.js +59 -0
  121. package/lib/server/cookieStore.js +112 -0
  122. package/lib/server/debugController.js +236 -0
  123. package/lib/server/debugger.js +132 -0
  124. package/lib/server/deviceDescriptors.js +21 -0
  125. package/lib/server/deviceDescriptorsSource.json +1549 -0
  126. package/lib/server/dialog.js +70 -0
  127. package/lib/server/dispatchers/androidDispatcher.js +193 -0
  128. package/lib/server/dispatchers/artifactDispatcher.js +118 -0
  129. package/lib/server/dispatchers/browserContextDispatcher.js +306 -0
  130. package/lib/server/dispatchers/browserDispatcher.js +170 -0
  131. package/lib/server/dispatchers/browserTypeDispatcher.js +55 -0
  132. package/lib/server/dispatchers/cdpSessionDispatcher.js +48 -0
  133. package/lib/server/dispatchers/debugControllerDispatcher.js +103 -0
  134. package/lib/server/dispatchers/dialogDispatcher.js +44 -0
  135. package/lib/server/dispatchers/dispatcher.js +400 -0
  136. package/lib/server/dispatchers/electronDispatcher.js +80 -0
  137. package/lib/server/dispatchers/elementHandlerDispatcher.js +228 -0
  138. package/lib/server/dispatchers/frameDispatcher.js +287 -0
  139. package/lib/server/dispatchers/jsHandleDispatcher.js +102 -0
  140. package/lib/server/dispatchers/jsonPipeDispatcher.js +61 -0
  141. package/lib/server/dispatchers/localUtilsDispatcher.js +399 -0
  142. package/lib/server/dispatchers/networkDispatchers.js +221 -0
  143. package/lib/server/dispatchers/pageDispatcher.js +363 -0
  144. package/lib/server/dispatchers/playwrightDispatcher.js +105 -0
  145. package/lib/server/dispatchers/selectorsDispatcher.js +36 -0
  146. package/lib/server/dispatchers/streamDispatcher.js +62 -0
  147. package/lib/server/dispatchers/tracingDispatcher.js +54 -0
  148. package/lib/server/dispatchers/writableStreamDispatcher.js +55 -0
  149. package/lib/server/dom.js +808 -0
  150. package/lib/server/download.js +53 -0
  151. package/lib/server/electron/electron.js +254 -0
  152. package/lib/server/electron/loader.js +57 -0
  153. package/lib/server/errors.js +68 -0
  154. package/lib/server/fetch.js +611 -0
  155. package/lib/server/fileChooser.js +42 -0
  156. package/lib/server/fileUploadUtils.js +71 -0
  157. package/lib/server/firefox/ffAccessibility.js +215 -0
  158. package/lib/server/firefox/ffBrowser.js +447 -0
  159. package/lib/server/firefox/ffConnection.js +168 -0
  160. package/lib/server/firefox/ffExecutionContext.js +138 -0
  161. package/lib/server/firefox/ffInput.js +150 -0
  162. package/lib/server/firefox/ffNetworkManager.js +231 -0
  163. package/lib/server/firefox/ffPage.js +558 -0
  164. package/lib/server/firefox/firefox.js +91 -0
  165. package/lib/server/formData.js +75 -0
  166. package/lib/server/frameSelectors.js +171 -0
  167. package/lib/server/frames.js +1597 -0
  168. package/lib/server/har/harRecorder.js +139 -0
  169. package/lib/server/har/harTracer.js +539 -0
  170. package/lib/server/helper.js +103 -0
  171. package/lib/server/index.js +96 -0
  172. package/lib/server/input.js +301 -0
  173. package/lib/server/instrumentation.js +74 -0
  174. package/lib/server/isomorphic/utilityScriptSerializers.js +212 -0
  175. package/lib/server/javascript.js +305 -0
  176. package/lib/server/launchApp.js +90 -0
  177. package/lib/server/macEditingCommands.js +139 -0
  178. package/lib/server/network.js +607 -0
  179. package/lib/server/page.js +793 -0
  180. package/lib/server/pipeTransport.js +85 -0
  181. package/lib/server/playwright.js +82 -0
  182. package/lib/server/progress.js +102 -0
  183. package/lib/server/protocolError.js +49 -0
  184. package/lib/server/recorder/codeGenerator.js +153 -0
  185. package/lib/server/recorder/csharp.js +310 -0
  186. package/lib/server/recorder/java.js +216 -0
  187. package/lib/server/recorder/javascript.js +229 -0
  188. package/lib/server/recorder/jsonl.js +47 -0
  189. package/lib/server/recorder/language.js +44 -0
  190. package/lib/server/recorder/python.js +275 -0
  191. package/lib/server/recorder/recorderActions.js +5 -0
  192. package/lib/server/recorder/recorderApp.js +181 -0
  193. package/lib/server/recorder/recorderUtils.js +48 -0
  194. package/lib/server/recorder/utils.js +45 -0
  195. package/lib/server/recorder.js +700 -0
  196. package/lib/server/registry/browserFetcher.js +168 -0
  197. package/lib/server/registry/dependencies.js +322 -0
  198. package/lib/server/registry/index.js +925 -0
  199. package/lib/server/registry/nativeDeps.js +383 -0
  200. package/lib/server/registry/oopDownloadBrowserMain.js +138 -0
  201. package/lib/server/screenshotter.js +354 -0
  202. package/lib/server/selectors.js +73 -0
  203. package/lib/server/socksInterceptor.js +100 -0
  204. package/lib/server/trace/recorder/snapshotter.js +168 -0
  205. package/lib/server/trace/recorder/snapshotterInjected.js +493 -0
  206. package/lib/server/trace/recorder/tracing.js +552 -0
  207. package/lib/server/trace/test/inMemorySnapshotter.js +93 -0
  208. package/lib/server/trace/viewer/traceViewer.js +229 -0
  209. package/lib/server/transport.js +191 -0
  210. package/lib/server/types.js +24 -0
  211. package/lib/server/usKeyboardLayout.js +555 -0
  212. package/lib/server/webkit/webkit.js +87 -0
  213. package/lib/server/webkit/wkAccessibility.js +194 -0
  214. package/lib/server/webkit/wkBrowser.js +328 -0
  215. package/lib/server/webkit/wkConnection.js +173 -0
  216. package/lib/server/webkit/wkExecutionContext.js +146 -0
  217. package/lib/server/webkit/wkInput.js +169 -0
  218. package/lib/server/webkit/wkInterceptableRequest.js +158 -0
  219. package/lib/server/webkit/wkPage.js +1198 -0
  220. package/lib/server/webkit/wkProvisionalPage.js +59 -0
  221. package/lib/server/webkit/wkWorkers.js +104 -0
  222. package/lib/third_party/diff_match_patch.js +2222 -0
  223. package/lib/third_party/pixelmatch.js +255 -0
  224. package/lib/utils/ascii.js +31 -0
  225. package/lib/utils/comparators.js +171 -0
  226. package/lib/utils/crypto.js +33 -0
  227. package/lib/utils/debug.js +46 -0
  228. package/lib/utils/debugLogger.js +89 -0
  229. package/lib/utils/env.js +47 -0
  230. package/lib/utils/eventsHelper.js +38 -0
  231. package/lib/utils/fileUtils.js +66 -0
  232. package/lib/utils/glob.js +83 -0
  233. package/lib/utils/happy-eyeballs.js +154 -0
  234. package/lib/utils/headers.js +52 -0
  235. package/lib/utils/hostPlatform.js +124 -0
  236. package/lib/utils/httpServer.js +195 -0
  237. package/lib/utils/index.js +324 -0
  238. package/lib/utils/isomorphic/cssParser.js +250 -0
  239. package/lib/utils/isomorphic/cssTokenizer.js +979 -0
  240. package/lib/utils/isomorphic/locatorGenerators.js +651 -0
  241. package/lib/utils/isomorphic/locatorParser.js +179 -0
  242. package/lib/utils/isomorphic/locatorUtils.js +62 -0
  243. package/lib/utils/isomorphic/selectorParser.js +397 -0
  244. package/lib/utils/isomorphic/stringUtils.js +107 -0
  245. package/lib/utils/isomorphic/traceUtils.js +39 -0
  246. package/lib/utils/linuxUtils.js +78 -0
  247. package/lib/utils/manualPromise.js +109 -0
  248. package/lib/utils/mimeType.js +29 -0
  249. package/lib/utils/multimap.js +75 -0
  250. package/lib/utils/network.js +189 -0
  251. package/lib/utils/processLauncher.js +248 -0
  252. package/lib/utils/profiler.js +53 -0
  253. package/lib/utils/rtti.js +41 -0
  254. package/lib/utils/semaphore.js +51 -0
  255. package/lib/utils/spawnAsync.js +45 -0
  256. package/lib/utils/stackTrace.js +123 -0
  257. package/lib/utils/task.js +58 -0
  258. package/lib/utils/time.js +37 -0
  259. package/lib/utils/timeoutRunner.js +131 -0
  260. package/lib/utils/traceUtils.js +44 -0
  261. package/lib/utils/userAgent.js +105 -0
  262. package/lib/utils/wsServer.js +125 -0
  263. package/lib/utils/zipFile.js +75 -0
  264. package/lib/utils/zones.js +99 -0
  265. package/lib/utilsBundle.js +81 -0
  266. package/lib/utilsBundleImpl/index.js +51 -0
  267. package/lib/utilsBundleImpl/xdg-open +1066 -0
  268. package/lib/vite/htmlReport/index.html +66 -0
  269. package/lib/vite/recorder/assets/codeMirrorModule-Hs9-1ZG4.css +1 -0
  270. package/lib/vite/recorder/assets/codeMirrorModule-I9ks4y7D.js +24 -0
  271. package/lib/vite/recorder/assets/codicon-zGuYmc9o.ttf +0 -0
  272. package/lib/vite/recorder/assets/index-ljsTwXtJ.css +1 -0
  273. package/lib/vite/recorder/assets/index-yg8ypzl6.js +47 -0
  274. package/lib/vite/recorder/index.html +29 -0
  275. package/lib/vite/recorder/playwright-logo.svg +9 -0
  276. package/lib/vite/traceViewer/assets/codeMirrorModule-GluP1cQ1.js +24 -0
  277. package/lib/vite/traceViewer/assets/codeMirrorModule-fqJB1XDu.js +24 -0
  278. package/lib/vite/traceViewer/assets/codeMirrorModule-y3M3aAqy.js +24 -0
  279. package/lib/vite/traceViewer/assets/wsPort-Rvwd4WC-.js +69 -0
  280. package/lib/vite/traceViewer/assets/wsPort-dlD7vDkY.js +69 -0
  281. package/lib/vite/traceViewer/assets/wsPort-qOE2NWrO.js +69 -0
  282. package/lib/vite/traceViewer/assets/xtermModule-Yt6xwiJ_.js +9 -0
  283. package/lib/vite/traceViewer/codeMirrorModule.Hs9-1ZG4.css +1 -0
  284. package/lib/vite/traceViewer/codicon.zGuYmc9o.ttf +0 -0
  285. package/lib/vite/traceViewer/index.-g_5lMbJ.css +1 -0
  286. package/lib/vite/traceViewer/index.4X7zDysg.js +2 -0
  287. package/lib/vite/traceViewer/index.HkJgzlGy.js +2 -0
  288. package/lib/vite/traceViewer/index.html +26 -0
  289. package/lib/vite/traceViewer/index.kRjx5sAJ.js +2 -0
  290. package/lib/vite/traceViewer/playwright-logo.svg +9 -0
  291. package/lib/vite/traceViewer/snapshot.html +21 -0
  292. package/lib/vite/traceViewer/sw.bundle.js +4 -0
  293. package/lib/vite/traceViewer/uiMode.1Wcp_Kto.js +10 -0
  294. package/lib/vite/traceViewer/uiMode.GTNzARcV.js +10 -0
  295. package/lib/vite/traceViewer/uiMode.html +17 -0
  296. package/lib/vite/traceViewer/uiMode.pWy0Re7G.css +1 -0
  297. package/lib/vite/traceViewer/uiMode.zV-7Lf9v.js +10 -0
  298. package/lib/vite/traceViewer/wsPort.kSgQKQ0y.css +1 -0
  299. package/lib/vite/traceViewer/xtermModule.0lwXJFHT.css +32 -0
  300. package/lib/zipBundle.js +25 -0
  301. package/lib/zipBundleImpl.js +5 -0
  302. package/package.json +43 -0
  303. package/types/protocol.d.ts +20304 -0
  304. package/types/structs.d.ts +45 -0
  305. package/types/types.d.ts +20626 -0
@@ -0,0 +1,611 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.GlobalAPIRequestContext = exports.BrowserContextAPIRequestContext = exports.APIRequestContext = void 0;
7
+ var http = _interopRequireWildcard(require("http"));
8
+ var https = _interopRequireWildcard(require("https"));
9
+ var _stream = require("stream");
10
+ var _url = _interopRequireDefault(require("url"));
11
+ var _zlib = _interopRequireDefault(require("zlib"));
12
+ var _timeoutSettings = require("../common/timeoutSettings");
13
+ var _userAgent = require("../utils/userAgent");
14
+ var _utils = require("../utils");
15
+ var _utilsBundle = require("../utilsBundle");
16
+ var _browserContext = require("./browserContext");
17
+ var _cookieStore = require("./cookieStore");
18
+ var _formData = require("./formData");
19
+ var _happyEyeballs = require("../utils/happy-eyeballs");
20
+ var _instrumentation = require("./instrumentation");
21
+ var _progress = require("./progress");
22
+ var _tracing = require("./trace/recorder/tracing");
23
+ var _network = require("./network");
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
26
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
+ /**
28
+ * Copyright (c) Microsoft Corporation.
29
+ *
30
+ * Licensed under the Apache License, Version 2.0 (the "License");
31
+ * you may not use this file except in compliance with the License.
32
+ * You may obtain a copy of the License at
33
+ *
34
+ * http://www.apache.org/licenses/LICENSE-2.0
35
+ *
36
+ * Unless required by applicable law or agreed to in writing, software
37
+ * distributed under the License is distributed on an "AS IS" BASIS,
38
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
39
+ * See the License for the specific language governing permissions and
40
+ * limitations under the License.
41
+ */
42
+
43
+ class APIRequestContext extends _instrumentation.SdkObject {
44
+ static findResponseBody(guid) {
45
+ for (const request of APIRequestContext.allInstances) {
46
+ const body = request.fetchResponses.get(guid);
47
+ if (body) return body;
48
+ }
49
+ return undefined;
50
+ }
51
+ constructor(parent) {
52
+ super(parent, 'request-context');
53
+ this.fetchResponses = new Map();
54
+ this.fetchLog = new Map();
55
+ this._activeProgressControllers = new Set();
56
+ this._closeReason = void 0;
57
+ APIRequestContext.allInstances.add(this);
58
+ }
59
+ _disposeImpl() {
60
+ APIRequestContext.allInstances.delete(this);
61
+ this.fetchResponses.clear();
62
+ this.fetchLog.clear();
63
+ this.emit(APIRequestContext.Events.Dispose);
64
+ }
65
+ disposeResponse(fetchUid) {
66
+ this.fetchResponses.delete(fetchUid);
67
+ this.fetchLog.delete(fetchUid);
68
+ }
69
+ _storeResponseBody(body) {
70
+ const uid = (0, _utils.createGuid)();
71
+ this.fetchResponses.set(uid, body);
72
+ return uid;
73
+ }
74
+ async fetch(params, metadata) {
75
+ var _params$method;
76
+ const defaults = this._defaultOptions();
77
+ const headers = {
78
+ 'user-agent': defaults.userAgent,
79
+ 'accept': '*/*',
80
+ 'accept-encoding': 'gzip,deflate,br'
81
+ };
82
+ if (defaults.extraHTTPHeaders) {
83
+ for (const {
84
+ name,
85
+ value
86
+ } of defaults.extraHTTPHeaders) setHeader(headers, name, value);
87
+ }
88
+ if (params.headers) {
89
+ for (const {
90
+ name,
91
+ value
92
+ } of params.headers) setHeader(headers, name, value);
93
+ }
94
+ const requestUrl = new URL(params.url, defaults.baseURL);
95
+ if (params.params) {
96
+ for (const {
97
+ name,
98
+ value
99
+ } of params.params) requestUrl.searchParams.set(name, value);
100
+ }
101
+ const method = ((_params$method = params.method) === null || _params$method === void 0 ? void 0 : _params$method.toUpperCase()) || 'GET';
102
+ const proxy = defaults.proxy;
103
+ let agent;
104
+ if (proxy && proxy.server !== 'per-context' && !shouldBypassProxy(requestUrl, proxy.bypass)) {
105
+ var _proxyOpts$protocol;
106
+ const proxyOpts = _url.default.parse(proxy.server);
107
+ if ((_proxyOpts$protocol = proxyOpts.protocol) !== null && _proxyOpts$protocol !== void 0 && _proxyOpts$protocol.startsWith('socks')) {
108
+ agent = new _utilsBundle.SocksProxyAgent({
109
+ host: proxyOpts.hostname,
110
+ port: proxyOpts.port || undefined
111
+ });
112
+ } else {
113
+ if (proxy.username) proxyOpts.auth = `${proxy.username}:${proxy.password || ''}`;
114
+ // TODO: We should use HttpProxyAgent conditional on proxyOpts.protocol instead of always using CONNECT method.
115
+ agent = new _utilsBundle.HttpsProxyAgent(proxyOpts);
116
+ }
117
+ }
118
+ const timeout = defaults.timeoutSettings.timeout(params);
119
+ const deadline = timeout && (0, _utils.monotonicTime)() + timeout;
120
+ const options = {
121
+ method,
122
+ headers,
123
+ agent,
124
+ maxRedirects: params.maxRedirects === 0 ? -1 : params.maxRedirects === undefined ? 20 : params.maxRedirects,
125
+ timeout,
126
+ deadline,
127
+ __testHookLookup: params.__testHookLookup
128
+ };
129
+ // rejectUnauthorized = undefined is treated as true in node 12.
130
+ if (params.ignoreHTTPSErrors || defaults.ignoreHTTPSErrors) options.rejectUnauthorized = false;
131
+ const postData = serializePostData(params, headers);
132
+ if (postData) setHeader(headers, 'content-length', String(postData.byteLength));
133
+ const controller = new _progress.ProgressController(metadata, this);
134
+ const fetchResponse = await controller.run(progress => {
135
+ return this._sendRequest(progress, requestUrl, options, postData);
136
+ });
137
+ const fetchUid = this._storeResponseBody(fetchResponse.body);
138
+ this.fetchLog.set(fetchUid, controller.metadata.log);
139
+ if (params.failOnStatusCode && (fetchResponse.status < 200 || fetchResponse.status >= 400)) throw new Error(`${fetchResponse.status} ${fetchResponse.statusText}`);
140
+ return {
141
+ ...fetchResponse,
142
+ fetchUid
143
+ };
144
+ }
145
+ _parseSetCookieHeader(responseUrl, setCookie) {
146
+ if (!setCookie) return [];
147
+ const url = new URL(responseUrl);
148
+ // https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4
149
+ const defaultPath = '/' + url.pathname.substr(1).split('/').slice(0, -1).join('/');
150
+ const cookies = [];
151
+ for (const header of setCookie) {
152
+ // Decode cookie value?
153
+ const cookie = parseCookie(header);
154
+ if (!cookie) continue;
155
+ // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.3
156
+ if (!cookie.domain) cookie.domain = url.hostname;else (0, _utils.assert)(cookie.domain.startsWith('.') || !cookie.domain.includes('.'));
157
+ if (!(0, _cookieStore.domainMatches)(url.hostname, cookie.domain)) continue;
158
+ // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.4
159
+ if (!cookie.path || !cookie.path.startsWith('/')) cookie.path = defaultPath;
160
+ cookies.push(cookie);
161
+ }
162
+ return cookies;
163
+ }
164
+ async _updateRequestCookieHeader(url, headers) {
165
+ if (getHeader(headers, 'cookie') !== undefined) return;
166
+ const cookies = await this._cookies(url);
167
+ if (cookies.length) {
168
+ const valueArray = cookies.map(c => `${c.name}=${c.value}`);
169
+ setHeader(headers, 'cookie', valueArray.join('; '));
170
+ }
171
+ }
172
+ async _sendRequest(progress, url, options, postData) {
173
+ var _getHeader;
174
+ await this._updateRequestCookieHeader(url, options.headers);
175
+ const requestCookies = ((_getHeader = getHeader(options.headers, 'cookie')) === null || _getHeader === void 0 ? void 0 : _getHeader.split(';').map(p => {
176
+ const [name, value] = p.split('=').map(v => v.trim());
177
+ return {
178
+ name,
179
+ value
180
+ };
181
+ })) || [];
182
+ const requestEvent = {
183
+ url,
184
+ method: options.method,
185
+ headers: options.headers,
186
+ cookies: requestCookies,
187
+ postData
188
+ };
189
+ this.emit(APIRequestContext.Events.Request, requestEvent);
190
+ return new Promise((fulfill, reject) => {
191
+ const requestConstructor = (url.protocol === 'https:' ? https : http).request;
192
+ // If we have a proxy agent already, do not override it.
193
+ const agent = options.agent || (url.protocol === 'https:' ? _happyEyeballs.httpsHappyEyeballsAgent : _happyEyeballs.httpHappyEyeballsAgent);
194
+ const requestOptions = {
195
+ ...options,
196
+ agent
197
+ };
198
+ const request = requestConstructor(url, requestOptions, async response => {
199
+ const notifyRequestFinished = body => {
200
+ const requestFinishedEvent = {
201
+ requestEvent,
202
+ httpVersion: response.httpVersion,
203
+ statusCode: response.statusCode || 0,
204
+ statusMessage: response.statusMessage || '',
205
+ headers: response.headers,
206
+ rawHeaders: response.rawHeaders,
207
+ cookies,
208
+ body
209
+ };
210
+ this.emit(APIRequestContext.Events.RequestFinished, requestFinishedEvent);
211
+ };
212
+ progress.log(`← ${response.statusCode} ${response.statusMessage}`);
213
+ for (const [name, value] of Object.entries(response.headers)) progress.log(` ${name}: ${value}`);
214
+ const cookies = this._parseSetCookieHeader(response.url || url.toString(), response.headers['set-cookie']);
215
+ if (cookies.length) {
216
+ try {
217
+ await this._addCookies(cookies);
218
+ } catch (e) {
219
+ // Cookie value is limited by 4096 characters in the browsers. If setCookies failed,
220
+ // we try setting each cookie individually just in case only some of them are bad.
221
+ await Promise.all(cookies.map(c => this._addCookies([c]).catch(() => {})));
222
+ }
223
+ }
224
+ if (redirectStatus.includes(response.statusCode) && options.maxRedirects >= 0) {
225
+ if (!options.maxRedirects) {
226
+ reject(new Error('Max redirect count exceeded'));
227
+ request.destroy();
228
+ return;
229
+ }
230
+ const headers = {
231
+ ...options.headers
232
+ };
233
+ removeHeader(headers, `cookie`);
234
+
235
+ // HTTP-redirect fetch step 13 (https://fetch.spec.whatwg.org/#http-redirect-fetch)
236
+ const status = response.statusCode;
237
+ let method = options.method;
238
+ if ((status === 301 || status === 302) && method === 'POST' || status === 303 && !['GET', 'HEAD'].includes(method)) {
239
+ method = 'GET';
240
+ postData = undefined;
241
+ removeHeader(headers, `content-encoding`);
242
+ removeHeader(headers, `content-language`);
243
+ removeHeader(headers, `content-length`);
244
+ removeHeader(headers, `content-location`);
245
+ removeHeader(headers, `content-type`);
246
+ }
247
+ const redirectOptions = {
248
+ method,
249
+ headers,
250
+ agent: options.agent,
251
+ maxRedirects: options.maxRedirects - 1,
252
+ timeout: options.timeout,
253
+ deadline: options.deadline,
254
+ __testHookLookup: options.__testHookLookup
255
+ };
256
+ // rejectUnauthorized = undefined is treated as true in node 12.
257
+ if (options.rejectUnauthorized === false) redirectOptions.rejectUnauthorized = false;
258
+
259
+ // HTTP-redirect fetch step 4: If locationURL is null, then return response.
260
+ if (response.headers.location) {
261
+ let locationURL;
262
+ try {
263
+ locationURL = new URL(response.headers.location, url);
264
+ } catch (error) {
265
+ reject(new Error(`uri requested responds with an invalid redirect URL: ${response.headers.location}`));
266
+ request.destroy();
267
+ return;
268
+ }
269
+ if (headers['host']) headers['host'] = locationURL.host;
270
+ notifyRequestFinished();
271
+ fulfill(this._sendRequest(progress, locationURL, redirectOptions, postData));
272
+ request.destroy();
273
+ return;
274
+ }
275
+ }
276
+ if (response.statusCode === 401 && !getHeader(options.headers, 'authorization')) {
277
+ const auth = response.headers['www-authenticate'];
278
+ const credentials = this._getHttpCredentials(url);
279
+ if (auth !== null && auth !== void 0 && auth.trim().startsWith('Basic') && credentials) {
280
+ const {
281
+ username,
282
+ password
283
+ } = credentials;
284
+ const encoded = Buffer.from(`${username || ''}:${password || ''}`).toString('base64');
285
+ setHeader(options.headers, 'authorization', `Basic ${encoded}`);
286
+ notifyRequestFinished();
287
+ fulfill(this._sendRequest(progress, url, options, postData));
288
+ request.destroy();
289
+ return;
290
+ }
291
+ }
292
+ response.on('aborted', () => reject(new Error('aborted')));
293
+ const chunks = [];
294
+ const notifyBodyFinished = () => {
295
+ const body = Buffer.concat(chunks);
296
+ notifyRequestFinished(body);
297
+ fulfill({
298
+ url: response.url || url.toString(),
299
+ status: response.statusCode || 0,
300
+ statusText: response.statusMessage || '',
301
+ headers: toHeadersArray(response.rawHeaders),
302
+ body
303
+ });
304
+ };
305
+ let body = response;
306
+ let transform;
307
+ const encoding = response.headers['content-encoding'];
308
+ if (encoding === 'gzip' || encoding === 'x-gzip') {
309
+ transform = _zlib.default.createGunzip({
310
+ flush: _zlib.default.constants.Z_SYNC_FLUSH,
311
+ finishFlush: _zlib.default.constants.Z_SYNC_FLUSH
312
+ });
313
+ } else if (encoding === 'br') {
314
+ transform = _zlib.default.createBrotliDecompress();
315
+ } else if (encoding === 'deflate') {
316
+ transform = _zlib.default.createInflate();
317
+ }
318
+ if (transform) {
319
+ // Brotli and deflate decompressors throw if the input stream is empty.
320
+ const emptyStreamTransform = new SafeEmptyStreamTransform(notifyBodyFinished);
321
+ body = (0, _stream.pipeline)(response, emptyStreamTransform, transform, e => {
322
+ if (e) reject(new Error(`failed to decompress '${encoding}' encoding: ${e.message}`));
323
+ });
324
+ body.on('error', e => reject(new Error(`failed to decompress '${encoding}' encoding: ${e}`)));
325
+ } else {
326
+ body.on('error', reject);
327
+ }
328
+ body.on('data', chunk => chunks.push(chunk));
329
+ body.on('end', notifyBodyFinished);
330
+ });
331
+ request.on('error', reject);
332
+ const disposeListener = () => {
333
+ reject(new Error('Request context disposed.'));
334
+ request.destroy();
335
+ };
336
+ this.on(APIRequestContext.Events.Dispose, disposeListener);
337
+ request.on('close', () => this.off(APIRequestContext.Events.Dispose, disposeListener));
338
+ progress.log(`→ ${options.method} ${url.toString()}`);
339
+ if (options.headers) {
340
+ for (const [name, value] of Object.entries(options.headers)) progress.log(` ${name}: ${value}`);
341
+ }
342
+ if (options.deadline) {
343
+ const rejectOnTimeout = () => {
344
+ reject(new Error(`Request timed out after ${options.timeout}ms`));
345
+ request.destroy();
346
+ };
347
+ const remaining = options.deadline - (0, _utils.monotonicTime)();
348
+ if (remaining <= 0) {
349
+ rejectOnTimeout();
350
+ return;
351
+ }
352
+ request.setTimeout(remaining, rejectOnTimeout);
353
+ }
354
+ if (postData) request.write(postData);
355
+ request.end();
356
+ });
357
+ }
358
+ _getHttpCredentials(url) {
359
+ var _this$_defaultOptions, _this$_defaultOptions2;
360
+ if (!((_this$_defaultOptions = this._defaultOptions().httpCredentials) !== null && _this$_defaultOptions !== void 0 && _this$_defaultOptions.origin) || url.origin.toLowerCase() === ((_this$_defaultOptions2 = this._defaultOptions().httpCredentials) === null || _this$_defaultOptions2 === void 0 || (_this$_defaultOptions2 = _this$_defaultOptions2.origin) === null || _this$_defaultOptions2 === void 0 ? void 0 : _this$_defaultOptions2.toLowerCase())) return this._defaultOptions().httpCredentials;
361
+ return undefined;
362
+ }
363
+ }
364
+ exports.APIRequestContext = APIRequestContext;
365
+ APIRequestContext.Events = {
366
+ Dispose: 'dispose',
367
+ Request: 'request',
368
+ RequestFinished: 'requestfinished'
369
+ };
370
+ APIRequestContext.allInstances = new Set();
371
+ class SafeEmptyStreamTransform extends _stream.Transform {
372
+ constructor(onEmptyStreamCallback) {
373
+ super();
374
+ this._receivedSomeData = false;
375
+ this._onEmptyStreamCallback = void 0;
376
+ this._onEmptyStreamCallback = onEmptyStreamCallback;
377
+ }
378
+ _transform(chunk, encoding, callback) {
379
+ this._receivedSomeData = true;
380
+ callback(null, chunk);
381
+ }
382
+ _flush(callback) {
383
+ if (this._receivedSomeData) callback(null);else this._onEmptyStreamCallback();
384
+ }
385
+ }
386
+ class BrowserContextAPIRequestContext extends APIRequestContext {
387
+ constructor(context) {
388
+ super(context);
389
+ this._context = void 0;
390
+ this._context = context;
391
+ context.once(_browserContext.BrowserContext.Events.Close, () => this._disposeImpl());
392
+ }
393
+ tracing() {
394
+ return this._context.tracing;
395
+ }
396
+ async dispose() {
397
+ this.fetchResponses.clear();
398
+ }
399
+ _defaultOptions() {
400
+ return {
401
+ userAgent: this._context._options.userAgent || this._context._browser.userAgent(),
402
+ extraHTTPHeaders: this._context._options.extraHTTPHeaders,
403
+ httpCredentials: this._context._options.httpCredentials,
404
+ proxy: this._context._options.proxy || this._context._browser.options.proxy,
405
+ timeoutSettings: this._context._timeoutSettings,
406
+ ignoreHTTPSErrors: this._context._options.ignoreHTTPSErrors,
407
+ baseURL: this._context._options.baseURL
408
+ };
409
+ }
410
+ async _addCookies(cookies) {
411
+ await this._context.addCookies(cookies);
412
+ }
413
+ async _cookies(url) {
414
+ return await this._context.cookies(url.toString());
415
+ }
416
+ async storageState() {
417
+ return this._context.storageState();
418
+ }
419
+ }
420
+ exports.BrowserContextAPIRequestContext = BrowserContextAPIRequestContext;
421
+ class GlobalAPIRequestContext extends APIRequestContext {
422
+ constructor(playwright, options) {
423
+ super(playwright);
424
+ this._cookieStore = new _cookieStore.CookieStore();
425
+ this._options = void 0;
426
+ this._origins = void 0;
427
+ this._tracing = void 0;
428
+ this.attribution.context = this;
429
+ const timeoutSettings = new _timeoutSettings.TimeoutSettings();
430
+ if (options.timeout !== undefined) timeoutSettings.setDefaultTimeout(options.timeout);
431
+ const proxy = options.proxy;
432
+ if (proxy !== null && proxy !== void 0 && proxy.server) {
433
+ let url = proxy === null || proxy === void 0 ? void 0 : proxy.server.trim();
434
+ if (!/^\w+:\/\//.test(url)) url = 'http://' + url;
435
+ proxy.server = url;
436
+ }
437
+ if (options.storageState) {
438
+ this._origins = options.storageState.origins;
439
+ this._cookieStore.addCookies(options.storageState.cookies || []);
440
+ }
441
+ this._options = {
442
+ baseURL: options.baseURL,
443
+ userAgent: options.userAgent || (0, _userAgent.getUserAgent)(),
444
+ extraHTTPHeaders: options.extraHTTPHeaders,
445
+ ignoreHTTPSErrors: !!options.ignoreHTTPSErrors,
446
+ httpCredentials: options.httpCredentials,
447
+ proxy,
448
+ timeoutSettings
449
+ };
450
+ this._tracing = new _tracing.Tracing(this, options.tracesDir);
451
+ }
452
+ tracing() {
453
+ return this._tracing;
454
+ }
455
+ async dispose() {
456
+ await this._tracing.flush();
457
+ await this._tracing.deleteTmpTracesDir();
458
+ this._disposeImpl();
459
+ }
460
+ _defaultOptions() {
461
+ return this._options;
462
+ }
463
+ async _addCookies(cookies) {
464
+ this._cookieStore.addCookies(cookies);
465
+ }
466
+ async _cookies(url) {
467
+ return this._cookieStore.cookies(url);
468
+ }
469
+ async storageState() {
470
+ return {
471
+ cookies: this._cookieStore.allCookies(),
472
+ origins: this._origins || []
473
+ };
474
+ }
475
+ }
476
+ exports.GlobalAPIRequestContext = GlobalAPIRequestContext;
477
+ function toHeadersArray(rawHeaders) {
478
+ const result = [];
479
+ for (let i = 0; i < rawHeaders.length; i += 2) result.push({
480
+ name: rawHeaders[i],
481
+ value: rawHeaders[i + 1]
482
+ });
483
+ return result;
484
+ }
485
+ const redirectStatus = [301, 302, 303, 307, 308];
486
+ function parseCookie(header) {
487
+ const pairs = header.split(';').filter(s => s.trim().length > 0).map(p => {
488
+ let key = '';
489
+ let value = '';
490
+ const separatorPos = p.indexOf('=');
491
+ if (separatorPos === -1) {
492
+ // If only a key is specified, the value is left undefined.
493
+ key = p.trim();
494
+ } else {
495
+ // Otherwise we assume that the key is the element before the first `=`
496
+ key = p.slice(0, separatorPos).trim();
497
+ // And the value is the rest of the string.
498
+ value = p.slice(separatorPos + 1).trim();
499
+ }
500
+ return [key, value];
501
+ });
502
+ if (!pairs.length) return null;
503
+ const [name, value] = pairs[0];
504
+ const cookie = {
505
+ name,
506
+ value,
507
+ domain: '',
508
+ path: '',
509
+ expires: -1,
510
+ httpOnly: false,
511
+ secure: false,
512
+ // From https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
513
+ // The cookie-sending behavior if SameSite is not specified is SameSite=Lax.
514
+ sameSite: 'Lax'
515
+ };
516
+ for (let i = 1; i < pairs.length; i++) {
517
+ const [name, value] = pairs[i];
518
+ switch (name.toLowerCase()) {
519
+ case 'expires':
520
+ const expiresMs = +new Date(value);
521
+ // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.1
522
+ if (isFinite(expiresMs)) {
523
+ if (expiresMs <= 0) cookie.expires = 0;else cookie.expires = Math.min(expiresMs / 1000, _network.kMaxCookieExpiresDateInSeconds);
524
+ }
525
+ break;
526
+ case 'max-age':
527
+ const maxAgeSec = parseInt(value, 10);
528
+ if (isFinite(maxAgeSec)) {
529
+ // From https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.2
530
+ // If delta-seconds is less than or equal to zero (0), let expiry-time
531
+ // be the earliest representable date and time.
532
+ if (maxAgeSec <= 0) cookie.expires = 0;else cookie.expires = Math.min(Date.now() / 1000 + maxAgeSec, _network.kMaxCookieExpiresDateInSeconds);
533
+ }
534
+ break;
535
+ case 'domain':
536
+ cookie.domain = value.toLocaleLowerCase() || '';
537
+ if (cookie.domain && !cookie.domain.startsWith('.') && cookie.domain.includes('.')) cookie.domain = '.' + cookie.domain;
538
+ break;
539
+ case 'path':
540
+ cookie.path = value || '';
541
+ break;
542
+ case 'secure':
543
+ cookie.secure = true;
544
+ break;
545
+ case 'httponly':
546
+ cookie.httpOnly = true;
547
+ break;
548
+ case 'samesite':
549
+ switch (value.toLowerCase()) {
550
+ case 'none':
551
+ cookie.sameSite = 'None';
552
+ break;
553
+ case 'lax':
554
+ cookie.sameSite = 'Lax';
555
+ break;
556
+ case 'strict':
557
+ cookie.sameSite = 'Strict';
558
+ break;
559
+ }
560
+ break;
561
+ }
562
+ }
563
+ return cookie;
564
+ }
565
+ function serializePostData(params, headers) {
566
+ (0, _utils.assert)((params.postData ? 1 : 0) + (params.jsonData ? 1 : 0) + (params.formData ? 1 : 0) + (params.multipartData ? 1 : 0) <= 1, `Only one of 'data', 'form' or 'multipart' can be specified`);
567
+ if (params.jsonData !== undefined) {
568
+ setHeader(headers, 'content-type', 'application/json', true);
569
+ return Buffer.from(params.jsonData, 'utf8');
570
+ } else if (params.formData) {
571
+ const searchParams = new URLSearchParams();
572
+ for (const {
573
+ name,
574
+ value
575
+ } of params.formData) searchParams.append(name, value);
576
+ setHeader(headers, 'content-type', 'application/x-www-form-urlencoded', true);
577
+ return Buffer.from(searchParams.toString(), 'utf8');
578
+ } else if (params.multipartData) {
579
+ const formData = new _formData.MultipartFormData();
580
+ for (const field of params.multipartData) {
581
+ if (field.file) formData.addFileField(field.name, field.file);else if (field.value) formData.addField(field.name, field.value);
582
+ }
583
+ setHeader(headers, 'content-type', formData.contentTypeHeader(), true);
584
+ return formData.finish();
585
+ } else if (params.postData !== undefined) {
586
+ setHeader(headers, 'content-type', 'application/octet-stream', true);
587
+ return params.postData;
588
+ }
589
+ return undefined;
590
+ }
591
+ function setHeader(headers, name, value, keepExisting = false) {
592
+ const existing = Object.entries(headers).find(pair => pair[0].toLowerCase() === name.toLowerCase());
593
+ if (!existing) headers[name] = value;else if (!keepExisting) headers[existing[0]] = value;
594
+ }
595
+ function getHeader(headers, name) {
596
+ const existing = Object.entries(headers).find(pair => pair[0].toLowerCase() === name.toLowerCase());
597
+ return existing ? existing[1] : undefined;
598
+ }
599
+ function removeHeader(headers, name) {
600
+ delete headers[name];
601
+ }
602
+ function shouldBypassProxy(url, bypass) {
603
+ if (!bypass) return false;
604
+ const domains = bypass.split(',').map(s => {
605
+ s = s.trim();
606
+ if (!s.startsWith('.')) s = '.' + s;
607
+ return s;
608
+ });
609
+ const domain = '.' + url.hostname;
610
+ return domains.some(d => domain.endsWith(d));
611
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FileChooser = void 0;
7
+ /**
8
+ * Copyright (c) Microsoft Corporation.
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+
23
+ class FileChooser {
24
+ constructor(page, elementHandle, isMultiple) {
25
+ this._page = void 0;
26
+ this._elementHandle = void 0;
27
+ this._isMultiple = void 0;
28
+ this._page = page;
29
+ this._elementHandle = elementHandle;
30
+ this._isMultiple = isMultiple;
31
+ }
32
+ element() {
33
+ return this._elementHandle;
34
+ }
35
+ isMultiple() {
36
+ return this._isMultiple;
37
+ }
38
+ page() {
39
+ return this._page;
40
+ }
41
+ }
42
+ exports.FileChooser = FileChooser;