pokeedex 0.1.0 → 0.1.5

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 (560) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -5
  3. data/bin/pokeedex +1 -44
  4. data/lib/pokeedex/configuration.rb +0 -6
  5. data/lib/pokeedex/install_playwright.rb +62 -0
  6. data/lib/pokeedex/pokemon/scrapper/fetchers/base.rb +1 -1
  7. data/lib/pokeedex/version.rb +1 -1
  8. data/lib/pokeedex.rb +5 -2
  9. data/spec/pokeedex/configuration_spec.rb +0 -7
  10. data/spec/spec_helper.rb +1 -1
  11. metadata +2 -550
  12. data/node_modules/.bin/playwright +0 -1
  13. data/node_modules/.bin/playwright-core +0 -1
  14. data/node_modules/.yarn-integrity +0 -22
  15. data/node_modules/@playwright/test/LICENSE +0 -202
  16. data/node_modules/@playwright/test/NOTICE +0 -5
  17. data/node_modules/@playwright/test/README.md +0 -169
  18. data/node_modules/@playwright/test/cli.js +0 -19
  19. data/node_modules/@playwright/test/index.d.ts +0 -18
  20. data/node_modules/@playwright/test/index.js +0 -17
  21. data/node_modules/@playwright/test/index.mjs +0 -18
  22. data/node_modules/@playwright/test/node_modules/.bin/playwright +0 -1
  23. data/node_modules/@playwright/test/package.json +0 -35
  24. data/node_modules/@playwright/test/reporter.d.ts +0 -17
  25. data/node_modules/@playwright/test/reporter.js +0 -17
  26. data/node_modules/@playwright/test/reporter.mjs +0 -17
  27. data/node_modules/@types/node/LICENSE +0 -21
  28. data/node_modules/@types/node/README.md +0 -15
  29. data/node_modules/@types/node/assert/strict.d.ts +0 -8
  30. data/node_modules/@types/node/assert.d.ts +0 -1040
  31. data/node_modules/@types/node/async_hooks.d.ts +0 -541
  32. data/node_modules/@types/node/buffer.d.ts +0 -2300
  33. data/node_modules/@types/node/child_process.d.ts +0 -1544
  34. data/node_modules/@types/node/cluster.d.ts +0 -578
  35. data/node_modules/@types/node/console.d.ts +0 -452
  36. data/node_modules/@types/node/constants.d.ts +0 -19
  37. data/node_modules/@types/node/crypto.d.ts +0 -4451
  38. data/node_modules/@types/node/dgram.d.ts +0 -596
  39. data/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  40. data/node_modules/@types/node/dns/promises.d.ts +0 -476
  41. data/node_modules/@types/node/dns.d.ts +0 -865
  42. data/node_modules/@types/node/dom-events.d.ts +0 -124
  43. data/node_modules/@types/node/domain.d.ts +0 -170
  44. data/node_modules/@types/node/events.d.ts +0 -931
  45. data/node_modules/@types/node/fs/promises.d.ts +0 -1264
  46. data/node_modules/@types/node/fs.d.ts +0 -4390
  47. data/node_modules/@types/node/globals.d.ts +0 -611
  48. data/node_modules/@types/node/globals.global.d.ts +0 -1
  49. data/node_modules/@types/node/http.d.ts +0 -1921
  50. data/node_modules/@types/node/http2.d.ts +0 -2555
  51. data/node_modules/@types/node/https.d.ts +0 -544
  52. data/node_modules/@types/node/index.d.ts +0 -90
  53. data/node_modules/@types/node/inspector.d.ts +0 -3966
  54. data/node_modules/@types/node/module.d.ts +0 -301
  55. data/node_modules/@types/node/net.d.ts +0 -995
  56. data/node_modules/@types/node/os.d.ts +0 -495
  57. data/node_modules/@types/node/package.json +0 -217
  58. data/node_modules/@types/node/path.d.ts +0 -200
  59. data/node_modules/@types/node/perf_hooks.d.ts +0 -941
  60. data/node_modules/@types/node/process.d.ts +0 -1912
  61. data/node_modules/@types/node/punycode.d.ts +0 -117
  62. data/node_modules/@types/node/querystring.d.ts +0 -153
  63. data/node_modules/@types/node/readline/promises.d.ts +0 -150
  64. data/node_modules/@types/node/readline.d.ts +0 -540
  65. data/node_modules/@types/node/repl.d.ts +0 -430
  66. data/node_modules/@types/node/sea.d.ts +0 -153
  67. data/node_modules/@types/node/sqlite.d.ts +0 -213
  68. data/node_modules/@types/node/stream/consumers.d.ts +0 -12
  69. data/node_modules/@types/node/stream/promises.d.ts +0 -83
  70. data/node_modules/@types/node/stream/web.d.ts +0 -606
  71. data/node_modules/@types/node/stream.d.ts +0 -1726
  72. data/node_modules/@types/node/string_decoder.d.ts +0 -67
  73. data/node_modules/@types/node/test.d.ts +0 -2098
  74. data/node_modules/@types/node/timers/promises.d.ts +0 -97
  75. data/node_modules/@types/node/timers.d.ts +0 -240
  76. data/node_modules/@types/node/tls.d.ts +0 -1220
  77. data/node_modules/@types/node/trace_events.d.ts +0 -197
  78. data/node_modules/@types/node/tty.d.ts +0 -208
  79. data/node_modules/@types/node/url.d.ts +0 -969
  80. data/node_modules/@types/node/util.d.ts +0 -2301
  81. data/node_modules/@types/node/v8.d.ts +0 -808
  82. data/node_modules/@types/node/vm.d.ts +0 -922
  83. data/node_modules/@types/node/wasi.d.ts +0 -181
  84. data/node_modules/@types/node/worker_threads.d.ts +0 -712
  85. data/node_modules/@types/node/zlib.d.ts +0 -539
  86. data/node_modules/fsevents/LICENSE +0 -22
  87. data/node_modules/fsevents/README.md +0 -83
  88. data/node_modules/fsevents/fsevents.d.ts +0 -46
  89. data/node_modules/fsevents/fsevents.js +0 -82
  90. data/node_modules/fsevents/fsevents.node +0 -0
  91. data/node_modules/fsevents/package.json +0 -62
  92. data/node_modules/playwright/.eslintrc.js +0 -6
  93. data/node_modules/playwright/LICENSE +0 -202
  94. data/node_modules/playwright/NOTICE +0 -5
  95. data/node_modules/playwright/README.md +0 -169
  96. data/node_modules/playwright/ThirdPartyNotices.txt +0 -4356
  97. data/node_modules/playwright/cli.js +0 -19
  98. data/node_modules/playwright/index.d.ts +0 -17
  99. data/node_modules/playwright/index.js +0 -17
  100. data/node_modules/playwright/index.mjs +0 -18
  101. data/node_modules/playwright/jsx-runtime.js +0 -41
  102. data/node_modules/playwright/jsx-runtime.mjs +0 -21
  103. data/node_modules/playwright/lib/common/config.js +0 -256
  104. data/node_modules/playwright/lib/common/configLoader.js +0 -321
  105. data/node_modules/playwright/lib/common/esmLoaderHost.js +0 -93
  106. data/node_modules/playwright/lib/common/expectBundle.js +0 -27
  107. data/node_modules/playwright/lib/common/expectBundleImpl.js +0 -389
  108. data/node_modules/playwright/lib/common/fixtures.js +0 -323
  109. data/node_modules/playwright/lib/common/globals.js +0 -48
  110. data/node_modules/playwright/lib/common/ipc.js +0 -48
  111. data/node_modules/playwright/lib/common/poolBuilder.js +0 -79
  112. data/node_modules/playwright/lib/common/process.js +0 -140
  113. data/node_modules/playwright/lib/common/suiteUtils.js +0 -133
  114. data/node_modules/playwright/lib/common/test.js +0 -311
  115. data/node_modules/playwright/lib/common/testLoader.js +0 -102
  116. data/node_modules/playwright/lib/common/testType.js +0 -284
  117. data/node_modules/playwright/lib/fsWatcher.js +0 -69
  118. data/node_modules/playwright/lib/index.js +0 -888
  119. data/node_modules/playwright/lib/internalsForTest.js +0 -28
  120. data/node_modules/playwright/lib/isomorphic/events.js +0 -72
  121. data/node_modules/playwright/lib/isomorphic/folders.js +0 -25
  122. data/node_modules/playwright/lib/isomorphic/stringInternPool.js +0 -58
  123. data/node_modules/playwright/lib/isomorphic/teleReceiver.js +0 -504
  124. data/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +0 -149
  125. data/node_modules/playwright/lib/isomorphic/testServerConnection.js +0 -210
  126. data/node_modules/playwright/lib/isomorphic/testServerInterface.js +0 -5
  127. data/node_modules/playwright/lib/isomorphic/testTree.js +0 -272
  128. data/node_modules/playwright/lib/loader/loaderMain.js +0 -58
  129. data/node_modules/playwright/lib/matchers/expect.js +0 -297
  130. data/node_modules/playwright/lib/matchers/matcherHint.js +0 -50
  131. data/node_modules/playwright/lib/matchers/matchers.js +0 -449
  132. data/node_modules/playwright/lib/matchers/toBeTruthy.js +0 -55
  133. data/node_modules/playwright/lib/matchers/toEqual.js +0 -57
  134. data/node_modules/playwright/lib/matchers/toMatchSnapshot.js +0 -383
  135. data/node_modules/playwright/lib/matchers/toMatchText.js +0 -76
  136. data/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +0 -78
  137. data/node_modules/playwright/lib/plugins/index.js +0 -19
  138. data/node_modules/playwright/lib/plugins/webServerPlugin.js +0 -187
  139. data/node_modules/playwright/lib/program.js +0 -346
  140. data/node_modules/playwright/lib/reporters/base.js +0 -553
  141. data/node_modules/playwright/lib/reporters/blob.js +0 -133
  142. data/node_modules/playwright/lib/reporters/dot.js +0 -82
  143. data/node_modules/playwright/lib/reporters/empty.js +0 -42
  144. data/node_modules/playwright/lib/reporters/github.js +0 -115
  145. data/node_modules/playwright/lib/reporters/html.js +0 -623
  146. data/node_modules/playwright/lib/reporters/internalReporter.js +0 -123
  147. data/node_modules/playwright/lib/reporters/json.js +0 -243
  148. data/node_modules/playwright/lib/reporters/junit.js +0 -233
  149. data/node_modules/playwright/lib/reporters/line.js +0 -108
  150. data/node_modules/playwright/lib/reporters/list.js +0 -222
  151. data/node_modules/playwright/lib/reporters/markdown.js +0 -76
  152. data/node_modules/playwright/lib/reporters/merge.js +0 -477
  153. data/node_modules/playwright/lib/reporters/multiplexer.js +0 -90
  154. data/node_modules/playwright/lib/reporters/reporterV2.js +0 -118
  155. data/node_modules/playwright/lib/reporters/teleEmitter.js +0 -268
  156. data/node_modules/playwright/lib/reporters/versions/blobV1.js +0 -5
  157. data/node_modules/playwright/lib/runner/dispatcher.js +0 -532
  158. data/node_modules/playwright/lib/runner/failureTracker.js +0 -60
  159. data/node_modules/playwright/lib/runner/loadUtils.js +0 -308
  160. data/node_modules/playwright/lib/runner/loaderHost.js +0 -85
  161. data/node_modules/playwright/lib/runner/processHost.js +0 -175
  162. data/node_modules/playwright/lib/runner/projectUtils.js +0 -203
  163. data/node_modules/playwright/lib/runner/reporters.js +0 -151
  164. data/node_modules/playwright/lib/runner/runner.js +0 -179
  165. data/node_modules/playwright/lib/runner/sigIntWatcher.js +0 -100
  166. data/node_modules/playwright/lib/runner/taskRunner.js +0 -147
  167. data/node_modules/playwright/lib/runner/tasks.js +0 -407
  168. data/node_modules/playwright/lib/runner/testGroups.js +0 -136
  169. data/node_modules/playwright/lib/runner/testServer.js +0 -605
  170. data/node_modules/playwright/lib/runner/uiModeReporter.js +0 -31
  171. data/node_modules/playwright/lib/runner/vcs.js +0 -55
  172. data/node_modules/playwright/lib/runner/watchMode.js +0 -398
  173. data/node_modules/playwright/lib/runner/workerHost.js +0 -85
  174. data/node_modules/playwright/lib/third_party/tsconfig-loader.js +0 -134
  175. data/node_modules/playwright/lib/transform/babelBundle.js +0 -28
  176. data/node_modules/playwright/lib/transform/babelBundleImpl.js +0 -2032
  177. data/node_modules/playwright/lib/transform/compilationCache.js +0 -254
  178. data/node_modules/playwright/lib/transform/esmLoader.js +0 -117
  179. data/node_modules/playwright/lib/transform/esmUtils.js +0 -32
  180. data/node_modules/playwright/lib/transform/portTransport.js +0 -81
  181. data/node_modules/playwright/lib/transform/transform.js +0 -267
  182. data/node_modules/playwright/lib/util.js +0 -356
  183. data/node_modules/playwright/lib/utilsBundle.js +0 -28
  184. data/node_modules/playwright/lib/utilsBundleImpl.js +0 -102
  185. data/node_modules/playwright/lib/worker/fixtureRunner.js +0 -279
  186. data/node_modules/playwright/lib/worker/testInfo.js +0 -397
  187. data/node_modules/playwright/lib/worker/testTracing.js +0 -314
  188. data/node_modules/playwright/lib/worker/timeoutManager.js +0 -153
  189. data/node_modules/playwright/lib/worker/workerMain.js +0 -637
  190. data/node_modules/playwright/node_modules/.bin/playwright-core +0 -1
  191. data/node_modules/playwright/package.json +0 -66
  192. data/node_modules/playwright/test.d.ts +0 -18
  193. data/node_modules/playwright/test.js +0 -24
  194. data/node_modules/playwright/test.mjs +0 -33
  195. data/node_modules/playwright/types/test.d.ts +0 -8444
  196. data/node_modules/playwright/types/testReporter.d.ts +0 -749
  197. data/node_modules/playwright-core/LICENSE +0 -202
  198. data/node_modules/playwright-core/NOTICE +0 -5
  199. data/node_modules/playwright-core/README.md +0 -3
  200. data/node_modules/playwright-core/ThirdPartyNotices.txt +0 -1548
  201. data/node_modules/playwright-core/bin/PrintDeps.exe +0 -0
  202. data/node_modules/playwright-core/bin/README.md +0 -2
  203. data/node_modules/playwright-core/bin/install_media_pack.ps1 +0 -5
  204. data/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +0 -40
  205. data/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +0 -13
  206. data/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +0 -24
  207. data/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +0 -40
  208. data/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +0 -12
  209. data/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +0 -24
  210. data/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +0 -40
  211. data/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +0 -11
  212. data/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +0 -23
  213. data/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +0 -40
  214. data/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +0 -11
  215. data/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +0 -23
  216. data/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +0 -40
  217. data/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +0 -11
  218. data/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +0 -24
  219. data/node_modules/playwright-core/browsers.json +0 -53
  220. data/node_modules/playwright-core/cli.js +0 -18
  221. data/node_modules/playwright-core/index.d.ts +0 -17
  222. data/node_modules/playwright-core/index.js +0 -33
  223. data/node_modules/playwright-core/index.mjs +0 -28
  224. data/node_modules/playwright-core/lib/androidServerImpl.js +0 -69
  225. data/node_modules/playwright-core/lib/browserServerImpl.js +0 -92
  226. data/node_modules/playwright-core/lib/cli/driver.js +0 -95
  227. data/node_modules/playwright-core/lib/cli/program.js +0 -577
  228. data/node_modules/playwright-core/lib/cli/programWithTestStub.js +0 -67
  229. data/node_modules/playwright-core/lib/client/accessibility.js +0 -50
  230. data/node_modules/playwright-core/lib/client/android.js +0 -473
  231. data/node_modules/playwright-core/lib/client/api.js +0 -279
  232. data/node_modules/playwright-core/lib/client/artifact.js +0 -79
  233. data/node_modules/playwright-core/lib/client/browser.js +0 -145
  234. data/node_modules/playwright-core/lib/client/browserContext.js +0 -541
  235. data/node_modules/playwright-core/lib/client/browserType.js +0 -241
  236. data/node_modules/playwright-core/lib/client/cdpSession.js +0 -53
  237. data/node_modules/playwright-core/lib/client/channelOwner.js +0 -231
  238. data/node_modules/playwright-core/lib/client/clientHelper.js +0 -57
  239. data/node_modules/playwright-core/lib/client/clientInstrumentation.js +0 -50
  240. data/node_modules/playwright-core/lib/client/clock.js +0 -68
  241. data/node_modules/playwright-core/lib/client/connection.js +0 -330
  242. data/node_modules/playwright-core/lib/client/consoleMessage.js +0 -55
  243. data/node_modules/playwright-core/lib/client/coverage.js +0 -41
  244. data/node_modules/playwright-core/lib/client/dialog.js +0 -57
  245. data/node_modules/playwright-core/lib/client/download.js +0 -62
  246. data/node_modules/playwright-core/lib/client/electron.js +0 -135
  247. data/node_modules/playwright-core/lib/client/elementHandle.js +0 -321
  248. data/node_modules/playwright-core/lib/client/errors.js +0 -77
  249. data/node_modules/playwright-core/lib/client/eventEmitter.js +0 -314
  250. data/node_modules/playwright-core/lib/client/events.js +0 -94
  251. data/node_modules/playwright-core/lib/client/fetch.js +0 -396
  252. data/node_modules/playwright-core/lib/client/fileChooser.js +0 -45
  253. data/node_modules/playwright-core/lib/client/frame.js +0 -504
  254. data/node_modules/playwright-core/lib/client/harRouter.js +0 -99
  255. data/node_modules/playwright-core/lib/client/input.js +0 -111
  256. data/node_modules/playwright-core/lib/client/jsHandle.js +0 -129
  257. data/node_modules/playwright-core/lib/client/jsonPipe.js +0 -35
  258. data/node_modules/playwright-core/lib/client/localUtils.js +0 -35
  259. data/node_modules/playwright-core/lib/client/locator.js +0 -441
  260. data/node_modules/playwright-core/lib/client/network.js +0 -604
  261. data/node_modules/playwright-core/lib/client/page.js +0 -725
  262. data/node_modules/playwright-core/lib/client/playwright.js +0 -77
  263. data/node_modules/playwright-core/lib/client/selectors.js +0 -67
  264. data/node_modules/playwright-core/lib/client/stream.js +0 -54
  265. data/node_modules/playwright-core/lib/client/tracing.js +0 -138
  266. data/node_modules/playwright-core/lib/client/types.js +0 -24
  267. data/node_modules/playwright-core/lib/client/video.js +0 -51
  268. data/node_modules/playwright-core/lib/client/waiter.js +0 -158
  269. data/node_modules/playwright-core/lib/client/webError.js +0 -37
  270. data/node_modules/playwright-core/lib/client/worker.js +0 -71
  271. data/node_modules/playwright-core/lib/client/writableStream.js +0 -54
  272. data/node_modules/playwright-core/lib/common/socksProxy.js +0 -569
  273. data/node_modules/playwright-core/lib/common/timeoutSettings.js +0 -73
  274. data/node_modules/playwright-core/lib/common/types.js +0 -5
  275. data/node_modules/playwright-core/lib/generated/clockSource.js +0 -7
  276. data/node_modules/playwright-core/lib/generated/consoleApiSource.js +0 -7
  277. data/node_modules/playwright-core/lib/generated/injectedScriptSource.js +0 -7
  278. data/node_modules/playwright-core/lib/generated/recorderSource.js +0 -7
  279. data/node_modules/playwright-core/lib/generated/utilityScriptSource.js +0 -7
  280. data/node_modules/playwright-core/lib/image_tools/colorUtils.js +0 -98
  281. data/node_modules/playwright-core/lib/image_tools/compare.js +0 -108
  282. data/node_modules/playwright-core/lib/image_tools/imageChannel.js +0 -70
  283. data/node_modules/playwright-core/lib/image_tools/stats.js +0 -102
  284. data/node_modules/playwright-core/lib/inProcessFactory.js +0 -54
  285. data/node_modules/playwright-core/lib/inprocess.js +0 -20
  286. data/node_modules/playwright-core/lib/outofprocess.js +0 -67
  287. data/node_modules/playwright-core/lib/protocol/debug.js +0 -27
  288. data/node_modules/playwright-core/lib/protocol/serializers.js +0 -173
  289. data/node_modules/playwright-core/lib/protocol/transport.js +0 -82
  290. data/node_modules/playwright-core/lib/protocol/validator.js +0 -2694
  291. data/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +0 -139
  292. data/node_modules/playwright-core/lib/remote/playwrightConnection.js +0 -274
  293. data/node_modules/playwright-core/lib/remote/playwrightServer.js +0 -110
  294. data/node_modules/playwright-core/lib/server/accessibility.js +0 -62
  295. data/node_modules/playwright-core/lib/server/android/android.js +0 -441
  296. data/node_modules/playwright-core/lib/server/android/backendAdb.js +0 -172
  297. data/node_modules/playwright-core/lib/server/artifact.js +0 -104
  298. data/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +0 -296
  299. data/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +0 -206
  300. data/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +0 -162
  301. data/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +0 -110
  302. data/node_modules/playwright-core/lib/server/bidi/bidiInput.js +0 -174
  303. data/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +0 -304
  304. data/node_modules/playwright-core/lib/server/bidi/bidiPage.js +0 -456
  305. data/node_modules/playwright-core/lib/server/bidi/third_party/bidiDeserializer.js +0 -93
  306. data/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +0 -238
  307. data/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +0 -139
  308. data/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +0 -144
  309. data/node_modules/playwright-core/lib/server/browser.js +0 -137
  310. data/node_modules/playwright-core/lib/server/browserContext.js +0 -684
  311. data/node_modules/playwright-core/lib/server/browserType.js +0 -307
  312. data/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  313. data/node_modules/playwright-core/lib/server/chromium/chromium.js +0 -362
  314. data/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +0 -44
  315. data/node_modules/playwright-core/lib/server/chromium/crAccessibility.js +0 -237
  316. data/node_modules/playwright-core/lib/server/chromium/crBrowser.js +0 -515
  317. data/node_modules/playwright-core/lib/server/chromium/crConnection.js +0 -228
  318. data/node_modules/playwright-core/lib/server/chromium/crCoverage.js +0 -246
  319. data/node_modules/playwright-core/lib/server/chromium/crDevTools.js +0 -104
  320. data/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +0 -143
  321. data/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +0 -156
  322. data/node_modules/playwright-core/lib/server/chromium/crInput.js +0 -171
  323. data/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +0 -767
  324. data/node_modules/playwright-core/lib/server/chromium/crPage.js +0 -1128
  325. data/node_modules/playwright-core/lib/server/chromium/crPdf.js +0 -153
  326. data/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +0 -133
  327. data/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +0 -112
  328. data/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +0 -145
  329. data/node_modules/playwright-core/lib/server/chromium/videoRecorder.js +0 -155
  330. data/node_modules/playwright-core/lib/server/clock.js +0 -125
  331. data/node_modules/playwright-core/lib/server/codegen/csharp.js +0 -299
  332. data/node_modules/playwright-core/lib/server/codegen/java.js +0 -235
  333. data/node_modules/playwright-core/lib/server/codegen/javascript.js +0 -223
  334. data/node_modules/playwright-core/lib/server/codegen/jsonl.js +0 -47
  335. data/node_modules/playwright-core/lib/server/codegen/language.js +0 -76
  336. data/node_modules/playwright-core/lib/server/codegen/languages.js +0 -30
  337. data/node_modules/playwright-core/lib/server/codegen/python.js +0 -265
  338. data/node_modules/playwright-core/lib/server/codegen/types.js +0 -5
  339. data/node_modules/playwright-core/lib/server/console.js +0 -57
  340. data/node_modules/playwright-core/lib/server/cookieStore.js +0 -112
  341. data/node_modules/playwright-core/lib/server/debugController.js +0 -234
  342. data/node_modules/playwright-core/lib/server/debugger.js +0 -132
  343. data/node_modules/playwright-core/lib/server/deviceDescriptors.js +0 -26
  344. data/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +0 -1669
  345. data/node_modules/playwright-core/lib/server/dialog.js +0 -70
  346. data/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +0 -193
  347. data/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +0 -118
  348. data/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +0 -351
  349. data/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +0 -170
  350. data/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +0 -55
  351. data/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +0 -48
  352. data/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +0 -103
  353. data/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +0 -44
  354. data/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +0 -395
  355. data/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +0 -93
  356. data/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +0 -228
  357. data/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +0 -286
  358. data/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +0 -102
  359. data/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +0 -59
  360. data/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +0 -413
  361. data/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +0 -221
  362. data/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +0 -358
  363. data/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +0 -106
  364. data/node_modules/playwright-core/lib/server/dispatchers/selectorsDispatcher.js +0 -36
  365. data/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +0 -62
  366. data/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +0 -54
  367. data/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +0 -58
  368. data/node_modules/playwright-core/lib/server/dom.js +0 -845
  369. data/node_modules/playwright-core/lib/server/download.js +0 -53
  370. data/node_modules/playwright-core/lib/server/electron/electron.js +0 -296
  371. data/node_modules/playwright-core/lib/server/electron/loader.js +0 -57
  372. data/node_modules/playwright-core/lib/server/errors.js +0 -68
  373. data/node_modules/playwright-core/lib/server/fetch.js +0 -660
  374. data/node_modules/playwright-core/lib/server/fileChooser.js +0 -42
  375. data/node_modules/playwright-core/lib/server/fileUploadUtils.js +0 -75
  376. data/node_modules/playwright-core/lib/server/firefox/ffAccessibility.js +0 -216
  377. data/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +0 -458
  378. data/node_modules/playwright-core/lib/server/firefox/ffConnection.js +0 -168
  379. data/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +0 -138
  380. data/node_modules/playwright-core/lib/server/firefox/ffInput.js +0 -150
  381. data/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +0 -233
  382. data/node_modules/playwright-core/lib/server/firefox/ffPage.js +0 -556
  383. data/node_modules/playwright-core/lib/server/firefox/firefox.js +0 -110
  384. data/node_modules/playwright-core/lib/server/formData.js +0 -75
  385. data/node_modules/playwright-core/lib/server/frameSelectors.js +0 -171
  386. data/node_modules/playwright-core/lib/server/frames.js +0 -1654
  387. data/node_modules/playwright-core/lib/server/har/harRecorder.js +0 -139
  388. data/node_modules/playwright-core/lib/server/har/harTracer.js +0 -531
  389. data/node_modules/playwright-core/lib/server/helper.js +0 -103
  390. data/node_modules/playwright-core/lib/server/index.js +0 -114
  391. data/node_modules/playwright-core/lib/server/input.js +0 -311
  392. data/node_modules/playwright-core/lib/server/instrumentation.js +0 -70
  393. data/node_modules/playwright-core/lib/server/isomorphic/utilityScriptSerializers.js +0 -226
  394. data/node_modules/playwright-core/lib/server/javascript.js +0 -306
  395. data/node_modules/playwright-core/lib/server/launchApp.js +0 -91
  396. data/node_modules/playwright-core/lib/server/macEditingCommands.js +0 -139
  397. data/node_modules/playwright-core/lib/server/network.js +0 -617
  398. data/node_modules/playwright-core/lib/server/page.js +0 -825
  399. data/node_modules/playwright-core/lib/server/pipeTransport.js +0 -85
  400. data/node_modules/playwright-core/lib/server/playwright.js +0 -85
  401. data/node_modules/playwright-core/lib/server/progress.js +0 -102
  402. data/node_modules/playwright-core/lib/server/protocolError.js +0 -49
  403. data/node_modules/playwright-core/lib/server/recorder/contextRecorder.js +0 -316
  404. data/node_modules/playwright-core/lib/server/recorder/recorderActions.js +0 -5
  405. data/node_modules/playwright-core/lib/server/recorder/recorderApp.js +0 -190
  406. data/node_modules/playwright-core/lib/server/recorder/recorderCollection.js +0 -127
  407. data/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +0 -177
  408. data/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +0 -71
  409. data/node_modules/playwright-core/lib/server/recorder/throttledFile.js +0 -46
  410. data/node_modules/playwright-core/lib/server/recorder.js +0 -324
  411. data/node_modules/playwright-core/lib/server/registry/browserFetcher.js +0 -168
  412. data/node_modules/playwright-core/lib/server/registry/dependencies.js +0 -322
  413. data/node_modules/playwright-core/lib/server/registry/index.js +0 -924
  414. data/node_modules/playwright-core/lib/server/registry/nativeDeps.js +0 -490
  415. data/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +0 -138
  416. data/node_modules/playwright-core/lib/server/screenshotter.js +0 -348
  417. data/node_modules/playwright-core/lib/server/selectors.js +0 -73
  418. data/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +0 -328
  419. data/node_modules/playwright-core/lib/server/socksInterceptor.js +0 -100
  420. data/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +0 -171
  421. data/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +0 -493
  422. data/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +0 -486
  423. data/node_modules/playwright-core/lib/server/trace/test/inMemorySnapshotter.js +0 -93
  424. data/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +0 -216
  425. data/node_modules/playwright-core/lib/server/transport.js +0 -191
  426. data/node_modules/playwright-core/lib/server/types.js +0 -24
  427. data/node_modules/playwright-core/lib/server/usKeyboardLayout.js +0 -555
  428. data/node_modules/playwright-core/lib/server/webkit/webkit.js +0 -87
  429. data/node_modules/playwright-core/lib/server/webkit/wkAccessibility.js +0 -194
  430. data/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +0 -328
  431. data/node_modules/playwright-core/lib/server/webkit/wkConnection.js +0 -173
  432. data/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +0 -146
  433. data/node_modules/playwright-core/lib/server/webkit/wkInput.js +0 -169
  434. data/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +0 -162
  435. data/node_modules/playwright-core/lib/server/webkit/wkPage.js +0 -1216
  436. data/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +0 -94
  437. data/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +0 -104
  438. data/node_modules/playwright-core/lib/third_party/diff_match_patch.js +0 -2222
  439. data/node_modules/playwright-core/lib/third_party/pixelmatch.js +0 -255
  440. data/node_modules/playwright-core/lib/utils/ascii.js +0 -31
  441. data/node_modules/playwright-core/lib/utils/comparators.js +0 -171
  442. data/node_modules/playwright-core/lib/utils/crypto.js +0 -174
  443. data/node_modules/playwright-core/lib/utils/debug.js +0 -46
  444. data/node_modules/playwright-core/lib/utils/debugLogger.js +0 -91
  445. data/node_modules/playwright-core/lib/utils/env.js +0 -49
  446. data/node_modules/playwright-core/lib/utils/eventsHelper.js +0 -38
  447. data/node_modules/playwright-core/lib/utils/expectUtils.js +0 -33
  448. data/node_modules/playwright-core/lib/utils/fileUtils.js +0 -205
  449. data/node_modules/playwright-core/lib/utils/happy-eyeballs.js +0 -181
  450. data/node_modules/playwright-core/lib/utils/headers.js +0 -52
  451. data/node_modules/playwright-core/lib/utils/hostPlatform.js +0 -133
  452. data/node_modules/playwright-core/lib/utils/httpServer.js +0 -236
  453. data/node_modules/playwright-core/lib/utils/index.js +0 -368
  454. data/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +0 -250
  455. data/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +0 -979
  456. data/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +0 -651
  457. data/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +0 -179
  458. data/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +0 -62
  459. data/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +0 -29
  460. data/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +0 -397
  461. data/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +0 -139
  462. data/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +0 -39
  463. data/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +0 -120
  464. data/node_modules/playwright-core/lib/utils/linuxUtils.js +0 -78
  465. data/node_modules/playwright-core/lib/utils/manualPromise.js +0 -109
  466. data/node_modules/playwright-core/lib/utils/multimap.js +0 -75
  467. data/node_modules/playwright-core/lib/utils/network.js +0 -160
  468. data/node_modules/playwright-core/lib/utils/processLauncher.js +0 -248
  469. data/node_modules/playwright-core/lib/utils/profiler.js +0 -53
  470. data/node_modules/playwright-core/lib/utils/rtti.js +0 -44
  471. data/node_modules/playwright-core/lib/utils/semaphore.js +0 -51
  472. data/node_modules/playwright-core/lib/utils/spawnAsync.js +0 -45
  473. data/node_modules/playwright-core/lib/utils/stackTrace.js +0 -121
  474. data/node_modules/playwright-core/lib/utils/task.js +0 -58
  475. data/node_modules/playwright-core/lib/utils/time.js +0 -37
  476. data/node_modules/playwright-core/lib/utils/timeoutRunner.js +0 -66
  477. data/node_modules/playwright-core/lib/utils/traceUtils.js +0 -44
  478. data/node_modules/playwright-core/lib/utils/userAgent.js +0 -105
  479. data/node_modules/playwright-core/lib/utils/wsServer.js +0 -127
  480. data/node_modules/playwright-core/lib/utils/zipFile.js +0 -75
  481. data/node_modules/playwright-core/lib/utils/zones.js +0 -62
  482. data/node_modules/playwright-core/lib/utilsBundle.js +0 -82
  483. data/node_modules/playwright-core/lib/utilsBundleImpl/index.js +0 -53
  484. data/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +0 -1066
  485. data/node_modules/playwright-core/lib/vite/htmlReport/index.html +0 -66
  486. data/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-aW6Vz3gf.js +0 -24
  487. data/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-ez37Vkbh.css +0 -1
  488. data/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  489. data/node_modules/playwright-core/lib/vite/recorder/assets/index-B-MT5gKo.css +0 -1
  490. data/node_modules/playwright-core/lib/vite/recorder/assets/index-DCpXOVIh.js +0 -47
  491. data/node_modules/playwright-core/lib/vite/recorder/index.html +0 -29
  492. data/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +0 -9
  493. data/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-eFKCUIu2.js +0 -24
  494. data/node_modules/playwright-core/lib/vite/traceViewer/assets/testServerConnection-DeE2kSzz.js +0 -1
  495. data/node_modules/playwright-core/lib/vite/traceViewer/assets/workbench-D0cirtfA.js +0 -72
  496. data/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-BeNbaIVa.js +0 -9
  497. data/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.ez37Vkbh.css +0 -1
  498. data/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  499. data/node_modules/playwright-core/lib/vite/traceViewer/embedded.BkuvsLJp.js +0 -2
  500. data/node_modules/playwright-core/lib/vite/traceViewer/embedded.html +0 -16
  501. data/node_modules/playwright-core/lib/vite/traceViewer/embedded.w7WN2u1R.css +0 -1
  502. data/node_modules/playwright-core/lib/vite/traceViewer/index.C968kAiC.js +0 -2
  503. data/node_modules/playwright-core/lib/vite/traceViewer/index.CrbWWHbf.css +0 -1
  504. data/node_modules/playwright-core/lib/vite/traceViewer/index.html +0 -27
  505. data/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +0 -9
  506. data/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +0 -21
  507. data/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +0 -3
  508. data/node_modules/playwright-core/lib/vite/traceViewer/uiMode.BkFnr4V0.js +0 -10
  509. data/node_modules/playwright-core/lib/vite/traceViewer/uiMode.D3cNFP6u.css +0 -1
  510. data/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +0 -18
  511. data/node_modules/playwright-core/lib/vite/traceViewer/workbench.DjbIuxix.css +0 -1
  512. data/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DSXBckUd.css +0 -32
  513. data/node_modules/playwright-core/lib/zipBundle.js +0 -25
  514. data/node_modules/playwright-core/lib/zipBundleImpl.js +0 -5
  515. data/node_modules/playwright-core/package.json +0 -44
  516. data/node_modules/playwright-core/types/protocol.d.ts +0 -21500
  517. data/node_modules/playwright-core/types/structs.d.ts +0 -45
  518. data/node_modules/playwright-core/types/types.d.ts +0 -21431
  519. data/node_modules/undici-types/LICENSE +0 -21
  520. data/node_modules/undici-types/README.md +0 -6
  521. data/node_modules/undici-types/agent.d.ts +0 -31
  522. data/node_modules/undici-types/api.d.ts +0 -43
  523. data/node_modules/undici-types/balanced-pool.d.ts +0 -29
  524. data/node_modules/undici-types/cache.d.ts +0 -36
  525. data/node_modules/undici-types/client.d.ts +0 -108
  526. data/node_modules/undici-types/connector.d.ts +0 -34
  527. data/node_modules/undici-types/content-type.d.ts +0 -21
  528. data/node_modules/undici-types/cookies.d.ts +0 -28
  529. data/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  530. data/node_modules/undici-types/dispatcher.d.ts +0 -255
  531. data/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  532. data/node_modules/undici-types/errors.d.ts +0 -149
  533. data/node_modules/undici-types/eventsource.d.ts +0 -63
  534. data/node_modules/undici-types/fetch.d.ts +0 -209
  535. data/node_modules/undici-types/file.d.ts +0 -39
  536. data/node_modules/undici-types/filereader.d.ts +0 -54
  537. data/node_modules/undici-types/formdata.d.ts +0 -108
  538. data/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  539. data/node_modules/undici-types/global-origin.d.ts +0 -7
  540. data/node_modules/undici-types/handlers.d.ts +0 -15
  541. data/node_modules/undici-types/header.d.ts +0 -4
  542. data/node_modules/undici-types/index.d.ts +0 -71
  543. data/node_modules/undici-types/interceptors.d.ts +0 -15
  544. data/node_modules/undici-types/mock-agent.d.ts +0 -50
  545. data/node_modules/undici-types/mock-client.d.ts +0 -25
  546. data/node_modules/undici-types/mock-errors.d.ts +0 -12
  547. data/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  548. data/node_modules/undici-types/mock-pool.d.ts +0 -25
  549. data/node_modules/undici-types/package.json +0 -55
  550. data/node_modules/undici-types/patch.d.ts +0 -71
  551. data/node_modules/undici-types/pool-stats.d.ts +0 -19
  552. data/node_modules/undici-types/pool.d.ts +0 -39
  553. data/node_modules/undici-types/proxy-agent.d.ts +0 -28
  554. data/node_modules/undici-types/readable.d.ts +0 -60
  555. data/node_modules/undici-types/retry-agent.d.ts +0 -8
  556. data/node_modules/undici-types/retry-handler.d.ts +0 -116
  557. data/node_modules/undici-types/util.d.ts +0 -18
  558. data/node_modules/undici-types/webidl.d.ts +0 -222
  559. data/node_modules/undici-types/websocket.d.ts +0 -152
  560. data/yarn.lock +0 -41
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.source = void 0;
7
- const source = exports.source = "\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n for (const name in obj) { fn = obj[name]; break; }\n const module = { exports: {} };\n fn(module.exports, module);\n result = module.exports;\n }\n return result;\n }\n};\nvar __export = (target, all) => {for (var name in all) target[name] = all[name];};\nvar __toESM = mod => ({ ...mod, 'default': mod });\nvar __toCommonJS = mod => ({ ...mod, __esModule: true });\n\n\n// packages/playwright-core/src/server/injected/clock.ts\nvar clock_exports = {};\n__export(clock_exports, {\n ClockController: () => ClockController,\n createClock: () => createClock,\n inject: () => inject,\n install: () => install\n});\nmodule.exports = __toCommonJS(clock_exports);\nvar ClockController = class {\n constructor(embedder) {\n this._duringTick = false;\n this._timers = /* @__PURE__ */ new Map();\n this._uniqueTimerId = idCounterStart;\n this.disposables = [];\n this._log = [];\n this._now = { time: asWallTime(0), isFixedTime: false, ticks: 0, origin: asWallTime(-1) };\n this._embedder = embedder;\n }\n uninstall() {\n this.disposables.forEach((dispose) => dispose());\n this.disposables.length = 0;\n }\n now() {\n this._replayLogOnce();\n return this._now.time;\n }\n install(time) {\n this._replayLogOnce();\n this._innerSetTime(asWallTime(time));\n }\n setSystemTime(time) {\n this._replayLogOnce();\n this._innerSetTime(asWallTime(time));\n }\n setFixedTime(time) {\n this._replayLogOnce();\n this._innerSetFixedTime(asWallTime(time));\n }\n performanceNow() {\n this._replayLogOnce();\n return this._now.ticks;\n }\n _innerSetTime(time) {\n this._now.time = time;\n this._now.isFixedTime = false;\n if (this._now.origin < 0)\n this._now.origin = this._now.time;\n }\n _innerSetFixedTime(time) {\n this._innerSetTime(time);\n this._now.isFixedTime = true;\n }\n _advanceNow(to) {\n if (!this._now.isFixedTime)\n this._now.time = asWallTime(this._now.time + to - this._now.ticks);\n this._now.ticks = to;\n }\n async log(type, time, param) {\n this._log.push({ type, time, param });\n }\n async runFor(ticks) {\n this._replayLogOnce();\n if (ticks < 0)\n throw new TypeError(\"Negative ticks are not supported\");\n await this._runTo(shiftTicks(this._now.ticks, ticks));\n }\n async _runTo(to) {\n to = Math.ceil(to);\n if (this._now.ticks > to)\n return;\n let firstException;\n while (true) {\n const result = await this._callFirstTimer(to);\n if (!result.timerFound)\n break;\n firstException = firstException || result.error;\n }\n this._advanceNow(to);\n if (firstException)\n throw firstException;\n }\n async pauseAt(time) {\n this._replayLogOnce();\n this._innerPause();\n const toConsume = time - this._now.time;\n await this._innerFastForwardTo(shiftTicks(this._now.ticks, toConsume));\n return toConsume;\n }\n _innerPause() {\n this._realTime = void 0;\n this._updateRealTimeTimer();\n }\n resume() {\n this._replayLogOnce();\n this._innerResume();\n }\n _innerResume() {\n const now = this._embedder.performanceNow();\n this._realTime = { startTicks: now, lastSyncTicks: now };\n this._updateRealTimeTimer();\n }\n _updateRealTimeTimer() {\n var _a;\n if (!this._realTime) {\n (_a = this._currentRealTimeTimer) == null ? void 0 : _a.dispose();\n this._currentRealTimeTimer = void 0;\n return;\n }\n const firstTimer = this._firstTimer();\n const callAt = Math.min(firstTimer ? firstTimer.callAt : this._now.ticks + maxTimeout, this._now.ticks + 100);\n if (this._currentRealTimeTimer && this._currentRealTimeTimer.callAt < callAt)\n return;\n if (this._currentRealTimeTimer) {\n this._currentRealTimeTimer.dispose();\n this._currentRealTimeTimer = void 0;\n }\n this._currentRealTimeTimer = {\n callAt,\n dispose: this._embedder.setTimeout(() => {\n const now = this._embedder.performanceNow();\n this._currentRealTimeTimer = void 0;\n const sinceLastSync = now - this._realTime.lastSyncTicks;\n this._realTime.lastSyncTicks = now;\n void this._runTo(shiftTicks(this._now.ticks, sinceLastSync)).catch((e) => console.error(e)).then(() => this._updateRealTimeTimer());\n }, callAt - this._now.ticks)\n };\n }\n async fastForward(ticks) {\n this._replayLogOnce();\n await this._innerFastForwardTo(shiftTicks(this._now.ticks, ticks | 0));\n }\n async _innerFastForwardTo(to) {\n if (to < this._now.ticks)\n throw new Error(\"Cannot fast-forward to the past\");\n for (const timer of this._timers.values()) {\n if (to > timer.callAt)\n timer.callAt = to;\n }\n await this._runTo(to);\n }\n addTimer(options) {\n this._replayLogOnce();\n if (options.type === \"AnimationFrame\" /* AnimationFrame */ && !options.func)\n throw new Error(\"Callback must be provided to requestAnimationFrame calls\");\n if (options.type === \"IdleCallback\" /* IdleCallback */ && !options.func)\n throw new Error(\"Callback must be provided to requestIdleCallback calls\");\n if ([\"Timeout\" /* Timeout */, \"Interval\" /* Interval */].includes(options.type) && !options.func && options.delay === void 0)\n throw new Error(\"Callback must be provided to timer calls\");\n let delay = options.delay ? +options.delay : 0;\n if (!Number.isFinite(delay))\n delay = 0;\n delay = delay > maxTimeout ? 1 : delay;\n delay = Math.max(0, delay);\n const timer = {\n type: options.type,\n func: options.func,\n args: options.args || [],\n delay,\n callAt: shiftTicks(this._now.ticks, delay || (this._duringTick ? 1 : 0)),\n createdAt: this._now.ticks,\n id: this._uniqueTimerId++,\n error: new Error()\n };\n this._timers.set(timer.id, timer);\n if (this._realTime)\n this._updateRealTimeTimer();\n return timer.id;\n }\n countTimers() {\n return this._timers.size;\n }\n _firstTimer(beforeTick) {\n let firstTimer = null;\n for (const timer of this._timers.values()) {\n const isInRange = beforeTick === void 0 || timer.callAt <= beforeTick;\n if (isInRange && (!firstTimer || compareTimers(firstTimer, timer) === 1))\n firstTimer = timer;\n }\n return firstTimer;\n }\n _takeFirstTimer(beforeTick) {\n const timer = this._firstTimer(beforeTick);\n if (!timer)\n return null;\n this._advanceNow(timer.callAt);\n if (timer.type === \"Interval\" /* Interval */)\n timer.callAt = shiftTicks(timer.callAt, timer.delay);\n else\n this._timers.delete(timer.id);\n return timer;\n }\n async _callFirstTimer(beforeTick) {\n const timer = this._takeFirstTimer(beforeTick);\n if (!timer)\n return { timerFound: false };\n this._duringTick = true;\n try {\n if (typeof timer.func !== \"function\") {\n let error2;\n try {\n (() => {\n globalThis.eval(timer.func);\n })();\n } catch (e) {\n error2 = e;\n }\n await new Promise((f) => this._embedder.setTimeout(f));\n return { timerFound: true, error: error2 };\n }\n let args = timer.args;\n if (timer.type === \"AnimationFrame\" /* AnimationFrame */)\n args = [this._now.ticks];\n else if (timer.type === \"IdleCallback\" /* IdleCallback */)\n args = [{ didTimeout: false, timeRemaining: () => 0 }];\n let error;\n try {\n timer.func.apply(null, args);\n } catch (e) {\n error = e;\n }\n await new Promise((f) => this._embedder.setTimeout(f));\n return { timerFound: true, error };\n } finally {\n this._duringTick = false;\n }\n }\n getTimeToNextFrame() {\n return 16 - this._now.ticks % 16;\n }\n clearTimer(timerId, type) {\n this._replayLogOnce();\n if (!timerId) {\n return;\n }\n const id = Number(timerId);\n if (Number.isNaN(id) || id < idCounterStart) {\n const handlerName = getClearHandler(type);\n new Error(`Clock: ${handlerName} was invoked to clear a native timer instead of one created by the clock library.`);\n }\n const timer = this._timers.get(id);\n if (timer) {\n if (timer.type === type || timer.type === \"Timeout\" && type === \"Interval\" || timer.type === \"Interval\" && type === \"Timeout\") {\n this._timers.delete(id);\n } else {\n const clear = getClearHandler(type);\n const schedule = getScheduleHandler(timer.type);\n throw new Error(\n `Cannot clear timer: timer created with ${schedule}() but cleared with ${clear}()`\n );\n }\n }\n }\n _replayLogOnce() {\n if (!this._log.length)\n return;\n let lastLogTime = -1;\n let isPaused = false;\n for (const { type, time, param } of this._log) {\n if (!isPaused && lastLogTime !== -1)\n this._advanceNow(shiftTicks(this._now.ticks, time - lastLogTime));\n lastLogTime = time;\n if (type === \"install\") {\n this._innerSetTime(asWallTime(param));\n } else if (type === \"fastForward\" || type === \"runFor\") {\n this._advanceNow(shiftTicks(this._now.ticks, param));\n } else if (type === \"pauseAt\") {\n isPaused = true;\n this._innerPause();\n this._innerSetTime(asWallTime(param));\n } else if (type === \"resume\") {\n this._innerResume();\n isPaused = false;\n } else if (type === \"setFixedTime\") {\n this._innerSetFixedTime(asWallTime(param));\n } else if (type === \"setSystemTime\") {\n this._innerSetTime(asWallTime(param));\n }\n }\n if (!isPaused && lastLogTime > 0)\n this._advanceNow(shiftTicks(this._now.ticks, this._embedder.dateNow() - lastLogTime));\n this._log.length = 0;\n }\n};\nfunction mirrorDateProperties(target, source) {\n for (const prop in source) {\n if (source.hasOwnProperty(prop))\n target[prop] = source[prop];\n }\n target.toString = () => source.toString();\n target.prototype = source.prototype;\n target.parse = source.parse;\n target.UTC = source.UTC;\n target.prototype.toUTCString = source.prototype.toUTCString;\n target.isFake = true;\n return target;\n}\nfunction createDate(clock, NativeDate) {\n function ClockDate(year, month, date, hour, minute, second, ms) {\n if (!(this instanceof ClockDate))\n return new NativeDate(clock.now()).toString();\n switch (arguments.length) {\n case 0:\n return new NativeDate(clock.now());\n case 1:\n return new NativeDate(year);\n case 2:\n return new NativeDate(year, month);\n case 3:\n return new NativeDate(year, month, date);\n case 4:\n return new NativeDate(year, month, date, hour);\n case 5:\n return new NativeDate(year, month, date, hour, minute);\n case 6:\n return new NativeDate(\n year,\n month,\n date,\n hour,\n minute,\n second\n );\n default:\n return new NativeDate(\n year,\n month,\n date,\n hour,\n minute,\n second,\n ms\n );\n }\n }\n ClockDate.now = () => clock.now();\n return mirrorDateProperties(ClockDate, NativeDate);\n}\nfunction createIntl(clock, NativeIntl) {\n const ClockIntl = {};\n for (const key of Object.getOwnPropertyNames(NativeIntl))\n ClockIntl[key] = NativeIntl[key];\n ClockIntl.DateTimeFormat = function(...args) {\n const realFormatter = new NativeIntl.DateTimeFormat(...args);\n const formatter = {\n formatRange: realFormatter.formatRange.bind(realFormatter),\n formatRangeToParts: realFormatter.formatRangeToParts.bind(realFormatter),\n resolvedOptions: realFormatter.resolvedOptions.bind(realFormatter),\n format: (date) => realFormatter.format(date || clock.now()),\n formatToParts: (date) => realFormatter.formatToParts(date || clock.now())\n };\n return formatter;\n };\n ClockIntl.DateTimeFormat.prototype = Object.create(\n NativeIntl.DateTimeFormat.prototype\n );\n ClockIntl.DateTimeFormat.supportedLocalesOf = NativeIntl.DateTimeFormat.supportedLocalesOf;\n return ClockIntl;\n}\nfunction compareTimers(a, b) {\n if (a.callAt < b.callAt)\n return -1;\n if (a.callAt > b.callAt)\n return 1;\n if (a.type === \"Immediate\" /* Immediate */ && b.type !== \"Immediate\" /* Immediate */)\n return -1;\n if (a.type !== \"Immediate\" /* Immediate */ && b.type === \"Immediate\" /* Immediate */)\n return 1;\n if (a.createdAt < b.createdAt)\n return -1;\n if (a.createdAt > b.createdAt)\n return 1;\n if (a.id < b.id)\n return -1;\n if (a.id > b.id)\n return 1;\n}\nvar maxTimeout = Math.pow(2, 31) - 1;\nvar idCounterStart = 1e12;\nfunction platformOriginals(globalObject) {\n const raw = {\n setTimeout: globalObject.setTimeout,\n clearTimeout: globalObject.clearTimeout,\n setInterval: globalObject.setInterval,\n clearInterval: globalObject.clearInterval,\n requestAnimationFrame: globalObject.requestAnimationFrame ? globalObject.requestAnimationFrame : void 0,\n cancelAnimationFrame: globalObject.cancelAnimationFrame ? globalObject.cancelAnimationFrame : void 0,\n requestIdleCallback: globalObject.requestIdleCallback ? globalObject.requestIdleCallback : void 0,\n cancelIdleCallback: globalObject.cancelIdleCallback ? globalObject.cancelIdleCallback : void 0,\n Date: globalObject.Date,\n performance: globalObject.performance,\n Intl: globalObject.Intl\n };\n const bound = { ...raw };\n for (const key of Object.keys(bound)) {\n if (key !== \"Date\" && typeof bound[key] === \"function\")\n bound[key] = bound[key].bind(globalObject);\n }\n return { raw, bound };\n}\nfunction getScheduleHandler(type) {\n if (type === \"IdleCallback\" || type === \"AnimationFrame\")\n return `request${type}`;\n return `set${type}`;\n}\nfunction createApi(clock, originals) {\n return {\n setTimeout: (func, timeout, ...args) => {\n const delay = timeout ? +timeout : timeout;\n return clock.addTimer({\n type: \"Timeout\" /* Timeout */,\n func,\n args,\n delay\n });\n },\n clearTimeout: (timerId) => {\n if (timerId)\n clock.clearTimer(timerId, \"Timeout\" /* Timeout */);\n },\n setInterval: (func, timeout, ...args) => {\n const delay = timeout ? +timeout : timeout;\n return clock.addTimer({\n type: \"Interval\" /* Interval */,\n func,\n args,\n delay\n });\n },\n clearInterval: (timerId) => {\n if (timerId)\n return clock.clearTimer(timerId, \"Interval\" /* Interval */);\n },\n requestAnimationFrame: (callback) => {\n return clock.addTimer({\n type: \"AnimationFrame\" /* AnimationFrame */,\n func: callback,\n delay: clock.getTimeToNextFrame()\n });\n },\n cancelAnimationFrame: (timerId) => {\n if (timerId)\n return clock.clearTimer(timerId, \"AnimationFrame\" /* AnimationFrame */);\n },\n requestIdleCallback: (callback, options) => {\n let timeToNextIdlePeriod = 0;\n if (clock.countTimers() > 0)\n timeToNextIdlePeriod = 50;\n return clock.addTimer({\n type: \"IdleCallback\" /* IdleCallback */,\n func: callback,\n delay: (options == null ? void 0 : options.timeout) ? Math.min(options == null ? void 0 : options.timeout, timeToNextIdlePeriod) : timeToNextIdlePeriod\n });\n },\n cancelIdleCallback: (timerId) => {\n if (timerId)\n return clock.clearTimer(timerId, \"IdleCallback\" /* IdleCallback */);\n },\n Intl: originals.Intl ? createIntl(clock, originals.Intl) : void 0,\n Date: createDate(clock, originals.Date),\n performance: originals.performance ? fakePerformance(clock, originals.performance) : void 0\n };\n}\nfunction getClearHandler(type) {\n if (type === \"IdleCallback\" || type === \"AnimationFrame\")\n return `cancel${type}`;\n return `clear${type}`;\n}\nfunction fakePerformance(clock, performance) {\n const result = {\n now: () => clock.performanceNow()\n };\n result.__defineGetter__(\"timeOrigin\", () => clock._now.origin || 0);\n for (const key of Object.keys(performance.__proto__)) {\n if (key === \"now\" || key === \"timeOrigin\")\n continue;\n if (key === \"getEntries\" || key === \"getEntriesByName\" || key === \"getEntriesByType\")\n result[key] = () => [];\n else\n result[key] = () => {\n };\n }\n return result;\n}\nfunction createClock(globalObject) {\n const originals = platformOriginals(globalObject);\n const embedder = {\n dateNow: () => originals.raw.Date.now(),\n performanceNow: () => Math.ceil(originals.raw.performance.now()),\n setTimeout: (task, timeout) => {\n const timerId = originals.bound.setTimeout(task, timeout);\n return () => originals.bound.clearTimeout(timerId);\n },\n setInterval: (task, delay) => {\n const intervalId = originals.bound.setInterval(task, delay);\n return () => originals.bound.clearInterval(intervalId);\n }\n };\n const clock = new ClockController(embedder);\n const api = createApi(clock, originals.bound);\n return { clock, api, originals: originals.raw };\n}\nfunction install(globalObject, config = {}) {\n var _a, _b;\n if ((_a = globalObject.Date) == null ? void 0 : _a.isFake) {\n throw new TypeError(`Can't install fake timers twice on the same global object.`);\n }\n const { clock, api, originals } = createClock(globalObject);\n const toFake = ((_b = config.toFake) == null ? void 0 : _b.length) ? config.toFake : Object.keys(originals);\n for (const method of toFake) {\n if (method === \"Date\") {\n globalObject.Date = mirrorDateProperties(api.Date, globalObject.Date);\n } else if (method === \"Intl\") {\n globalObject.Intl = api[method];\n } else if (method === \"performance\") {\n globalObject.performance = api[method];\n const kEventTimeStamp = Symbol(\"playwrightEventTimeStamp\");\n Object.defineProperty(Event.prototype, \"timeStamp\", {\n get() {\n var _a2;\n if (!this[kEventTimeStamp])\n this[kEventTimeStamp] = (_a2 = api.performance) == null ? void 0 : _a2.now();\n return this[kEventTimeStamp];\n }\n });\n } else {\n globalObject[method] = (...args) => {\n return api[method].apply(api, args);\n };\n }\n clock.disposables.push(() => {\n globalObject[method] = originals[method];\n });\n }\n return { clock, api, originals };\n}\nfunction inject(globalObject) {\n const builtin = platformOriginals(globalObject).bound;\n const { clock: controller } = install(globalObject);\n controller.resume();\n return {\n controller,\n builtin\n };\n}\nfunction asWallTime(n) {\n return n;\n}\nfunction shiftTicks(ticks, ms) {\n return ticks + ms;\n}\n";
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.source = void 0;
7
- const source = exports.source = "\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n for (const name in obj) { fn = obj[name]; break; }\n const module = { exports: {} };\n fn(module.exports, module);\n result = module.exports;\n }\n return result;\n }\n};\nvar __export = (target, all) => {for (var name in all) target[name] = all[name];};\nvar __toESM = mod => ({ ...mod, 'default': mod });\nvar __toCommonJS = mod => ({ ...mod, __esModule: true });\n\n\n// packages/playwright-core/src/server/injected/consoleApi.ts\nvar consoleApi_exports = {};\n__export(consoleApi_exports, {\n default: () => consoleApi_default\n});\nmodule.exports = __toCommonJS(consoleApi_exports);\n\n// packages/playwright-core/src/utils/isomorphic/stringUtils.ts\nfunction escapeWithQuotes(text, char = \"'\") {\n const stringified = JSON.stringify(text);\n const escapedText = stringified.substring(1, stringified.length - 1).replace(/\\\\\"/g, '\"');\n if (char === \"'\")\n return char + escapedText.replace(/[']/g, \"\\\\'\") + char;\n if (char === '\"')\n return char + escapedText.replace(/[\"]/g, '\\\\\"') + char;\n if (char === \"`\")\n return char + escapedText.replace(/[`]/g, \"`\") + char;\n throw new Error(\"Invalid escape char\");\n}\nfunction toTitleCase(name) {\n return name.charAt(0).toUpperCase() + name.substring(1);\n}\nfunction toSnakeCase(name) {\n return name.replace(/([a-z0-9])([A-Z])/g, \"$1_$2\").replace(/([A-Z])([A-Z][a-z])/g, \"$1_$2\").toLowerCase();\n}\nfunction normalizeEscapedRegexQuotes(source) {\n return source.replace(/(^|[^\\\\])(\\\\\\\\)*\\\\(['\"`])/g, \"$1$2$3\");\n}\nfunction escapeRegexForSelector(re) {\n if (re.unicode || re.unicodeSets)\n return String(re);\n return String(re).replace(/(^|[^\\\\])(\\\\\\\\)*([\"'`])/g, \"$1$2\\\\$3\").replace(/>>/g, \"\\\\>\\\\>\");\n}\nfunction escapeForTextSelector(text, exact) {\n if (typeof text !== \"string\")\n return escapeRegexForSelector(text);\n return `${JSON.stringify(text)}${exact ? \"s\" : \"i\"}`;\n}\nfunction escapeForAttributeSelector(value, exact) {\n if (typeof value !== \"string\")\n return escapeRegexForSelector(value);\n return `\"${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/[\"]/g, '\\\\\"')}\"${exact ? \"s\" : \"i\"}`;\n}\n\n// packages/playwright-core/src/utils/isomorphic/locatorUtils.ts\nfunction getByAttributeTextSelector(attrName, text, options) {\n return `internal:attr=[${attrName}=${escapeForAttributeSelector(text, (options == null ? void 0 : options.exact) || false)}]`;\n}\nfunction getByTestIdSelector(testIdAttributeName, testId) {\n return `internal:testid=[${testIdAttributeName}=${escapeForAttributeSelector(testId, true)}]`;\n}\nfunction getByLabelSelector(text, options) {\n return \"internal:label=\" + escapeForTextSelector(text, !!(options == null ? void 0 : options.exact));\n}\nfunction getByAltTextSelector(text, options) {\n return getByAttributeTextSelector(\"alt\", text, options);\n}\nfunction getByTitleSelector(text, options) {\n return getByAttributeTextSelector(\"title\", text, options);\n}\nfunction getByPlaceholderSelector(text, options) {\n return getByAttributeTextSelector(\"placeholder\", text, options);\n}\nfunction getByTextSelector(text, options) {\n return \"internal:text=\" + escapeForTextSelector(text, !!(options == null ? void 0 : options.exact));\n}\nfunction getByRoleSelector(role, options = {}) {\n const props = [];\n if (options.checked !== void 0)\n props.push([\"checked\", String(options.checked)]);\n if (options.disabled !== void 0)\n props.push([\"disabled\", String(options.disabled)]);\n if (options.selected !== void 0)\n props.push([\"selected\", String(options.selected)]);\n if (options.expanded !== void 0)\n props.push([\"expanded\", String(options.expanded)]);\n if (options.includeHidden !== void 0)\n props.push([\"include-hidden\", String(options.includeHidden)]);\n if (options.level !== void 0)\n props.push([\"level\", String(options.level)]);\n if (options.name !== void 0)\n props.push([\"name\", escapeForAttributeSelector(options.name, !!options.exact)]);\n if (options.pressed !== void 0)\n props.push([\"pressed\", String(options.pressed)]);\n return `internal:role=${role}${props.map(([n, v]) => `[${n}=${v}]`).join(\"\")}`;\n}\n\n// packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts\nvar between = function(num, first, last) {\n return num >= first && num <= last;\n};\nfunction digit(code) {\n return between(code, 48, 57);\n}\nfunction hexdigit(code) {\n return digit(code) || between(code, 65, 70) || between(code, 97, 102);\n}\nfunction uppercaseletter(code) {\n return between(code, 65, 90);\n}\nfunction lowercaseletter(code) {\n return between(code, 97, 122);\n}\nfunction letter(code) {\n return uppercaseletter(code) || lowercaseletter(code);\n}\nfunction nonascii(code) {\n return code >= 128;\n}\nfunction namestartchar(code) {\n return letter(code) || nonascii(code) || code === 95;\n}\nfunction namechar(code) {\n return namestartchar(code) || digit(code) || code === 45;\n}\nfunction nonprintable(code) {\n return between(code, 0, 8) || code === 11 || between(code, 14, 31) || code === 127;\n}\nfunction newline(code) {\n return code === 10;\n}\nfunction whitespace(code) {\n return newline(code) || code === 9 || code === 32;\n}\nvar maximumallowedcodepoint = 1114111;\nvar InvalidCharacterError = class extends Error {\n constructor(message) {\n super(message);\n this.name = \"InvalidCharacterError\";\n }\n};\nfunction preprocess(str) {\n const codepoints = [];\n for (let i = 0; i < str.length; i++) {\n let code = str.charCodeAt(i);\n if (code === 13 && str.charCodeAt(i + 1) === 10) {\n code = 10;\n i++;\n }\n if (code === 13 || code === 12)\n code = 10;\n if (code === 0)\n code = 65533;\n if (between(code, 55296, 56319) && between(str.charCodeAt(i + 1), 56320, 57343)) {\n const lead = code - 55296;\n const trail = str.charCodeAt(i + 1) - 56320;\n code = Math.pow(2, 16) + lead * Math.pow(2, 10) + trail;\n i++;\n }\n codepoints.push(code);\n }\n return codepoints;\n}\nfunction stringFromCode(code) {\n if (code <= 65535)\n return String.fromCharCode(code);\n code -= Math.pow(2, 16);\n const lead = Math.floor(code / Math.pow(2, 10)) + 55296;\n const trail = code % Math.pow(2, 10) + 56320;\n return String.fromCharCode(lead) + String.fromCharCode(trail);\n}\nfunction tokenize(str1) {\n const str = preprocess(str1);\n let i = -1;\n const tokens = [];\n let code;\n let line = 0;\n let column = 0;\n let lastLineLength = 0;\n const incrLineno = function() {\n line += 1;\n lastLineLength = column;\n column = 0;\n };\n const locStart = { line, column };\n const codepoint = function(i2) {\n if (i2 >= str.length)\n return -1;\n return str[i2];\n };\n const next = function(num) {\n if (num === void 0)\n num = 1;\n if (num > 3)\n throw \"Spec Error: no more than three codepoints of lookahead.\";\n return codepoint(i + num);\n };\n const consume = function(num) {\n if (num === void 0)\n num = 1;\n i += num;\n code = codepoint(i);\n if (newline(code))\n incrLineno();\n else\n column += num;\n return true;\n };\n const reconsume = function() {\n i -= 1;\n if (newline(code)) {\n line -= 1;\n column = lastLineLength;\n } else {\n column -= 1;\n }\n locStart.line = line;\n locStart.column = column;\n return true;\n };\n const eof = function(codepoint2) {\n if (codepoint2 === void 0)\n codepoint2 = code;\n return codepoint2 === -1;\n };\n const donothing = function() {\n };\n const parseerror = function() {\n };\n const consumeAToken = function() {\n consumeComments();\n consume();\n if (whitespace(code)) {\n while (whitespace(next()))\n consume();\n return new WhitespaceToken();\n } else if (code === 34) {\n return consumeAStringToken();\n } else if (code === 35) {\n if (namechar(next()) || areAValidEscape(next(1), next(2))) {\n const token = new HashToken(\"\");\n if (wouldStartAnIdentifier(next(1), next(2), next(3)))\n token.type = \"id\";\n token.value = consumeAName();\n return token;\n } else {\n return new DelimToken(code);\n }\n } else if (code === 36) {\n if (next() === 61) {\n consume();\n return new SuffixMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 39) {\n return consumeAStringToken();\n } else if (code === 40) {\n return new OpenParenToken();\n } else if (code === 41) {\n return new CloseParenToken();\n } else if (code === 42) {\n if (next() === 61) {\n consume();\n return new SubstringMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 43) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 44) {\n return new CommaToken();\n } else if (code === 45) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else if (next(1) === 45 && next(2) === 62) {\n consume(2);\n return new CDCToken();\n } else if (startsWithAnIdentifier()) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 46) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 58) {\n return new ColonToken();\n } else if (code === 59) {\n return new SemicolonToken();\n } else if (code === 60) {\n if (next(1) === 33 && next(2) === 45 && next(3) === 45) {\n consume(3);\n return new CDOToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 64) {\n if (wouldStartAnIdentifier(next(1), next(2), next(3)))\n return new AtKeywordToken(consumeAName());\n else\n return new DelimToken(code);\n } else if (code === 91) {\n return new OpenSquareToken();\n } else if (code === 92) {\n if (startsWithAValidEscape()) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else {\n parseerror();\n return new DelimToken(code);\n }\n } else if (code === 93) {\n return new CloseSquareToken();\n } else if (code === 94) {\n if (next() === 61) {\n consume();\n return new PrefixMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 123) {\n return new OpenCurlyToken();\n } else if (code === 124) {\n if (next() === 61) {\n consume();\n return new DashMatchToken();\n } else if (next() === 124) {\n consume();\n return new ColumnToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 125) {\n return new CloseCurlyToken();\n } else if (code === 126) {\n if (next() === 61) {\n consume();\n return new IncludeMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (digit(code)) {\n reconsume();\n return consumeANumericToken();\n } else if (namestartchar(code)) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else if (eof()) {\n return new EOFToken();\n } else {\n return new DelimToken(code);\n }\n };\n const consumeComments = function() {\n while (next(1) === 47 && next(2) === 42) {\n consume(2);\n while (true) {\n consume();\n if (code === 42 && next() === 47) {\n consume();\n break;\n } else if (eof()) {\n parseerror();\n return;\n }\n }\n }\n };\n const consumeANumericToken = function() {\n const num = consumeANumber();\n if (wouldStartAnIdentifier(next(1), next(2), next(3))) {\n const token = new DimensionToken();\n token.value = num.value;\n token.repr = num.repr;\n token.type = num.type;\n token.unit = consumeAName();\n return token;\n } else if (next() === 37) {\n consume();\n const token = new PercentageToken();\n token.value = num.value;\n token.repr = num.repr;\n return token;\n } else {\n const token = new NumberToken();\n token.value = num.value;\n token.repr = num.repr;\n token.type = num.type;\n return token;\n }\n };\n const consumeAnIdentlikeToken = function() {\n const str2 = consumeAName();\n if (str2.toLowerCase() === \"url\" && next() === 40) {\n consume();\n while (whitespace(next(1)) && whitespace(next(2)))\n consume();\n if (next() === 34 || next() === 39)\n return new FunctionToken(str2);\n else if (whitespace(next()) && (next(2) === 34 || next(2) === 39))\n return new FunctionToken(str2);\n else\n return consumeAURLToken();\n } else if (next() === 40) {\n consume();\n return new FunctionToken(str2);\n } else {\n return new IdentToken(str2);\n }\n };\n const consumeAStringToken = function(endingCodePoint) {\n if (endingCodePoint === void 0)\n endingCodePoint = code;\n let string = \"\";\n while (consume()) {\n if (code === endingCodePoint || eof()) {\n return new StringToken(string);\n } else if (newline(code)) {\n parseerror();\n reconsume();\n return new BadStringToken();\n } else if (code === 92) {\n if (eof(next()))\n donothing();\n else if (newline(next()))\n consume();\n else\n string += stringFromCode(consumeEscape());\n } else {\n string += stringFromCode(code);\n }\n }\n throw new Error(\"Internal error\");\n };\n const consumeAURLToken = function() {\n const token = new URLToken(\"\");\n while (whitespace(next()))\n consume();\n if (eof(next()))\n return token;\n while (consume()) {\n if (code === 41 || eof()) {\n return token;\n } else if (whitespace(code)) {\n while (whitespace(next()))\n consume();\n if (next() === 41 || eof(next())) {\n consume();\n return token;\n } else {\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n }\n } else if (code === 34 || code === 39 || code === 40 || nonprintable(code)) {\n parseerror();\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n } else if (code === 92) {\n if (startsWithAValidEscape()) {\n token.value += stringFromCode(consumeEscape());\n } else {\n parseerror();\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n }\n } else {\n token.value += stringFromCode(code);\n }\n }\n throw new Error(\"Internal error\");\n };\n const consumeEscape = function() {\n consume();\n if (hexdigit(code)) {\n const digits = [code];\n for (let total = 0; total < 5; total++) {\n if (hexdigit(next())) {\n consume();\n digits.push(code);\n } else {\n break;\n }\n }\n if (whitespace(next()))\n consume();\n let value = parseInt(digits.map(function(x) {\n return String.fromCharCode(x);\n }).join(\"\"), 16);\n if (value > maximumallowedcodepoint)\n value = 65533;\n return value;\n } else if (eof()) {\n return 65533;\n } else {\n return code;\n }\n };\n const areAValidEscape = function(c1, c2) {\n if (c1 !== 92)\n return false;\n if (newline(c2))\n return false;\n return true;\n };\n const startsWithAValidEscape = function() {\n return areAValidEscape(code, next());\n };\n const wouldStartAnIdentifier = function(c1, c2, c3) {\n if (c1 === 45)\n return namestartchar(c2) || c2 === 45 || areAValidEscape(c2, c3);\n else if (namestartchar(c1))\n return true;\n else if (c1 === 92)\n return areAValidEscape(c1, c2);\n else\n return false;\n };\n const startsWithAnIdentifier = function() {\n return wouldStartAnIdentifier(code, next(1), next(2));\n };\n const wouldStartANumber = function(c1, c2, c3) {\n if (c1 === 43 || c1 === 45) {\n if (digit(c2))\n return true;\n if (c2 === 46 && digit(c3))\n return true;\n return false;\n } else if (c1 === 46) {\n if (digit(c2))\n return true;\n return false;\n } else if (digit(c1)) {\n return true;\n } else {\n return false;\n }\n };\n const startsWithANumber = function() {\n return wouldStartANumber(code, next(1), next(2));\n };\n const consumeAName = function() {\n let result = \"\";\n while (consume()) {\n if (namechar(code)) {\n result += stringFromCode(code);\n } else if (startsWithAValidEscape()) {\n result += stringFromCode(consumeEscape());\n } else {\n reconsume();\n return result;\n }\n }\n throw new Error(\"Internal parse error\");\n };\n const consumeANumber = function() {\n let repr = \"\";\n let type = \"integer\";\n if (next() === 43 || next() === 45) {\n consume();\n repr += stringFromCode(code);\n }\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n if (next(1) === 46 && digit(next(2))) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n }\n const c1 = next(1), c2 = next(2), c3 = next(3);\n if ((c1 === 69 || c1 === 101) && digit(c2)) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n } else if ((c1 === 69 || c1 === 101) && (c2 === 43 || c2 === 45) && digit(c3)) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n }\n const value = convertAStringToANumber(repr);\n return { type, value, repr };\n };\n const convertAStringToANumber = function(string) {\n return +string;\n };\n const consumeTheRemnantsOfABadURL = function() {\n while (consume()) {\n if (code === 41 || eof()) {\n return;\n } else if (startsWithAValidEscape()) {\n consumeEscape();\n donothing();\n } else {\n donothing();\n }\n }\n };\n let iterationCount = 0;\n while (!eof(next())) {\n tokens.push(consumeAToken());\n iterationCount++;\n if (iterationCount > str.length * 2)\n throw new Error(\"I'm infinite-looping!\");\n }\n return tokens;\n}\nvar CSSParserToken = class {\n constructor() {\n this.tokenType = \"\";\n }\n toJSON() {\n return { token: this.tokenType };\n }\n toString() {\n return this.tokenType;\n }\n toSource() {\n return \"\" + this;\n }\n};\nvar BadStringToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"BADSTRING\";\n }\n};\nvar BadURLToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"BADURL\";\n }\n};\nvar WhitespaceToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"WHITESPACE\";\n }\n toString() {\n return \"WS\";\n }\n toSource() {\n return \" \";\n }\n};\nvar CDOToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"CDO\";\n }\n toSource() {\n return \"<!--\";\n }\n};\nvar CDCToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"CDC\";\n }\n toSource() {\n return \"-->\";\n }\n};\nvar ColonToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \":\";\n }\n};\nvar SemicolonToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \";\";\n }\n};\nvar CommaToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \",\";\n }\n};\nvar GroupingToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.value = \"\";\n this.mirror = \"\";\n }\n};\nvar OpenCurlyToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"{\";\n this.value = \"{\";\n this.mirror = \"}\";\n }\n};\nvar CloseCurlyToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"}\";\n this.value = \"}\";\n this.mirror = \"{\";\n }\n};\nvar OpenSquareToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"[\";\n this.value = \"[\";\n this.mirror = \"]\";\n }\n};\nvar CloseSquareToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"]\";\n this.value = \"]\";\n this.mirror = \"[\";\n }\n};\nvar OpenParenToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"(\";\n this.value = \"(\";\n this.mirror = \")\";\n }\n};\nvar CloseParenToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \")\";\n this.value = \")\";\n this.mirror = \"(\";\n }\n};\nvar IncludeMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"~=\";\n }\n};\nvar DashMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"|=\";\n }\n};\nvar PrefixMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"^=\";\n }\n};\nvar SuffixMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"$=\";\n }\n};\nvar SubstringMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"*=\";\n }\n};\nvar ColumnToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"||\";\n }\n};\nvar EOFToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"EOF\";\n }\n toSource() {\n return \"\";\n }\n};\nvar DelimToken = class extends CSSParserToken {\n constructor(code) {\n super();\n this.tokenType = \"DELIM\";\n this.value = \"\";\n this.value = stringFromCode(code);\n }\n toString() {\n return \"DELIM(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n return json;\n }\n toSource() {\n if (this.value === \"\\\\\")\n return \"\\\\\\n\";\n else\n return this.value;\n }\n};\nvar StringValuedToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.value = \"\";\n }\n ASCIIMatch(str) {\n return this.value.toLowerCase() === str.toLowerCase();\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n return json;\n }\n};\nvar IdentToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"IDENT\";\n this.value = val;\n }\n toString() {\n return \"IDENT(\" + this.value + \")\";\n }\n toSource() {\n return escapeIdent(this.value);\n }\n};\nvar FunctionToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"FUNCTION\";\n this.value = val;\n this.mirror = \")\";\n }\n toString() {\n return \"FUNCTION(\" + this.value + \")\";\n }\n toSource() {\n return escapeIdent(this.value) + \"(\";\n }\n};\nvar AtKeywordToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"AT-KEYWORD\";\n this.value = val;\n }\n toString() {\n return \"AT(\" + this.value + \")\";\n }\n toSource() {\n return \"@\" + escapeIdent(this.value);\n }\n};\nvar HashToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"HASH\";\n this.value = val;\n this.type = \"unrestricted\";\n }\n toString() {\n return \"HASH(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.type = this.type;\n return json;\n }\n toSource() {\n if (this.type === \"id\")\n return \"#\" + escapeIdent(this.value);\n else\n return \"#\" + escapeHash(this.value);\n }\n};\nvar StringToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"STRING\";\n this.value = val;\n }\n toString() {\n return '\"' + escapeString(this.value) + '\"';\n }\n};\nvar URLToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"URL\";\n this.value = val;\n }\n toString() {\n return \"URL(\" + this.value + \")\";\n }\n toSource() {\n return 'url(\"' + escapeString(this.value) + '\")';\n }\n};\nvar NumberToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"NUMBER\";\n this.type = \"integer\";\n this.repr = \"\";\n }\n toString() {\n if (this.type === \"integer\")\n return \"INT(\" + this.value + \")\";\n return \"NUMBER(\" + this.value + \")\";\n }\n toJSON() {\n const json = super.toJSON();\n json.value = this.value;\n json.type = this.type;\n json.repr = this.repr;\n return json;\n }\n toSource() {\n return this.repr;\n }\n};\nvar PercentageToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"PERCENTAGE\";\n this.repr = \"\";\n }\n toString() {\n return \"PERCENTAGE(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.repr = this.repr;\n return json;\n }\n toSource() {\n return this.repr + \"%\";\n }\n};\nvar DimensionToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"DIMENSION\";\n this.type = \"integer\";\n this.repr = \"\";\n this.unit = \"\";\n }\n toString() {\n return \"DIM(\" + this.value + \",\" + this.unit + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.type = this.type;\n json.repr = this.repr;\n json.unit = this.unit;\n return json;\n }\n toSource() {\n const source = this.repr;\n let unit = escapeIdent(this.unit);\n if (unit[0].toLowerCase() === \"e\" && (unit[1] === \"-\" || between(unit.charCodeAt(1), 48, 57))) {\n unit = \"\\\\65 \" + unit.slice(1, unit.length);\n }\n return source + unit;\n }\n};\nfunction escapeIdent(string) {\n string = \"\" + string;\n let result = \"\";\n const firstcode = string.charCodeAt(0);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (between(code, 1, 31) || code === 127 || i === 0 && between(code, 48, 57) || i === 1 && between(code, 48, 57) && firstcode === 45)\n result += \"\\\\\" + code.toString(16) + \" \";\n else if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))\n result += string[i];\n else\n result += \"\\\\\" + string[i];\n }\n return result;\n}\nfunction escapeHash(string) {\n string = \"\" + string;\n let result = \"\";\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))\n result += string[i];\n else\n result += \"\\\\\" + code.toString(16) + \" \";\n }\n return result;\n}\nfunction escapeString(string) {\n string = \"\" + string;\n let result = \"\";\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (between(code, 1, 31) || code === 127)\n result += \"\\\\\" + code.toString(16) + \" \";\n else if (code === 34 || code === 92)\n result += \"\\\\\" + string[i];\n else\n result += string[i];\n }\n return result;\n}\n\n// packages/playwright-core/src/utils/isomorphic/cssParser.ts\nvar InvalidSelectorError = class extends Error {\n};\nfunction parseCSS(selector, customNames) {\n let tokens;\n try {\n tokens = tokenize(selector);\n if (!(tokens[tokens.length - 1] instanceof EOFToken))\n tokens.push(new EOFToken());\n } catch (e) {\n const newMessage = e.message + ` while parsing selector \"${selector}\"`;\n const index = (e.stack || \"\").indexOf(e.message);\n if (index !== -1)\n e.stack = e.stack.substring(0, index) + newMessage + e.stack.substring(index + e.message.length);\n e.message = newMessage;\n throw e;\n }\n const unsupportedToken = tokens.find((token) => {\n return token instanceof AtKeywordToken || token instanceof BadStringToken || token instanceof BadURLToken || token instanceof ColumnToken || token instanceof CDOToken || token instanceof CDCToken || token instanceof SemicolonToken || // TODO: Consider using these for something, e.g. to escape complex strings.\n // For example :xpath{ (//div/bar[@attr=\"foo\"])[2]/baz }\n // Or this way :xpath( {complex-xpath-goes-here(\"hello\")} )\n token instanceof OpenCurlyToken || token instanceof CloseCurlyToken || // TODO: Consider treating these as strings?\n token instanceof URLToken || token instanceof PercentageToken;\n });\n if (unsupportedToken)\n throw new InvalidSelectorError(`Unsupported token \"${unsupportedToken.toSource()}\" while parsing selector \"${selector}\"`);\n let pos = 0;\n const names = /* @__PURE__ */ new Set();\n function unexpected() {\n return new InvalidSelectorError(`Unexpected token \"${tokens[pos].toSource()}\" while parsing selector \"${selector}\"`);\n }\n function skipWhitespace() {\n while (tokens[pos] instanceof WhitespaceToken)\n pos++;\n }\n function isIdent(p = pos) {\n return tokens[p] instanceof IdentToken;\n }\n function isString(p = pos) {\n return tokens[p] instanceof StringToken;\n }\n function isNumber(p = pos) {\n return tokens[p] instanceof NumberToken;\n }\n function isComma(p = pos) {\n return tokens[p] instanceof CommaToken;\n }\n function isOpenParen(p = pos) {\n return tokens[p] instanceof OpenParenToken;\n }\n function isCloseParen(p = pos) {\n return tokens[p] instanceof CloseParenToken;\n }\n function isFunction(p = pos) {\n return tokens[p] instanceof FunctionToken;\n }\n function isStar(p = pos) {\n return tokens[p] instanceof DelimToken && tokens[p].value === \"*\";\n }\n function isEOF(p = pos) {\n return tokens[p] instanceof EOFToken;\n }\n function isClauseCombinator(p = pos) {\n return tokens[p] instanceof DelimToken && [\">\", \"+\", \"~\"].includes(tokens[p].value);\n }\n function isSelectorClauseEnd(p = pos) {\n return isComma(p) || isCloseParen(p) || isEOF(p) || isClauseCombinator(p) || tokens[p] instanceof WhitespaceToken;\n }\n function consumeFunctionArguments() {\n const result2 = [consumeArgument()];\n while (true) {\n skipWhitespace();\n if (!isComma())\n break;\n pos++;\n result2.push(consumeArgument());\n }\n return result2;\n }\n function consumeArgument() {\n skipWhitespace();\n if (isNumber())\n return tokens[pos++].value;\n if (isString())\n return tokens[pos++].value;\n return consumeComplexSelector();\n }\n function consumeComplexSelector() {\n const result2 = { simples: [] };\n skipWhitespace();\n if (isClauseCombinator()) {\n result2.simples.push({ selector: { functions: [{ name: \"scope\", args: [] }] }, combinator: \"\" });\n } else {\n result2.simples.push({ selector: consumeSimpleSelector(), combinator: \"\" });\n }\n while (true) {\n skipWhitespace();\n if (isClauseCombinator()) {\n result2.simples[result2.simples.length - 1].combinator = tokens[pos++].value;\n skipWhitespace();\n } else if (isSelectorClauseEnd()) {\n break;\n }\n result2.simples.push({ combinator: \"\", selector: consumeSimpleSelector() });\n }\n return result2;\n }\n function consumeSimpleSelector() {\n let rawCSSString = \"\";\n const functions = [];\n while (!isSelectorClauseEnd()) {\n if (isIdent() || isStar()) {\n rawCSSString += tokens[pos++].toSource();\n } else if (tokens[pos] instanceof HashToken) {\n rawCSSString += tokens[pos++].toSource();\n } else if (tokens[pos] instanceof DelimToken && tokens[pos].value === \".\") {\n pos++;\n if (isIdent())\n rawCSSString += \".\" + tokens[pos++].toSource();\n else\n throw unexpected();\n } else if (tokens[pos] instanceof ColonToken) {\n pos++;\n if (isIdent()) {\n if (!customNames.has(tokens[pos].value.toLowerCase())) {\n rawCSSString += \":\" + tokens[pos++].toSource();\n } else {\n const name = tokens[pos++].value.toLowerCase();\n functions.push({ name, args: [] });\n names.add(name);\n }\n } else if (isFunction()) {\n const name = tokens[pos++].value.toLowerCase();\n if (!customNames.has(name)) {\n rawCSSString += `:${name}(${consumeBuiltinFunctionArguments()})`;\n } else {\n functions.push({ name, args: consumeFunctionArguments() });\n names.add(name);\n }\n skipWhitespace();\n if (!isCloseParen())\n throw unexpected();\n pos++;\n } else {\n throw unexpected();\n }\n } else if (tokens[pos] instanceof OpenSquareToken) {\n rawCSSString += \"[\";\n pos++;\n while (!(tokens[pos] instanceof CloseSquareToken) && !isEOF())\n rawCSSString += tokens[pos++].toSource();\n if (!(tokens[pos] instanceof CloseSquareToken))\n throw unexpected();\n rawCSSString += \"]\";\n pos++;\n } else {\n throw unexpected();\n }\n }\n if (!rawCSSString && !functions.length)\n throw unexpected();\n return { css: rawCSSString || void 0, functions };\n }\n function consumeBuiltinFunctionArguments() {\n let s = \"\";\n let balance = 1;\n while (!isEOF()) {\n if (isOpenParen() || isFunction())\n balance++;\n if (isCloseParen())\n balance--;\n if (!balance)\n break;\n s += tokens[pos++].toSource();\n }\n return s;\n }\n const result = consumeFunctionArguments();\n if (!isEOF())\n throw unexpected();\n if (result.some((arg) => typeof arg !== \"object\" || !(\"simples\" in arg)))\n throw new InvalidSelectorError(`Error while parsing selector \"${selector}\"`);\n return { selector: result, names: Array.from(names) };\n}\n\n// packages/playwright-core/src/utils/isomorphic/selectorParser.ts\nvar kNestedSelectorNames = /* @__PURE__ */ new Set([\"internal:has\", \"internal:has-not\", \"internal:and\", \"internal:or\", \"internal:chain\", \"left-of\", \"right-of\", \"above\", \"below\", \"near\"]);\nvar kNestedSelectorNamesWithDistance = /* @__PURE__ */ new Set([\"left-of\", \"right-of\", \"above\", \"below\", \"near\"]);\nvar customCSSNames = /* @__PURE__ */ new Set([\"not\", \"is\", \"where\", \"has\", \"scope\", \"light\", \"visible\", \"text\", \"text-matches\", \"text-is\", \"has-text\", \"above\", \"below\", \"right-of\", \"left-of\", \"near\", \"nth-match\"]);\nfunction parseSelector(selector) {\n const parsedStrings = parseSelectorString(selector);\n const parts = [];\n for (const part of parsedStrings.parts) {\n if (part.name === \"css\" || part.name === \"css:light\") {\n if (part.name === \"css:light\")\n part.body = \":light(\" + part.body + \")\";\n const parsedCSS = parseCSS(part.body, customCSSNames);\n parts.push({\n name: \"css\",\n body: parsedCSS.selector,\n source: part.body\n });\n continue;\n }\n if (kNestedSelectorNames.has(part.name)) {\n let innerSelector;\n let distance;\n try {\n const unescaped = JSON.parse(\"[\" + part.body + \"]\");\n if (!Array.isArray(unescaped) || unescaped.length < 1 || unescaped.length > 2 || typeof unescaped[0] !== \"string\")\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n innerSelector = unescaped[0];\n if (unescaped.length === 2) {\n if (typeof unescaped[1] !== \"number\" || !kNestedSelectorNamesWithDistance.has(part.name))\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n distance = unescaped[1];\n }\n } catch (e) {\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n }\n const nested = { name: part.name, source: part.body, body: { parsed: parseSelector(innerSelector), distance } };\n const lastFrame = [...nested.body.parsed.parts].reverse().find((part2) => part2.name === \"internal:control\" && part2.body === \"enter-frame\");\n const lastFrameIndex = lastFrame ? nested.body.parsed.parts.indexOf(lastFrame) : -1;\n if (lastFrameIndex !== -1 && selectorPartsEqual(nested.body.parsed.parts.slice(0, lastFrameIndex + 1), parts.slice(0, lastFrameIndex + 1)))\n nested.body.parsed.parts.splice(0, lastFrameIndex + 1);\n parts.push(nested);\n continue;\n }\n parts.push({ ...part, source: part.body });\n }\n if (kNestedSelectorNames.has(parts[0].name))\n throw new InvalidSelectorError(`\"${parts[0].name}\" selector cannot be first`);\n return {\n capture: parsedStrings.capture,\n parts\n };\n}\nfunction selectorPartsEqual(list1, list2) {\n return stringifySelector({ parts: list1 }) === stringifySelector({ parts: list2 });\n}\nfunction stringifySelector(selector, forceEngineName) {\n if (typeof selector === \"string\")\n return selector;\n return selector.parts.map((p, i) => {\n let includeEngine = true;\n if (!forceEngineName && i !== selector.capture) {\n if (p.name === \"css\")\n includeEngine = false;\n else if (p.name === \"xpath\" && p.source.startsWith(\"//\") || p.source.startsWith(\"..\"))\n includeEngine = false;\n }\n const prefix = includeEngine ? p.name + \"=\" : \"\";\n return `${i === selector.capture ? \"*\" : \"\"}${prefix}${p.source}`;\n }).join(\" >> \");\n}\nfunction parseSelectorString(selector) {\n let index = 0;\n let quote;\n let start = 0;\n const result = { parts: [] };\n const append = () => {\n const part = selector.substring(start, index).trim();\n const eqIndex = part.indexOf(\"=\");\n let name;\n let body;\n if (eqIndex !== -1 && part.substring(0, eqIndex).trim().match(/^[a-zA-Z_0-9-+:*]+$/)) {\n name = part.substring(0, eqIndex).trim();\n body = part.substring(eqIndex + 1);\n } else if (part.length > 1 && part[0] === '\"' && part[part.length - 1] === '\"') {\n name = \"text\";\n body = part;\n } else if (part.length > 1 && part[0] === \"'\" && part[part.length - 1] === \"'\") {\n name = \"text\";\n body = part;\n } else if (/^\\(*\\/\\//.test(part) || part.startsWith(\"..\")) {\n name = \"xpath\";\n body = part;\n } else {\n name = \"css\";\n body = part;\n }\n let capture = false;\n if (name[0] === \"*\") {\n capture = true;\n name = name.substring(1);\n }\n result.parts.push({ name, body });\n if (capture) {\n if (result.capture !== void 0)\n throw new InvalidSelectorError(`Only one of the selectors can capture using * modifier`);\n result.capture = result.parts.length - 1;\n }\n };\n if (!selector.includes(\">>\")) {\n index = selector.length;\n append();\n return result;\n }\n const shouldIgnoreTextSelectorQuote = () => {\n const prefix = selector.substring(start, index);\n const match = prefix.match(/^\\s*text\\s*=(.*)$/);\n return !!match && !!match[1];\n };\n while (index < selector.length) {\n const c = selector[index];\n if (c === \"\\\\\" && index + 1 < selector.length) {\n index += 2;\n } else if (c === quote) {\n quote = void 0;\n index++;\n } else if (!quote && (c === '\"' || c === \"'\" || c === \"`\") && !shouldIgnoreTextSelectorQuote()) {\n quote = c;\n index++;\n } else if (!quote && c === \">\" && selector[index + 1] === \">\") {\n append();\n index += 2;\n start = index;\n } else {\n index++;\n }\n }\n append();\n return result;\n}\nfunction parseAttributeSelector(selector, allowUnquotedStrings) {\n let wp = 0;\n let EOL = selector.length === 0;\n const next = () => selector[wp] || \"\";\n const eat1 = () => {\n const result2 = next();\n ++wp;\n EOL = wp >= selector.length;\n return result2;\n };\n const syntaxError = (stage) => {\n if (EOL)\n throw new InvalidSelectorError(`Unexpected end of selector while parsing selector \\`${selector}\\``);\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - unexpected symbol \"${next()}\" at position ${wp}` + (stage ? \" during \" + stage : \"\"));\n };\n function skipSpaces() {\n while (!EOL && /\\s/.test(next()))\n eat1();\n }\n function isCSSNameChar(char) {\n return char >= \"\\x80\" || char >= \"0\" && char <= \"9\" || char >= \"A\" && char <= \"Z\" || char >= \"a\" && char <= \"z\" || char >= \"0\" && char <= \"9\" || char === \"_\" || char === \"-\";\n }\n function readIdentifier() {\n let result2 = \"\";\n skipSpaces();\n while (!EOL && isCSSNameChar(next()))\n result2 += eat1();\n return result2;\n }\n function readQuotedString(quote) {\n let result2 = eat1();\n if (result2 !== quote)\n syntaxError(\"parsing quoted string\");\n while (!EOL && next() !== quote) {\n if (next() === \"\\\\\")\n eat1();\n result2 += eat1();\n }\n if (next() !== quote)\n syntaxError(\"parsing quoted string\");\n result2 += eat1();\n return result2;\n }\n function readRegularExpression() {\n if (eat1() !== \"/\")\n syntaxError(\"parsing regular expression\");\n let source = \"\";\n let inClass = false;\n while (!EOL) {\n if (next() === \"\\\\\") {\n source += eat1();\n if (EOL)\n syntaxError(\"parsing regular expression\");\n } else if (inClass && next() === \"]\") {\n inClass = false;\n } else if (!inClass && next() === \"[\") {\n inClass = true;\n } else if (!inClass && next() === \"/\") {\n break;\n }\n source += eat1();\n }\n if (eat1() !== \"/\")\n syntaxError(\"parsing regular expression\");\n let flags = \"\";\n while (!EOL && next().match(/[dgimsuy]/))\n flags += eat1();\n try {\n return new RegExp(source, flags);\n } catch (e) {\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\`: ${e.message}`);\n }\n }\n function readAttributeToken() {\n let token = \"\";\n skipSpaces();\n if (next() === `'` || next() === `\"`)\n token = readQuotedString(next()).slice(1, -1);\n else\n token = readIdentifier();\n if (!token)\n syntaxError(\"parsing property path\");\n return token;\n }\n function readOperator() {\n skipSpaces();\n let op = \"\";\n if (!EOL)\n op += eat1();\n if (!EOL && op !== \"=\")\n op += eat1();\n if (![\"=\", \"*=\", \"^=\", \"$=\", \"|=\", \"~=\"].includes(op))\n syntaxError(\"parsing operator\");\n return op;\n }\n function readAttribute() {\n eat1();\n const jsonPath = [];\n jsonPath.push(readAttributeToken());\n skipSpaces();\n while (next() === \".\") {\n eat1();\n jsonPath.push(readAttributeToken());\n skipSpaces();\n }\n if (next() === \"]\") {\n eat1();\n return { name: jsonPath.join(\".\"), jsonPath, op: \"<truthy>\", value: null, caseSensitive: false };\n }\n const operator = readOperator();\n let value = void 0;\n let caseSensitive = true;\n skipSpaces();\n if (next() === \"/\") {\n if (operator !== \"=\")\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - cannot use ${operator} in attribute with regular expression`);\n value = readRegularExpression();\n } else if (next() === `'` || next() === `\"`) {\n value = readQuotedString(next()).slice(1, -1);\n skipSpaces();\n if (next() === \"i\" || next() === \"I\") {\n caseSensitive = false;\n eat1();\n } else if (next() === \"s\" || next() === \"S\") {\n caseSensitive = true;\n eat1();\n }\n } else {\n value = \"\";\n while (!EOL && (isCSSNameChar(next()) || next() === \"+\" || next() === \".\"))\n value += eat1();\n if (value === \"true\") {\n value = true;\n } else if (value === \"false\") {\n value = false;\n } else {\n if (!allowUnquotedStrings) {\n value = +value;\n if (Number.isNaN(value))\n syntaxError(\"parsing attribute value\");\n }\n }\n }\n skipSpaces();\n if (next() !== \"]\")\n syntaxError(\"parsing attribute value\");\n eat1();\n if (operator !== \"=\" && typeof value !== \"string\")\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - cannot use ${operator} in attribute with non-string matching value - ${value}`);\n return { name: jsonPath.join(\".\"), jsonPath, op: operator, value, caseSensitive };\n }\n const result = {\n name: \"\",\n attributes: []\n };\n result.name = readIdentifier();\n skipSpaces();\n while (next() === \"[\") {\n result.attributes.push(readAttribute());\n skipSpaces();\n }\n if (!EOL)\n syntaxError(void 0);\n if (!result.name && !result.attributes.length)\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - selector cannot be empty`);\n return result;\n}\n\n// packages/playwright-core/src/utils/isomorphic/locatorGenerators.ts\nfunction asLocator(lang, selector, isFrameLocator = false) {\n return asLocators(lang, selector, isFrameLocator)[0];\n}\nfunction asLocators(lang, selector, isFrameLocator = false, maxOutputSize = 20, preferredQuote) {\n try {\n return innerAsLocators(new generators[lang](preferredQuote), parseSelector(selector), isFrameLocator, maxOutputSize);\n } catch (e) {\n return [selector];\n }\n}\nfunction innerAsLocators(factory, parsed, isFrameLocator = false, maxOutputSize = 20) {\n const parts = [...parsed.parts];\n for (let index = 0; index < parts.length - 1; index++) {\n if (parts[index].name === \"nth\" && parts[index + 1].name === \"internal:control\" && parts[index + 1].body === \"enter-frame\") {\n const [nth] = parts.splice(index, 1);\n parts.splice(index + 1, 0, nth);\n }\n }\n const tokens = [];\n let nextBase = isFrameLocator ? \"frame-locator\" : \"page\";\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const base = nextBase;\n nextBase = \"locator\";\n if (part.name === \"nth\") {\n if (part.body === \"0\")\n tokens.push([factory.generateLocator(base, \"first\", \"\"), factory.generateLocator(base, \"nth\", \"0\")]);\n else if (part.body === \"-1\")\n tokens.push([factory.generateLocator(base, \"last\", \"\"), factory.generateLocator(base, \"nth\", \"-1\")]);\n else\n tokens.push([factory.generateLocator(base, \"nth\", part.body)]);\n continue;\n }\n if (part.name === \"internal:text\") {\n const { exact, text } = detectExact(part.body);\n tokens.push([factory.generateLocator(base, \"text\", text, { exact })]);\n continue;\n }\n if (part.name === \"internal:has-text\") {\n const { exact, text } = detectExact(part.body);\n if (!exact) {\n tokens.push([factory.generateLocator(base, \"has-text\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:has-not-text\") {\n const { exact, text } = detectExact(part.body);\n if (!exact) {\n tokens.push([factory.generateLocator(base, \"has-not-text\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:has\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"has\", inner)));\n continue;\n }\n if (part.name === \"internal:has-not\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"hasNot\", inner)));\n continue;\n }\n if (part.name === \"internal:and\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"and\", inner)));\n continue;\n }\n if (part.name === \"internal:or\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"or\", inner)));\n continue;\n }\n if (part.name === \"internal:chain\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"chain\", inner)));\n continue;\n }\n if (part.name === \"internal:label\") {\n const { exact, text } = detectExact(part.body);\n tokens.push([factory.generateLocator(base, \"label\", text, { exact })]);\n continue;\n }\n if (part.name === \"internal:role\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const options = { attrs: [] };\n for (const attr of attrSelector.attributes) {\n if (attr.name === \"name\") {\n options.exact = attr.caseSensitive;\n options.name = attr.value;\n } else {\n if (attr.name === \"level\" && typeof attr.value === \"string\")\n attr.value = +attr.value;\n options.attrs.push({ name: attr.name === \"include-hidden\" ? \"includeHidden\" : attr.name, value: attr.value });\n }\n }\n tokens.push([factory.generateLocator(base, \"role\", attrSelector.name, options)]);\n continue;\n }\n if (part.name === \"internal:testid\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const { value } = attrSelector.attributes[0];\n tokens.push([factory.generateLocator(base, \"test-id\", value)]);\n continue;\n }\n if (part.name === \"internal:attr\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const { name, value, caseSensitive } = attrSelector.attributes[0];\n const text = value;\n const exact = !!caseSensitive;\n if (name === \"placeholder\") {\n tokens.push([factory.generateLocator(base, \"placeholder\", text, { exact })]);\n continue;\n }\n if (name === \"alt\") {\n tokens.push([factory.generateLocator(base, \"alt\", text, { exact })]);\n continue;\n }\n if (name === \"title\") {\n tokens.push([factory.generateLocator(base, \"title\", text, { exact })]);\n continue;\n }\n }\n let locatorType = \"default\";\n const nextPart = parts[index + 1];\n if (nextPart && nextPart.name === \"internal:control\" && nextPart.body === \"enter-frame\") {\n locatorType = \"frame\";\n nextBase = \"frame-locator\";\n index++;\n }\n const selectorPart = stringifySelector({ parts: [part] });\n const locatorPart = factory.generateLocator(base, locatorType, selectorPart);\n if (locatorType === \"default\" && nextPart && [\"internal:has-text\", \"internal:has-not-text\"].includes(nextPart.name)) {\n const { exact, text } = detectExact(nextPart.body);\n if (!exact) {\n const nextLocatorPart = factory.generateLocator(\"locator\", nextPart.name === \"internal:has-text\" ? \"has-text\" : \"has-not-text\", text, { exact });\n const options = {};\n if (nextPart.name === \"internal:has-text\")\n options.hasText = text;\n else\n options.hasNotText = text;\n const combinedPart = factory.generateLocator(base, \"default\", selectorPart, options);\n tokens.push([factory.chainLocators([locatorPart, nextLocatorPart]), combinedPart]);\n index++;\n continue;\n }\n }\n let locatorPartWithEngine;\n if ([\"xpath\", \"css\"].includes(part.name)) {\n const selectorPart2 = stringifySelector(\n { parts: [part] },\n /* forceEngineName */\n true\n );\n locatorPartWithEngine = factory.generateLocator(base, locatorType, selectorPart2);\n }\n tokens.push([locatorPart, locatorPartWithEngine].filter(Boolean));\n }\n return combineTokens(factory, tokens, maxOutputSize);\n}\nfunction combineTokens(factory, tokens, maxOutputSize) {\n const currentTokens = tokens.map(() => \"\");\n const result = [];\n const visit = (index) => {\n if (index === tokens.length) {\n result.push(factory.chainLocators(currentTokens));\n return currentTokens.length < maxOutputSize;\n }\n for (const taken of tokens[index]) {\n currentTokens[index] = taken;\n if (!visit(index + 1))\n return false;\n }\n return true;\n };\n visit(0);\n return result;\n}\nfunction detectExact(text) {\n let exact = false;\n const match = text.match(/^\\/(.*)\\/([igm]*)$/);\n if (match)\n return { text: new RegExp(match[1], match[2]) };\n if (text.endsWith('\"')) {\n text = JSON.parse(text);\n exact = true;\n } else if (text.endsWith('\"s')) {\n text = JSON.parse(text.substring(0, text.length - 1));\n exact = true;\n } else if (text.endsWith('\"i')) {\n text = JSON.parse(text.substring(0, text.length - 1));\n exact = false;\n }\n return { exact, text };\n}\nvar JavaScriptLocatorFactory = class {\n constructor(preferredQuote) {\n this.preferredQuote = preferredQuote;\n }\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, { hasText: ${this.toHasText(options.hasText)} })`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, { hasNotText: ${this.toHasText(options.hasNotText)} })`;\n return `locator(${this.quote(body)})`;\n case \"frame\":\n return `frameLocator(${this.quote(body)})`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first()`;\n case \"last\":\n return `last()`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`name: ${this.regexToSourceString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`name: ${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`exact: true`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`${name}: ${typeof value === \"string\" ? this.quote(value) : value}`);\n const attrString = attrs.length ? `, { ${attrs.join(\", \")} }` : \"\";\n return `getByRole(${this.quote(body)}${attrString})`;\n case \"has-text\":\n return `filter({ hasText: ${this.toHasText(body)} })`;\n case \"has-not-text\":\n return `filter({ hasNotText: ${this.toHasText(body)} })`;\n case \"has\":\n return `filter({ has: ${body} })`;\n case \"hasNot\":\n return `filter({ hasNot: ${body} })`;\n case \"and\":\n return `and(${body})`;\n case \"or\":\n return `or(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `getByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"getByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"getByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"getByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"getByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"getByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToSourceString(re) {\n return normalizeEscapedRegexQuotes(String(re));\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToSourceString(body)})`;\n return exact ? `${method}(${this.quote(body)}, { exact: true })` : `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToSourceString(body);\n return this.quote(body);\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToSourceString(value);\n return this.quote(value);\n }\n quote(text) {\n var _a;\n return escapeWithQuotes(text, (_a = this.preferredQuote) != null ? _a : \"'\");\n }\n};\nvar PythonLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, has_text=${this.toHasText(options.hasText)})`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, has_not_text=${this.toHasText(options.hasNotText)})`;\n return `locator(${this.quote(body)})`;\n case \"frame\":\n return `frame_locator(${this.quote(body)})`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first`;\n case \"last\":\n return `last`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`name=${this.regexToString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`name=${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`exact=True`);\n }\n for (const { name, value } of options.attrs) {\n let valueString = typeof value === \"string\" ? this.quote(value) : value;\n if (typeof value === \"boolean\")\n valueString = value ? \"True\" : \"False\";\n attrs.push(`${toSnakeCase(name)}=${valueString}`);\n }\n const attrString = attrs.length ? `, ${attrs.join(\", \")}` : \"\";\n return `get_by_role(${this.quote(body)}${attrString})`;\n case \"has-text\":\n return `filter(has_text=${this.toHasText(body)})`;\n case \"has-not-text\":\n return `filter(has_not_text=${this.toHasText(body)})`;\n case \"has\":\n return `filter(has=${body})`;\n case \"hasNot\":\n return `filter(has_not=${body})`;\n case \"and\":\n return `and_(${body})`;\n case \"or\":\n return `or_(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `get_by_test_id(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"get_by_text\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"get_by_alt_text\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"get_by_placeholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"get_by_label\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"get_by_title\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", re.IGNORECASE\" : \"\";\n return `re.compile(r\"${normalizeEscapedRegexQuotes(body.source).replace(/\\\\\\//, \"/\").replace(/\"/g, '\\\\\"')}\"${suffix})`;\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, exact=True)`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToString(body);\n return `${this.quote(body)}`;\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar JavaLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n let clazz;\n switch (base) {\n case \"page\":\n clazz = \"Page\";\n break;\n case \"frame-locator\":\n clazz = \"FrameLocator\";\n break;\n case \"locator\":\n clazz = \"Locator\";\n break;\n }\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, new ${clazz}.LocatorOptions().setHasText(${this.toHasText(options.hasText)}))`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, new ${clazz}.LocatorOptions().setHasNotText(${this.toHasText(options.hasNotText)}))`;\n return `locator(${this.quote(body)})`;\n case \"frame\":\n return `frameLocator(${this.quote(body)})`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first()`;\n case \"last\":\n return `last()`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`.setName(${this.regexToString(options.name)})`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`.setName(${this.quote(options.name)})`);\n if (options.exact)\n attrs.push(`.setExact(true)`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`.set${toTitleCase(name)}(${typeof value === \"string\" ? this.quote(value) : value})`);\n const attrString = attrs.length ? `, new ${clazz}.GetByRoleOptions()${attrs.join(\"\")}` : \"\";\n return `getByRole(AriaRole.${toSnakeCase(body).toUpperCase()}${attrString})`;\n case \"has-text\":\n return `filter(new ${clazz}.FilterOptions().setHasText(${this.toHasText(body)}))`;\n case \"has-not-text\":\n return `filter(new ${clazz}.FilterOptions().setHasNotText(${this.toHasText(body)}))`;\n case \"has\":\n return `filter(new ${clazz}.FilterOptions().setHas(${body}))`;\n case \"hasNot\":\n return `filter(new ${clazz}.FilterOptions().setHasNot(${body}))`;\n case \"and\":\n return `and(${body})`;\n case \"or\":\n return `or(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `getByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(clazz, \"getByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(clazz, \"getByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(clazz, \"getByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(clazz, \"getByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(clazz, \"getByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", Pattern.CASE_INSENSITIVE\" : \"\";\n return `Pattern.compile(${this.quote(normalizeEscapedRegexQuotes(body.source))}${suffix})`;\n }\n toCallWithExact(clazz, method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, new ${clazz}.${toTitleCase(method)}Options().setExact(true))`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToString(body);\n return this.quote(body);\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar CSharpLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `Locator(${this.quote(body)}, new() { ${this.toHasText(options.hasText)} })`;\n if (options.hasNotText !== void 0)\n return `Locator(${this.quote(body)}, new() { ${this.toHasNotText(options.hasNotText)} })`;\n return `Locator(${this.quote(body)})`;\n case \"frame\":\n return `FrameLocator(${this.quote(body)})`;\n case \"nth\":\n return `Nth(${body})`;\n case \"first\":\n return `First`;\n case \"last\":\n return `Last`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`NameRegex = ${this.regexToString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`Name = ${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`Exact = true`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`${toTitleCase(name)} = ${typeof value === \"string\" ? this.quote(value) : value}`);\n const attrString = attrs.length ? `, new() { ${attrs.join(\", \")} }` : \"\";\n return `GetByRole(AriaRole.${toTitleCase(body)}${attrString})`;\n case \"has-text\":\n return `Filter(new() { ${this.toHasText(body)} })`;\n case \"has-not-text\":\n return `Filter(new() { ${this.toHasNotText(body)} })`;\n case \"has\":\n return `Filter(new() { Has = ${body} })`;\n case \"hasNot\":\n return `Filter(new() { HasNot = ${body} })`;\n case \"and\":\n return `And(${body})`;\n case \"or\":\n return `Or(${body})`;\n case \"chain\":\n return `Locator(${body})`;\n case \"test-id\":\n return `GetByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"GetByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"GetByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"GetByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"GetByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"GetByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", RegexOptions.IgnoreCase\" : \"\";\n return `new Regex(${this.quote(normalizeEscapedRegexQuotes(body.source))}${suffix})`;\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, new() { Exact = true })`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return `HasTextRegex = ${this.regexToString(body)}`;\n return `HasText = ${this.quote(body)}`;\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n toHasNotText(body) {\n if (isRegExp(body))\n return `HasNotTextRegex = ${this.regexToString(body)}`;\n return `HasNotText = ${this.quote(body)}`;\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar JsonlLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n return JSON.stringify({\n kind,\n body,\n options\n });\n }\n chainLocators(locators) {\n const objects = locators.map((l) => JSON.parse(l));\n for (let i = 0; i < objects.length - 1; ++i)\n objects[i].next = objects[i + 1];\n return JSON.stringify(objects[0]);\n }\n};\nvar generators = {\n javascript: JavaScriptLocatorFactory,\n python: PythonLocatorFactory,\n java: JavaLocatorFactory,\n csharp: CSharpLocatorFactory,\n jsonl: JsonlLocatorFactory\n};\nfunction isRegExp(obj) {\n return obj instanceof RegExp;\n}\n\n// packages/playwright-core/src/server/injected/consoleApi.ts\nvar selectorSymbol = Symbol(\"selector\");\nvar _Locator = class _Locator {\n constructor(injectedScript, selector, options) {\n if (options == null ? void 0 : options.hasText)\n selector += ` >> internal:has-text=${escapeForTextSelector(options.hasText, false)}`;\n if (options == null ? void 0 : options.hasNotText)\n selector += ` >> internal:has-not-text=${escapeForTextSelector(options.hasNotText, false)}`;\n if (options == null ? void 0 : options.has)\n selector += ` >> internal:has=` + JSON.stringify(options.has[selectorSymbol]);\n if (options == null ? void 0 : options.hasNot)\n selector += ` >> internal:has-not=` + JSON.stringify(options.hasNot[selectorSymbol]);\n this[selectorSymbol] = selector;\n if (selector) {\n const parsed = injectedScript.parseSelector(selector);\n this.element = injectedScript.querySelector(parsed, injectedScript.document, false);\n this.elements = injectedScript.querySelectorAll(parsed, injectedScript.document);\n }\n const selectorBase = selector;\n const self = this;\n self.locator = (selector2, options2) => {\n return new _Locator(injectedScript, selectorBase ? selectorBase + \" >> \" + selector2 : selector2, options2);\n };\n self.getByTestId = (testId) => self.locator(getByTestIdSelector(injectedScript.testIdAttributeNameForStrictErrorAndConsoleCodegen(), testId));\n self.getByAltText = (text, options2) => self.locator(getByAltTextSelector(text, options2));\n self.getByLabel = (text, options2) => self.locator(getByLabelSelector(text, options2));\n self.getByPlaceholder = (text, options2) => self.locator(getByPlaceholderSelector(text, options2));\n self.getByText = (text, options2) => self.locator(getByTextSelector(text, options2));\n self.getByTitle = (text, options2) => self.locator(getByTitleSelector(text, options2));\n self.getByRole = (role, options2 = {}) => self.locator(getByRoleSelector(role, options2));\n self.filter = (options2) => new _Locator(injectedScript, selector, options2);\n self.first = () => self.locator(\"nth=0\");\n self.last = () => self.locator(\"nth=-1\");\n self.nth = (index) => self.locator(`nth=${index}`);\n self.and = (locator) => new _Locator(injectedScript, selectorBase + ` >> internal:and=` + JSON.stringify(locator[selectorSymbol]));\n self.or = (locator) => new _Locator(injectedScript, selectorBase + ` >> internal:or=` + JSON.stringify(locator[selectorSymbol]));\n }\n};\nselectorSymbol;\nvar Locator = _Locator;\nvar ConsoleAPI = class {\n constructor(injectedScript) {\n this._injectedScript = injectedScript;\n if (this._injectedScript.window.playwright)\n return;\n this._injectedScript.window.playwright = {\n $: (selector, strict) => this._querySelector(selector, !!strict),\n $$: (selector) => this._querySelectorAll(selector),\n inspect: (selector) => this._inspect(selector),\n selector: (element) => this._selector(element),\n generateLocator: (element, language) => this._generateLocator(element, language),\n resume: () => this._resume(),\n ...new Locator(injectedScript, \"\")\n };\n delete this._injectedScript.window.playwright.filter;\n delete this._injectedScript.window.playwright.first;\n delete this._injectedScript.window.playwright.last;\n delete this._injectedScript.window.playwright.nth;\n delete this._injectedScript.window.playwright.and;\n delete this._injectedScript.window.playwright.or;\n }\n _querySelector(selector, strict) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.query('Playwright >> selector').`);\n const parsed = this._injectedScript.parseSelector(selector);\n return this._injectedScript.querySelector(parsed, this._injectedScript.document, strict);\n }\n _querySelectorAll(selector) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.$$('Playwright >> selector').`);\n const parsed = this._injectedScript.parseSelector(selector);\n return this._injectedScript.querySelectorAll(parsed, this._injectedScript.document);\n }\n _inspect(selector) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.inspect('Playwright >> selector').`);\n this._injectedScript.window.inspect(this._querySelector(selector, false));\n }\n _selector(element) {\n if (!(element instanceof Element))\n throw new Error(`Usage: playwright.selector(element).`);\n return this._injectedScript.generateSelectorSimple(element);\n }\n _generateLocator(element, language) {\n if (!(element instanceof Element))\n throw new Error(`Usage: playwright.locator(element).`);\n const selector = this._injectedScript.generateSelectorSimple(element);\n return asLocator(language || \"javascript\", selector);\n }\n _resume() {\n this._injectedScript.window.__pw_resume().catch(() => {\n });\n }\n};\nvar consoleApi_default = ConsoleAPI;\n";