@browserless.io/browserless 2.2.0-beta-2 → 2.2.0-beta-3

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 (33) hide show
  1. package/build/browsers/index.js +9 -3
  2. package/build/router.js +13 -6
  3. package/build/routes/chromium/http/content-post.body.json +15 -19
  4. package/build/routes/chromium/http/content-post.d.ts +1 -1
  5. package/build/routes/chromium/http/content-post.js +2 -4
  6. package/build/routes/chromium/http/pdf-post.body.json +15 -19
  7. package/build/routes/chromium/http/pdf-post.d.ts +1 -1
  8. package/build/routes/chromium/http/pdf-post.js +10 -6
  9. package/build/routes/chromium/http/scrape-post.body.json +15 -19
  10. package/build/routes/chromium/http/scrape-post.d.ts +3 -3
  11. package/build/routes/chromium/http/scrape-post.js +2 -4
  12. package/build/routes/chromium/http/scrape-post.response.json +22 -38
  13. package/build/routes/chromium/http/screenshot-post.body.json +15 -19
  14. package/build/routes/chromium/http/screenshot-post.d.ts +1 -1
  15. package/build/routes/chromium/http/screenshot-post.js +2 -4
  16. package/build/routes/chromium/tests/content.spec.js +27 -1
  17. package/build/routes/chromium/tests/websocket.spec.js +53 -4
  18. package/build/routes/chromium/ws/browser.js +1 -1
  19. package/build/routes/management/http/sessions-get.response.json +4 -0
  20. package/build/types.d.ts +1 -0
  21. package/package.json +3 -3
  22. package/src/browsers/index.ts +11 -4
  23. package/src/router.ts +13 -7
  24. package/src/routes/chromium/http/content-post.ts +3 -4
  25. package/src/routes/chromium/http/pdf-post.ts +13 -6
  26. package/src/routes/chromium/http/scrape-post.ts +5 -6
  27. package/src/routes/chromium/http/screenshot-post.ts +3 -4
  28. package/src/routes/chromium/tests/content.spec.ts +28 -1
  29. package/src/routes/chromium/tests/websocket.spec.ts +70 -4
  30. package/src/routes/chromium/ws/browser.ts +1 -1
  31. package/src/types.ts +1 -0
  32. package/static/docs/swagger.json +70 -98
  33. package/static/function/client.js +192 -488
@@ -1631,9 +1631,9 @@
1631
1631
  }
1632
1632
  return this;
1633
1633
  };
1634
- const errors2 = {};
1634
+ const errors = {};
1635
1635
  function E5(sym, getMessage, Base) {
1636
- errors2[sym] = class NodeError extends Base {
1636
+ errors[sym] = class NodeError extends Base {
1637
1637
  constructor() {
1638
1638
  super();
1639
1639
  Object.defineProperty(this, "message", {
@@ -1713,24 +1713,24 @@
1713
1713
  } else {
1714
1714
  range = `>= ${min}${n8} and <= ${max}${n8}`;
1715
1715
  }
1716
- throw new errors2.ERR_OUT_OF_RANGE("value", range, value);
1716
+ throw new errors.ERR_OUT_OF_RANGE("value", range, value);
1717
1717
  }
1718
1718
  checkBounds(buf, offset, byteLength2);
1719
1719
  }
1720
1720
  function validateNumber(value, name2) {
1721
1721
  if (typeof value !== "number") {
1722
- throw new errors2.ERR_INVALID_ARG_TYPE(name2, "number", value);
1722
+ throw new errors.ERR_INVALID_ARG_TYPE(name2, "number", value);
1723
1723
  }
1724
1724
  }
1725
1725
  function boundsError(value, length, type) {
1726
1726
  if (Math.floor(value) !== value) {
1727
1727
  validateNumber(value, type);
1728
- throw new errors2.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
1728
+ throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
1729
1729
  }
1730
1730
  if (length < 0) {
1731
- throw new errors2.ERR_BUFFER_OUT_OF_BOUNDS();
1731
+ throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
1732
1732
  }
1733
- throw new errors2.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
1733
+ throw new errors.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
1734
1734
  }
1735
1735
  const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
1736
1736
  function base64clean(str) {
@@ -3453,16 +3453,6 @@
3453
3453
  }
3454
3454
  });
3455
3455
 
3456
- // node_modules/puppeteer-core/lib/esm/puppeteer/environment.js
3457
- var isNode;
3458
- var init_environment = __esm({
3459
- "node_modules/puppeteer-core/lib/esm/puppeteer/environment.js"() {
3460
- init_dirname();
3461
- init_buffer2();
3462
- isNode = !!(typeof process !== "undefined" && process.version);
3463
- }
3464
- });
3465
-
3466
3456
  // node_modules/puppeteer-core/lib/esm/puppeteer/util/assert.js
3467
3457
  var assert;
3468
3458
  var init_assert = __esm({
@@ -3477,26 +3467,13 @@
3477
3467
  }
3478
3468
  });
3479
3469
 
3480
- // node_modules/puppeteer-core/lib/esm/puppeteer/util/ErrorLike.js
3481
- function isErrorLike(obj) {
3482
- return typeof obj === "object" && obj !== null && "name" in obj && "message" in obj;
3483
- }
3484
- function rewriteError(error, message, originalMessage) {
3485
- error.message = message;
3486
- error.originalMessage = originalMessage ?? error.originalMessage;
3487
- return error;
3488
- }
3489
- function createProtocolErrorMessage(object) {
3490
- let message = object.error.message;
3491
- if (object.error && typeof object.error === "object" && "data" in object.error) {
3492
- message += ` ${object.error.data}`;
3493
- }
3494
- return message;
3495
- }
3496
- var init_ErrorLike = __esm({
3497
- "node_modules/puppeteer-core/lib/esm/puppeteer/util/ErrorLike.js"() {
3470
+ // node_modules/puppeteer-core/lib/esm/puppeteer/environment.js
3471
+ var isNode;
3472
+ var init_environment = __esm({
3473
+ "node_modules/puppeteer-core/lib/esm/puppeteer/environment.js"() {
3498
3474
  init_dirname();
3499
3475
  init_buffer2();
3476
+ isNode = !!(typeof process !== "undefined" && process.version);
3500
3477
  }
3501
3478
  });
3502
3479
 
@@ -4001,12 +3978,12 @@
4001
3978
  });
4002
3979
 
4003
3980
  // node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.js
4004
- var CustomError, TimeoutError, ProtocolError, UnsupportedOperation, TargetCloseError, errors;
3981
+ var PuppeteerError, TimeoutError, ProtocolError, UnsupportedOperation, TargetCloseError;
4005
3982
  var init_Errors = __esm({
4006
3983
  "node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.js"() {
4007
3984
  init_dirname();
4008
3985
  init_buffer2();
4009
- CustomError = class extends Error {
3986
+ PuppeteerError = class extends Error {
4010
3987
  /**
4011
3988
  * @internal
4012
3989
  */
@@ -4021,9 +3998,9 @@
4021
3998
  return this.constructor.name;
4022
3999
  }
4023
4000
  };
4024
- TimeoutError = class extends CustomError {
4001
+ TimeoutError = class extends PuppeteerError {
4025
4002
  };
4026
- ProtocolError = class extends CustomError {
4003
+ ProtocolError = class extends PuppeteerError {
4027
4004
  #code;
4028
4005
  #originalMessage = "";
4029
4006
  set code(code) {
@@ -4047,14 +4024,10 @@
4047
4024
  return this.#originalMessage;
4048
4025
  }
4049
4026
  };
4050
- UnsupportedOperation = class extends CustomError {
4027
+ UnsupportedOperation = class extends PuppeteerError {
4051
4028
  };
4052
4029
  TargetCloseError = class extends ProtocolError {
4053
4030
  };
4054
- errors = Object.freeze({
4055
- TimeoutError,
4056
- ProtocolError
4057
- });
4058
4031
  }
4059
4032
  });
4060
4033
 
@@ -4861,7 +4834,7 @@
4861
4834
  });
4862
4835
 
4863
4836
  // node_modules/@jspm/core/nodelibs/browser/chunk-ce0fbc82.js
4864
- var _extend, callbackify, debuglog, deprecate, format, inherits, inspect, isArray, isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, log, promisify, types, TextEncoder, TextDecoder2;
4837
+ var _extend, callbackify, debuglog, deprecate, format, inherits, inspect, isArray, isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, log, promisify, types, TextEncoder2, TextDecoder2;
4865
4838
  var init_chunk_ce0fbc82 = __esm({
4866
4839
  "node_modules/@jspm/core/nodelibs/browser/chunk-ce0fbc82.js"() {
4867
4840
  init_dirname();
@@ -4917,7 +4890,7 @@
4917
4890
  log = X2.log;
4918
4891
  promisify = X2.promisify;
4919
4892
  types = X2.types;
4920
- TextEncoder = self.TextEncoder;
4893
+ TextEncoder2 = self.TextEncoder;
4921
4894
  TextDecoder2 = self.TextDecoder;
4922
4895
  }
4923
4896
  });
@@ -7705,9 +7678,9 @@
7705
7678
  }
7706
7679
  return this;
7707
7680
  };
7708
- const errors2 = {};
7681
+ const errors = {};
7709
7682
  function E5(sym, getMessage, Base) {
7710
- errors2[sym] = class NodeError extends Base {
7683
+ errors[sym] = class NodeError extends Base {
7711
7684
  constructor() {
7712
7685
  super();
7713
7686
  Object.defineProperty(this, "message", {
@@ -7787,24 +7760,24 @@
7787
7760
  } else {
7788
7761
  range = `>= ${min}${n8} and <= ${max}${n8}`;
7789
7762
  }
7790
- throw new errors2.ERR_OUT_OF_RANGE("value", range, value);
7763
+ throw new errors.ERR_OUT_OF_RANGE("value", range, value);
7791
7764
  }
7792
7765
  checkBounds(buf, offset, byteLength2);
7793
7766
  }
7794
7767
  function validateNumber(value, name2) {
7795
7768
  if (typeof value !== "number") {
7796
- throw new errors2.ERR_INVALID_ARG_TYPE(name2, "number", value);
7769
+ throw new errors.ERR_INVALID_ARG_TYPE(name2, "number", value);
7797
7770
  }
7798
7771
  }
7799
7772
  function boundsError(value, length, type) {
7800
7773
  if (Math.floor(value) !== value) {
7801
7774
  validateNumber(value, type);
7802
- throw new errors2.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
7775
+ throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
7803
7776
  }
7804
7777
  if (length < 0) {
7805
- throw new errors2.ERR_BUFFER_OUT_OF_BOUNDS();
7778
+ throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
7806
7779
  }
7807
- throw new errors2.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
7780
+ throw new errors.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
7808
7781
  }
7809
7782
  const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
7810
7783
  function base64clean(str) {
@@ -11649,7 +11622,7 @@
11649
11622
  });
11650
11623
 
11651
11624
  // node_modules/@jspm/core/nodelibs/browser/util.js
11652
- var _extend2, callbackify2, debuglog2, deprecate2, format2, inherits2, inspect2, isArray2, isBoolean2, isBuffer2, isDate2, isError2, isFunction2, isNull2, isNullOrUndefined2, isNumber2, isObject2, isPrimitive2, isRegExp2, isString2, isSymbol2, isUndefined2, log2, promisify2, types2, TextEncoder2, TextDecoder3;
11625
+ var _extend2, callbackify2, debuglog2, deprecate2, format2, inherits2, inspect2, isArray2, isBoolean2, isBuffer2, isDate2, isError2, isFunction2, isNull2, isNullOrUndefined2, isNumber2, isObject2, isPrimitive2, isRegExp2, isString2, isSymbol2, isUndefined2, log2, promisify2, types2, TextEncoder3, TextDecoder3;
11653
11626
  var init_util = __esm({
11654
11627
  "node_modules/@jspm/core/nodelibs/browser/util.js"() {
11655
11628
  init_dirname();
@@ -11683,7 +11656,7 @@
11683
11656
  log2 = X2.log;
11684
11657
  promisify2 = X2.promisify;
11685
11658
  types2 = X2.types;
11686
- TextEncoder2 = X2.TextEncoder = globalThis.TextEncoder;
11659
+ TextEncoder3 = X2.TextEncoder = globalThis.TextEncoder;
11687
11660
  TextDecoder3 = X2.TextDecoder = globalThis.TextDecoder;
11688
11661
  }
11689
11662
  });
@@ -12378,19 +12351,6 @@
12378
12351
  });
12379
12352
 
12380
12353
  // node_modules/@jspm/core/nodelibs/browser/stream.js
12381
- var stream_exports = {};
12382
- __export(stream_exports, {
12383
- Duplex: () => Duplex,
12384
- PassThrough: () => PassThrough,
12385
- Readable: () => Readable,
12386
- Stream: () => Stream,
12387
- Transform: () => Transform,
12388
- Writable: () => Writable,
12389
- default: () => exports5,
12390
- finished: () => finished,
12391
- pipeline: () => pipeline,
12392
- promises: () => promises
12393
- });
12394
12354
  var Readable, Writable, Duplex, Transform, PassThrough, finished, pipeline, Stream, promises;
12395
12355
  var init_stream = __esm({
12396
12356
  "node_modules/@jspm/core/nodelibs/browser/stream.js"() {
@@ -13901,11 +13861,11 @@
13901
13861
  });
13902
13862
  exports$c2.strToEncoding = exports$c2.assertEncoding = exports$c2.ENCODING_UTF8 = void 0;
13903
13863
  var buffer_1 = dew$c2();
13904
- var errors2 = dew$b2();
13864
+ var errors = dew$b2();
13905
13865
  exports$c2.ENCODING_UTF8 = "utf8";
13906
13866
  function assertEncoding(encoding) {
13907
13867
  if (encoding && !buffer_1.Buffer.isEncoding(encoding))
13908
- throw new errors2.TypeError("ERR_INVALID_OPT_VALUE_ENCODING", encoding);
13868
+ throw new errors.TypeError("ERR_INVALID_OPT_VALUE_ENCODING", encoding);
13909
13869
  }
13910
13870
  exports$c2.assertEncoding = assertEncoding;
13911
13871
  function strToEncoding(str, encoding) {
@@ -14733,7 +14693,7 @@
14733
14693
  var constants_1 = dew$f2();
14734
14694
  var events_1 = y2;
14735
14695
  var encoding_1 = dew$a2();
14736
- var errors2 = dew$b2();
14696
+ var errors = dew$b2();
14737
14697
  var util = X2;
14738
14698
  var promises_1 = dew$42();
14739
14699
  var resolveCrossPlatform = pathModule.resolve;
@@ -14863,7 +14823,7 @@
14863
14823
  if (typeof flagsNum !== "undefined")
14864
14824
  return flagsNum;
14865
14825
  }
14866
- throw new errors2.TypeError("ERR_INVALID_OPT_VALUE", "flags", flags);
14826
+ throw new errors.TypeError("ERR_INVALID_OPT_VALUE", "flags", flags);
14867
14827
  }
14868
14828
  exports$42.flagsToNumber = flagsToNumber;
14869
14829
  function getOptions(defaults, options) {
@@ -14966,14 +14926,14 @@
14966
14926
  };
14967
14927
  function getPathFromURLPosix2(url) {
14968
14928
  if (url.hostname !== "") {
14969
- throw new errors2.TypeError("ERR_INVALID_FILE_URL_HOST", process_1.default.platform);
14929
+ throw new errors.TypeError("ERR_INVALID_FILE_URL_HOST", process_1.default.platform);
14970
14930
  }
14971
14931
  var pathname = url.pathname;
14972
14932
  for (var n8 = 0; n8 < pathname.length; n8++) {
14973
14933
  if (pathname[n8] === "%") {
14974
14934
  var third = pathname.codePointAt(n8 + 2) | 32;
14975
14935
  if (pathname[n8 + 1] === "2" && third === 102) {
14976
- throw new errors2.TypeError("ERR_INVALID_FILE_URL_PATH", "must not include encoded / characters");
14936
+ throw new errors.TypeError("ERR_INVALID_FILE_URL_PATH", "must not include encoded / characters");
14977
14937
  }
14978
14938
  }
14979
14939
  }
@@ -17286,53 +17246,57 @@
17286
17246
  }
17287
17247
  async function getReadableAsBuffer(readable, path2) {
17288
17248
  const buffers = [];
17249
+ const reader = readable.getReader();
17289
17250
  if (path2) {
17290
17251
  const fs3 = await importFSPromises();
17291
17252
  const fileHandle = await fs3.open(path2, "w+");
17292
17253
  try {
17293
- for await (const chunk of readable) {
17294
- buffers.push(chunk);
17295
- await fileHandle.writeFile(chunk);
17254
+ while (true) {
17255
+ const { done, value } = await reader.read();
17256
+ if (done) {
17257
+ break;
17258
+ }
17259
+ buffers.push(value);
17260
+ await fileHandle.writeFile(value);
17296
17261
  }
17297
17262
  } finally {
17298
17263
  await fileHandle.close();
17299
17264
  }
17300
17265
  } else {
17301
- for await (const chunk of readable) {
17302
- buffers.push(chunk);
17266
+ while (true) {
17267
+ const { done, value } = await reader.read();
17268
+ if (done) {
17269
+ break;
17270
+ }
17271
+ buffers.push(value);
17303
17272
  }
17304
17273
  }
17305
17274
  try {
17306
17275
  return Buffer2.concat(buffers);
17307
17276
  } catch (error) {
17277
+ debugError(error);
17308
17278
  return null;
17309
17279
  }
17310
17280
  }
17311
17281
  async function getReadableFromProtocolStream(client, handle) {
17312
- if (!isNode) {
17313
- throw new Error("Cannot create a stream outside of Node.js environment.");
17314
- }
17315
- const { Readable: Readable2 } = await Promise.resolve().then(() => (init_stream(), stream_exports));
17316
- let eof = false;
17317
- return new Readable2({
17318
- async read(size) {
17319
- if (eof) {
17320
- return;
17321
- }
17322
- try {
17323
- const response = await client.send("IO.read", { handle, size });
17324
- this.push(response.data, response.base64Encoded ? "base64" : void 0);
17325
- if (response.eof) {
17326
- eof = true;
17327
- await client.send("IO.close", { handle });
17328
- this.push(null);
17329
- }
17330
- } catch (error) {
17331
- if (isErrorLike(error)) {
17332
- this.destroy(error);
17333
- return;
17282
+ return new ReadableStream({
17283
+ async pull(controller) {
17284
+ function getUnit8Array(data2, isBase64) {
17285
+ if (isBase64) {
17286
+ return Uint8Array.from(atob(data2), (m7) => {
17287
+ return m7.codePointAt(0);
17288
+ });
17334
17289
  }
17335
- throw error;
17290
+ const encoder = new TextEncoder();
17291
+ return encoder.encode(data2);
17292
+ }
17293
+ const { data, base64Encoded, eof } = await client.send("IO.read", {
17294
+ handle
17295
+ });
17296
+ controller.enqueue(getUnit8Array(data, base64Encoded ?? false));
17297
+ if (eof) {
17298
+ await client.send("IO.close", { handle });
17299
+ controller.close();
17336
17300
  }
17337
17301
  }
17338
17302
  });
@@ -17370,8 +17334,8 @@
17370
17334
  pageRanges: "",
17371
17335
  preferCSSPageSize: false,
17372
17336
  omitBackground: false,
17373
- tagged: false,
17374
- outline: false
17337
+ outline: false,
17338
+ tagged: true
17375
17339
  };
17376
17340
  let width = 8.5;
17377
17341
  let height = 11;
@@ -17443,9 +17407,7 @@
17443
17407
  init_dirname();
17444
17408
  init_buffer2();
17445
17409
  init_rxjs();
17446
- init_environment();
17447
17410
  init_assert();
17448
- init_ErrorLike();
17449
17411
  init_Debug();
17450
17412
  init_Errors();
17451
17413
  init_PDFOptions();
@@ -17837,22 +17799,6 @@
17837
17799
  this.#emitter.emit(type, event);
17838
17800
  return this.listenerCount(type) > 0;
17839
17801
  }
17840
- /**
17841
- * Remove an event listener.
17842
- *
17843
- * @deprecated please use {@link EventEmitter.off} instead.
17844
- */
17845
- removeListener(type, handler) {
17846
- return this.off(type, handler);
17847
- }
17848
- /**
17849
- * Add an event listener.
17850
- *
17851
- * @deprecated please use {@link EventEmitter.on} instead.
17852
- */
17853
- addListener(type, handler) {
17854
- return this.on(type, handler);
17855
- }
17856
17802
  /**
17857
17803
  * Like `on` but the listener will only be fired once and then it will be removed.
17858
17804
  * @param type - the event you'd like to listen to
@@ -18764,7 +18710,27 @@
18764
18710
  init_dirname();
18765
18711
  init_buffer2();
18766
18712
  init_Deferred();
18767
- init_ErrorLike();
18713
+
18714
+ // node_modules/puppeteer-core/lib/esm/puppeteer/util/ErrorLike.js
18715
+ init_dirname();
18716
+ init_buffer2();
18717
+ function isErrorLike(obj) {
18718
+ return typeof obj === "object" && obj !== null && "name" in obj && "message" in obj;
18719
+ }
18720
+ function rewriteError(error, message, originalMessage) {
18721
+ error.message = message;
18722
+ error.originalMessage = originalMessage ?? error.originalMessage;
18723
+ return error;
18724
+ }
18725
+ function createProtocolErrorMessage(object) {
18726
+ let message = object.error.message;
18727
+ if (object.error && typeof object.error === "object" && "data" in object.error) {
18728
+ message += ` ${object.error.data}`;
18729
+ }
18730
+ return message;
18731
+ }
18732
+
18733
+ // node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js
18768
18734
  init_Errors();
18769
18735
  init_util2();
18770
18736
  var CallbackRegistry = class {
@@ -18876,7 +18842,6 @@
18876
18842
  // node_modules/puppeteer-core/lib/esm/puppeteer/cdp/CDPSession.js
18877
18843
  init_Errors();
18878
18844
  init_assert();
18879
- init_ErrorLike();
18880
18845
  var CdpCDPSession = class extends CDPSession {
18881
18846
  #sessionId;
18882
18847
  #targetType;
@@ -20089,19 +20054,6 @@
20089
20054
  pageFunction = withSourcePuppeteerURLIfNone(this.$$eval.name, pageFunction);
20090
20055
  return await this.mainFrame().$$eval(selector, pageFunction, ...args);
20091
20056
  }
20092
- /**
20093
- * The method evaluates the XPath expression relative to the page document as
20094
- * its context node. If there are no such elements, the method resolves to an
20095
- * empty array.
20096
- *
20097
- * @remarks
20098
- * Shortcut for {@link Frame.$x | Page.mainFrame().$x(expression) }.
20099
- *
20100
- * @param expression - Expression to evaluate
20101
- */
20102
- async $x(expression) {
20103
- return await this.mainFrame().$x(expression);
20104
- }
20105
20057
  /**
20106
20058
  * Adds a `<script>` tag into the page with the desired URL or content.
20107
20059
  *
@@ -20883,30 +20835,6 @@
20883
20835
  type(selector, text, options) {
20884
20836
  return this.mainFrame().type(selector, text, options);
20885
20837
  }
20886
- /**
20887
- * @deprecated Replace with `new Promise(r => setTimeout(r, milliseconds));`.
20888
- *
20889
- * Causes your script to wait for the given number of milliseconds.
20890
- *
20891
- * @remarks
20892
- *
20893
- * It's generally recommended to not wait for a number of seconds, but instead
20894
- * use {@link Frame.waitForSelector}, {@link Frame.waitForXPath} or
20895
- * {@link Frame.waitForFunction} to wait for exactly the conditions you want.
20896
- *
20897
- * @example
20898
- *
20899
- * Wait for 1 second:
20900
- *
20901
- * ```ts
20902
- * await page.waitForTimeout(1000);
20903
- * ```
20904
- *
20905
- * @param milliseconds - the number of milliseconds to wait.
20906
- */
20907
- waitForTimeout(milliseconds) {
20908
- return this.mainFrame().waitForTimeout(milliseconds);
20909
- }
20910
20838
  /**
20911
20839
  * Wait for the `selector` to appear in page. If at the moment of calling the
20912
20840
  * method the `selector` already exists, the method will return immediately. If
@@ -20962,60 +20890,6 @@
20962
20890
  async waitForSelector(selector, options = {}) {
20963
20891
  return await this.mainFrame().waitForSelector(selector, options);
20964
20892
  }
20965
- /**
20966
- * Wait for the `xpath` to appear in page. If at the moment of calling the
20967
- * method the `xpath` already exists, the method will return immediately. If
20968
- * the `xpath` doesn't appear after the `timeout` milliseconds of waiting, the
20969
- * function will throw.
20970
- *
20971
- * @example
20972
- * This method works across navigation
20973
- *
20974
- * ```ts
20975
- * import puppeteer from 'puppeteer';
20976
- * (async () => {
20977
- * const browser = await puppeteer.launch();
20978
- * const page = await browser.newPage();
20979
- * let currentURL;
20980
- * page
20981
- * .waitForXPath('//img')
20982
- * .then(() => console.log('First URL with image: ' + currentURL));
20983
- * for (currentURL of [
20984
- * 'https://example.com',
20985
- * 'https://google.com',
20986
- * 'https://bbc.com',
20987
- * ]) {
20988
- * await page.goto(currentURL);
20989
- * }
20990
- * await browser.close();
20991
- * })();
20992
- * ```
20993
- *
20994
- * @param xpath - A
20995
- * {@link https://developer.mozilla.org/en-US/docs/Web/XPath | xpath} of an
20996
- * element to wait for
20997
- * @param options - Optional waiting parameters
20998
- * @returns Promise which resolves when element specified by xpath string is
20999
- * added to DOM. Resolves to `null` if waiting for `hidden: true` and xpath is
21000
- * not found in DOM, otherwise resolves to `ElementHandle`.
21001
- * @remarks
21002
- * The optional Argument `options` have properties:
21003
- *
21004
- * - `visible`: A boolean to wait for element to be present in DOM and to be
21005
- * visible, i.e. to not have `display: none` or `visibility: hidden` CSS
21006
- * properties. Defaults to `false`.
21007
- *
21008
- * - `hidden`: A boolean wait for element to not be found in the DOM or to be
21009
- * hidden, i.e. have `display: none` or `visibility: hidden` CSS properties.
21010
- * Defaults to `false`.
21011
- *
21012
- * - `timeout`: A number which is maximum time to wait for in milliseconds.
21013
- * Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default
21014
- * value can be changed by using the {@link Page.setDefaultTimeout} method.
21015
- */
21016
- waitForXPath(xpath, options) {
21017
- return this.mainFrame().waitForXPath(xpath, options);
21018
- }
21019
20893
  /**
21020
20894
  * Waits for the provided function, `pageFunction`, to return a truthy value when
21021
20895
  * evaluated in the page's context.
@@ -21234,7 +21108,6 @@
21234
21108
  init_assert();
21235
21109
  init_Deferred();
21236
21110
  init_disposable();
21237
- init_ErrorLike();
21238
21111
 
21239
21112
  // node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Accessibility.js
21240
21113
  init_dirname();
@@ -21834,7 +21707,6 @@
21834
21707
  // node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Binding.js
21835
21708
  init_util2();
21836
21709
  init_disposable();
21837
- init_ErrorLike();
21838
21710
  var __addDisposableResource5 = function(env, value, async) {
21839
21711
  if (value !== null && value !== void 0) {
21840
21712
  if (typeof value !== "object" && typeof value !== "function")
@@ -21971,7 +21843,6 @@
21971
21843
  init_Debug();
21972
21844
  init_Errors();
21973
21845
  init_EventEmitter();
21974
- init_ErrorLike();
21975
21846
  var debugProtocolSend = debug("puppeteer:protocol:SEND \u25BA");
21976
21847
  var debugProtocolReceive = debug("puppeteer:protocol:RECV \u25C0");
21977
21848
  var Connection = class extends EventEmitter2 {
@@ -22544,7 +22415,6 @@
22544
22415
  init_util2();
22545
22416
  init_assert();
22546
22417
  init_decorators();
22547
- init_ErrorLike();
22548
22418
  var __runInitializers4 = function(thisArg, initializers, value) {
22549
22419
  var useValue = arguments.length > 2;
22550
22420
  for (var i7 = 0; i7 < initializers.length; i7++) {
@@ -23002,7 +22872,7 @@
23002
22872
  // node_modules/puppeteer-core/lib/esm/puppeteer/generated/injected.js
23003
22873
  init_dirname();
23004
22874
  init_buffer2();
23005
- var source = '"use strict";var C=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var se=Object.prototype.hasOwnProperty;var u=(t,e)=>{for(var n in e)C(t,n,{get:e[n],enumerable:!0})},ie=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of oe(e))!se.call(t,o)&&o!==n&&C(t,o,{get:()=>e[o],enumerable:!(r=ne(e,o))||r.enumerable});return t};var le=t=>ie(C({},"__esModule",{value:!0}),t);var Oe={};u(Oe,{default:()=>Re});module.exports=le(Oe);var T=class extends Error{constructor(e){super(e),this.name=this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}},S=class extends T{},I=class extends T{#e;#t="";set code(e){this.#e=e}get code(){return this.#e}set originalMessage(e){this.#t=e}get originalMessage(){return this.#t}};var qe=Object.freeze({TimeoutError:S,ProtocolError:I});var f=class t{static create(e){return new t(e)}static async race(e){let n=new Set;try{let r=e.map(o=>o instanceof t?(o.#s&&n.add(o),o.valueOrThrow()):o);return await Promise.race(r)}finally{for(let r of n)r.reject(new Error("Timeout cleared"))}}#e=!1;#t=!1;#n;#r;#o=new Promise(e=>{this.#r=e});#s;#l;constructor(e){e&&e.timeout>0&&(this.#l=new S(e.message),this.#s=setTimeout(()=>{this.reject(this.#l)},e.timeout))}#a(e){clearTimeout(this.#s),this.#n=e,this.#r()}resolve(e){this.#t||this.#e||(this.#e=!0,this.#a(e))}reject(e){this.#t||this.#e||(this.#t=!0,this.#a(e))}resolved(){return this.#e}finished(){return this.#e||this.#t}value(){return this.#n}#i;valueOrThrow(){return this.#i||(this.#i=(async()=>{if(await this.#o,this.#t)throw this.#n;return this.#n})()),this.#i}};var z=new Map,G=t=>{let e=z.get(t);return e||(e=new Function(`return ${t}`)(),z.set(t,e),e)};var R={};u(R,{ariaQuerySelector:()=>ae,ariaQuerySelectorAll:()=>k});var ae=(t,e)=>window.__ariaQuerySelector(t,e),k=async function*(t,e){yield*await window.__ariaQuerySelectorAll(t,e)};var q={};u(q,{customQuerySelectors:()=>M});var O=class{#e=new Map;register(e,n){if(!n.queryOne&&n.queryAll){let r=n.queryAll;n.queryOne=(o,i)=>{for(let s of r(o,i))return s;return null}}else if(n.queryOne&&!n.queryAll){let r=n.queryOne;n.queryAll=(o,i)=>{let s=r(o,i);return s?[s]:[]}}else if(!n.queryOne||!n.queryAll)throw new Error("At least one query method must be defined.");this.#e.set(e,{querySelector:n.queryOne,querySelectorAll:n.queryAll})}unregister(e){this.#e.delete(e)}get(e){return this.#e.get(e)}clear(){this.#e.clear()}},M=new O;var D={};u(D,{pierceQuerySelector:()=>ce,pierceQuerySelectorAll:()=>ue});var ce=(t,e)=>{let n=null,r=o=>{let i=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);do{let s=i.currentNode;s.shadowRoot&&r(s.shadowRoot),!(s instanceof ShadowRoot)&&s!==o&&!n&&s.matches(e)&&(n=s)}while(!n&&i.nextNode())};return t instanceof Document&&(t=t.documentElement),r(t),n},ue=(t,e)=>{let n=[],r=o=>{let i=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);do{let s=i.currentNode;s.shadowRoot&&r(s.shadowRoot),!(s instanceof ShadowRoot)&&s!==o&&s.matches(e)&&n.push(s)}while(i.nextNode())};return t instanceof Document&&(t=t.documentElement),r(t),n};var m=(t,e)=>{if(!t)throw new Error(e)};var E=class{#e;#t;#n;#r;constructor(e,n){this.#e=e,this.#t=n}async start(){let e=this.#r=f.create(),n=await this.#e();if(n){e.resolve(n);return}this.#n=new MutationObserver(async()=>{let r=await this.#e();r&&(e.resolve(r),await this.stop())}),this.#n.observe(this.#t,{childList:!0,subtree:!0,attributes:!0})}async stop(){m(this.#r,"Polling never started."),this.#r.finished()||this.#r.reject(new Error("Polling stopped")),this.#n&&(this.#n.disconnect(),this.#n=void 0)}result(){return m(this.#r,"Polling never started."),this.#r.valueOrThrow()}},P=class{#e;#t;constructor(e){this.#e=e}async start(){let e=this.#t=f.create(),n=await this.#e();if(n){e.resolve(n);return}let r=async()=>{if(e.finished())return;let o=await this.#e();if(!o){window.requestAnimationFrame(r);return}e.resolve(o),await this.stop()};window.requestAnimationFrame(r)}async stop(){m(this.#t,"Polling never started."),this.#t.finished()||this.#t.reject(new Error("Polling stopped"))}result(){return m(this.#t,"Polling never started."),this.#t.valueOrThrow()}},x=class{#e;#t;#n;#r;constructor(e,n){this.#e=e,this.#t=n}async start(){let e=this.#r=f.create(),n=await this.#e();if(n){e.resolve(n);return}this.#n=setInterval(async()=>{let r=await this.#e();r&&(e.resolve(r),await this.stop())},this.#t)}async stop(){m(this.#r,"Polling never started."),this.#r.finished()||this.#r.reject(new Error("Polling stopped")),this.#n&&(clearInterval(this.#n),this.#n=void 0)}result(){return m(this.#r,"Polling never started."),this.#r.valueOrThrow()}};var W={};u(W,{pQuerySelector:()=>Ie,pQuerySelectorAll:()=>re});var c=class{static async*map(e,n){for await(let r of e)yield await n(r)}static async*flatMap(e,n){for await(let r of e)yield*n(r)}static async collect(e){let n=[];for await(let r of e)n.push(r);return n}static async first(e){for await(let n of e)return n}};var p={attribute:/\\[\\s*(?:(?<namespace>\\*|[-\\w\\P{ASCII}]*)\\|)?(?<name>[-\\w\\P{ASCII}]+)\\s*(?:(?<operator>\\W?=)\\s*(?<value>.+?)\\s*(\\s(?<caseSensitive>[iIsS]))?\\s*)?\\]/gu,id:/#(?<name>[-\\w\\P{ASCII}]+)/gu,class:/\\.(?<name>[-\\w\\P{ASCII}]+)/gu,comma:/\\s*,\\s*/g,combinator:/\\s*[\\s>+~]\\s*/g,"pseudo-element":/::(?<name>[-\\w\\P{ASCII}]+)(?:\\((?<argument>\xB6*)\\))?/gu,"pseudo-class":/:(?<name>[-\\w\\P{ASCII}]+)(?:\\((?<argument>\xB6*)\\))?/gu,universal:/(?:(?<namespace>\\*|[-\\w\\P{ASCII}]*)\\|)?\\*/gu,type:/(?:(?<namespace>\\*|[-\\w\\P{ASCII}]*)\\|)?(?<name>[-\\w\\P{ASCII}]+)/gu},fe=new Set(["combinator","comma"]);var de=t=>{switch(t){case"pseudo-element":case"pseudo-class":return new RegExp(p[t].source.replace("(?<argument>\\xB6*)","(?<argument>.*)"),"gu");default:return p[t]}};function me(t,e){let n=0,r="";for(;e<t.length;e++){let o=t[e];switch(o){case"(":++n;break;case")":--n;break}if(r+=o,n===0)return r}return r}function he(t,e=p){if(!t)return[];let n=[t];for(let[o,i]of Object.entries(e))for(let s=0;s<n.length;s++){let l=n[s];if(typeof l!="string")continue;i.lastIndex=0;let a=i.exec(l);if(!a)continue;let h=a.index-1,d=[],H=a[0],B=l.slice(0,h+1);B&&d.push(B),d.push({...a.groups,type:o,content:H});let X=l.slice(h+H.length+1);X&&d.push(X),n.splice(s,1,...d)}let r=0;for(let o of n)switch(typeof o){case"string":throw new Error(`Unexpected sequence ${o} found at index ${r}`);case"object":r+=o.content.length,o.pos=[r-o.content.length,r],fe.has(o.type)&&(o.content=o.content.trim()||" ");break}return n}var pe=/([\'"])([^\\\\\\n]+?)\\1/g,ye=/\\\\./g;function K(t,e=p){if(t=t.trim(),t==="")return[];let n=[];t=t.replace(ye,(i,s)=>(n.push({value:i,offset:s}),"\\uE000".repeat(i.length))),t=t.replace(pe,(i,s,l,a)=>(n.push({value:i,offset:a}),`${s}${"\\uE001".repeat(l.length)}${s}`));{let i=0,s;for(;(s=t.indexOf("(",i))>-1;){let l=me(t,s);n.push({value:l,offset:s}),t=`${t.substring(0,s)}(${"\\xB6".repeat(l.length-2)})${t.substring(s+l.length)}`,i=s+l.length}}let r=he(t,e),o=new Set;for(let i of n.reverse())for(let s of r){let{offset:l,value:a}=i;if(!(s.pos[0]<=l&&l+a.length<=s.pos[1]))continue;let{content:h}=s,d=l-s.pos[0];s.content=h.slice(0,d)+a+h.slice(d+a.length),s.content!==h&&o.add(s)}for(let i of o){let s=de(i.type);if(!s)throw new Error(`Unknown token type: ${i.type}`);s.lastIndex=0;let l=s.exec(i.content);if(!l)throw new Error(`Unable to parse content for ${i.type}: ${i.content}`);Object.assign(i,l.groups)}return r}function*N(t,e){switch(t.type){case"list":for(let n of t.list)yield*N(n,t);break;case"complex":yield*N(t.left,t),yield*N(t.right,t);break;case"compound":yield*t.list.map(n=>[n,t]);break;default:yield[t,e]}}function y(t){let e;return Array.isArray(t)?e=t:e=[...N(t)].map(([n])=>n),e.map(n=>n.content).join("")}p.combinator=/\\s*(>>>>?|[\\s>+~])\\s*/g;var ge=/\\\\[\\s\\S]/g,we=t=>t.length<=1?t:((t[0]===\'"\'||t[0]==="\'")&&t.endsWith(t[0])&&(t=t.slice(1,-1)),t.replace(ge,e=>e[1]));function Y(t){let e=!0,n=K(t);if(n.length===0)return[[],e];let r=[],o=[r],i=[o],s=[];for(let l of n){switch(l.type){case"combinator":switch(l.content){case">>>":e=!1,s.length&&(r.push(y(s)),s.splice(0)),r=[],o.push(">>>"),o.push(r);continue;case">>>>":e=!1,s.length&&(r.push(y(s)),s.splice(0)),r=[],o.push(">>>>"),o.push(r);continue}break;case"pseudo-element":if(!l.name.startsWith("-p-"))break;e=!1,s.length&&(r.push(y(s)),s.splice(0)),r.push({name:l.name.slice(3),value:we(l.argument??"")});continue;case"comma":s.length&&(r.push(y(s)),s.splice(0)),r=[],o=[r],i.push(o);continue}s.push(l)}return s.length&&r.push(y(s)),[i,e]}var Q={};u(Q,{textQuerySelectorAll:()=>b});var Se=new Set(["checkbox","image","radio"]),be=t=>t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!Se.has(t.type),Te=new Set(["SCRIPT","STYLE"]),w=t=>!Te.has(t.nodeName)&&!document.head?.contains(t),_=new WeakMap,Z=t=>{for(;t;)_.delete(t),t instanceof ShadowRoot?t=t.host:t=t.parentNode},J=new WeakSet,Ee=new MutationObserver(t=>{for(let e of t)Z(e.target)}),g=t=>{let e=_.get(t);if(e||(e={full:"",immediate:[]},!w(t)))return e;let n="";if(be(t))e.full=t.value,e.immediate.push(t.value),t.addEventListener("input",r=>{Z(r.target)},{once:!0,capture:!0});else{for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===Node.TEXT_NODE){e.full+=r.nodeValue??"",n+=r.nodeValue??"";continue}n&&e.immediate.push(n),n="",r.nodeType===Node.ELEMENT_NODE&&(e.full+=g(r).full)}n&&e.immediate.push(n),t instanceof Element&&t.shadowRoot&&(e.full+=g(t.shadowRoot).full),J.has(t)||(Ee.observe(t,{childList:!0,characterData:!0,subtree:!0}),J.add(t))}return _.set(t,e),e};var b=function*(t,e){let n=!1;for(let r of t.childNodes)if(r instanceof Element&&w(r)){let o;r.shadowRoot?o=b(r.shadowRoot,e):o=b(r,e);for(let i of o)yield i,n=!0}n||t instanceof Element&&w(t)&&g(t).full.includes(e)&&(yield t)};var $={};u($,{checkVisibility:()=>xe,pierce:()=>A,pierceAll:()=>L});var Pe=["hidden","collapse"],xe=(t,e)=>{if(!t)return e===!1;if(e===void 0)return t;let n=t.nodeType===Node.TEXT_NODE?t.parentElement:t,r=window.getComputedStyle(n),o=r&&!Pe.includes(r.visibility)&&!Ne(n);return e===o?t:!1};function Ne(t){let e=t.getBoundingClientRect();return e.width===0||e.height===0}var Ae=t=>"shadowRoot"in t&&t.shadowRoot instanceof ShadowRoot;function*A(t){Ae(t)?yield t.shadowRoot:yield t}function*L(t){t=A(t).next().value,yield t;let e=[document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT)];for(let n of e){let r;for(;r=n.nextNode();)r.shadowRoot&&(yield r.shadowRoot,e.push(document.createTreeWalker(r.shadowRoot,NodeFilter.SHOW_ELEMENT)))}}var U={};u(U,{xpathQuerySelectorAll:()=>j});var j=function*(t,e,n=-1){let o=(t.ownerDocument||document).evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE),i=[],s;for(;(s=o.iterateNext())&&(i.push(s),!(n&&i.length===n)););for(let l=0;l<i.length;l++)s=i[l],yield s,delete i[l]};var ve=/[-\\w\\P{ASCII}*]/,ee=t=>"querySelectorAll"in t,v=class extends Error{constructor(e,n){super(`${e} is not a valid selector: ${n}`)}},F=class{#e;#t;#n=[];#r=void 0;elements;constructor(e,n,r){this.elements=[e],this.#e=n,this.#t=r,this.#o()}async run(){if(typeof this.#r=="string")switch(this.#r.trimStart()){case":scope":this.#o();break}for(;this.#r!==void 0;this.#o()){let e=this.#r,n=this.#e;typeof e=="string"?e[0]&&ve.test(e[0])?this.elements=c.flatMap(this.elements,async function*(r){ee(r)&&(yield*r.querySelectorAll(e))}):this.elements=c.flatMap(this.elements,async function*(r){if(!r.parentElement){if(!ee(r))return;yield*r.querySelectorAll(e);return}let o=0;for(let i of r.parentElement.children)if(++o,i===r)break;yield*r.parentElement.querySelectorAll(`:scope>:nth-child(${o})${e}`)}):this.elements=c.flatMap(this.elements,async function*(r){switch(e.name){case"text":yield*b(r,e.value);break;case"xpath":yield*j(r,e.value);break;case"aria":yield*k(r,e.value);break;default:let o=M.get(e.name);if(!o)throw new v(n,`Unknown selector type: ${e.name}`);yield*o.querySelectorAll(r,e.value)}})}}#o(){if(this.#n.length!==0){this.#r=this.#n.shift();return}if(this.#t.length===0){this.#r=void 0;return}let e=this.#t.shift();switch(e){case">>>>":{this.elements=c.flatMap(this.elements,A),this.#o();break}case">>>":{this.elements=c.flatMap(this.elements,L),this.#o();break}default:this.#n=e,this.#o();break}}},V=class{#e=new WeakMap;calculate(e,n=[]){if(e===null)return n;e instanceof ShadowRoot&&(e=e.host);let r=this.#e.get(e);if(r)return[...r,...n];let o=0;for(let s=e.previousSibling;s;s=s.previousSibling)++o;let i=this.calculate(e.parentNode,[o]);return this.#e.set(e,i),[...i,...n]}},te=(t,e)=>{if(t.length+e.length===0)return 0;let[n=-1,...r]=t,[o=-1,...i]=e;return n===o?te(r,i):n<o?-1:1},Ce=async function*(t){let e=new Set;for await(let r of t)e.add(r);let n=new V;yield*[...e.values()].map(r=>[r,n.calculate(r)]).sort(([,r],[,o])=>te(r,o)).map(([r])=>r)},re=function(t,e){let n,r;try{[n,r]=Y(e)}catch{return t.querySelectorAll(e)}if(r)return t.querySelectorAll(e);if(n.some(o=>{let i=0;return o.some(s=>(typeof s=="string"?++i:i=0,i>1))}))throw new v(e,"Multiple deep combinators found in sequence.");return Ce(c.flatMap(n,o=>{let i=new F(t,e,o);return i.run(),i.elements}))},Ie=async function(t,e){for await(let n of re(t,e))return n;return null};var ke=Object.freeze({...R,...q,...D,...W,...Q,...$,...U,Deferred:f,createFunction:G,createTextContent:g,IntervalPoller:x,isSuitableNodeForTextMatching:w,MutationPoller:E,RAFPoller:P}),Re=ke;\n/**\n * @license\n * Copyright 2018 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2023 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2022 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2020 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n';
22875
+ var source = '"use strict";var v=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames;var oe=Object.prototype.hasOwnProperty;var u=(t,e)=>{for(var n in e)v(t,n,{get:e[n],enumerable:!0})},se=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ne(e))!oe.call(t,o)&&o!==n&&v(t,o,{get:()=>e[o],enumerable:!(r=re(e,o))||r.enumerable});return t};var ie=t=>se(v({},"__esModule",{value:!0}),t);var Re={};u(Re,{default:()=>ke});module.exports=ie(Re);var C=class extends Error{constructor(e){super(e),this.name=this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}},b=class extends C{};var f=class t{static create(e){return new t(e)}static async race(e){let n=new Set;try{let r=e.map(o=>o instanceof t?(o.#s&&n.add(o),o.valueOrThrow()):o);return await Promise.race(r)}finally{for(let r of n)r.reject(new Error("Timeout cleared"))}}#e=!1;#r=!1;#n;#t;#o=new Promise(e=>{this.#t=e});#s;#l;constructor(e){e&&e.timeout>0&&(this.#l=new b(e.message),this.#s=setTimeout(()=>{this.reject(this.#l)},e.timeout))}#a(e){clearTimeout(this.#s),this.#n=e,this.#t()}resolve(e){this.#r||this.#e||(this.#e=!0,this.#a(e))}reject(e){this.#r||this.#e||(this.#r=!0,this.#a(e))}resolved(){return this.#e}finished(){return this.#e||this.#r}value(){return this.#n}#i;valueOrThrow(){return this.#i||(this.#i=(async()=>{if(await this.#o,this.#r)throw this.#n;return this.#n})()),this.#i}};var X=new Map,z=t=>{let e=X.get(t);return e||(e=new Function(`return ${t}`)(),X.set(t,e),e)};var k={};u(k,{ariaQuerySelector:()=>le,ariaQuerySelectorAll:()=>I});var le=(t,e)=>window.__ariaQuerySelector(t,e),I=async function*(t,e){yield*await window.__ariaQuerySelectorAll(t,e)};var M={};u(M,{customQuerySelectors:()=>O});var R=class{#e=new Map;register(e,n){if(!n.queryOne&&n.queryAll){let r=n.queryAll;n.queryOne=(o,i)=>{for(let s of r(o,i))return s;return null}}else if(n.queryOne&&!n.queryAll){let r=n.queryOne;n.queryAll=(o,i)=>{let s=r(o,i);return s?[s]:[]}}else if(!n.queryOne||!n.queryAll)throw new Error("At least one query method must be defined.");this.#e.set(e,{querySelector:n.queryOne,querySelectorAll:n.queryAll})}unregister(e){this.#e.delete(e)}get(e){return this.#e.get(e)}clear(){this.#e.clear()}},O=new R;var q={};u(q,{pierceQuerySelector:()=>ae,pierceQuerySelectorAll:()=>ce});var ae=(t,e)=>{let n=null,r=o=>{let i=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);do{let s=i.currentNode;s.shadowRoot&&r(s.shadowRoot),!(s instanceof ShadowRoot)&&s!==o&&!n&&s.matches(e)&&(n=s)}while(!n&&i.nextNode())};return t instanceof Document&&(t=t.documentElement),r(t),n},ce=(t,e)=>{let n=[],r=o=>{let i=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);do{let s=i.currentNode;s.shadowRoot&&r(s.shadowRoot),!(s instanceof ShadowRoot)&&s!==o&&s.matches(e)&&n.push(s)}while(i.nextNode())};return t instanceof Document&&(t=t.documentElement),r(t),n};var m=(t,e)=>{if(!t)throw new Error(e)};var T=class{#e;#r;#n;#t;constructor(e,n){this.#e=e,this.#r=n}async start(){let e=this.#t=f.create(),n=await this.#e();if(n){e.resolve(n);return}this.#n=new MutationObserver(async()=>{let r=await this.#e();r&&(e.resolve(r),await this.stop())}),this.#n.observe(this.#r,{childList:!0,subtree:!0,attributes:!0})}async stop(){m(this.#t,"Polling never started."),this.#t.finished()||this.#t.reject(new Error("Polling stopped")),this.#n&&(this.#n.disconnect(),this.#n=void 0)}result(){return m(this.#t,"Polling never started."),this.#t.valueOrThrow()}},E=class{#e;#r;constructor(e){this.#e=e}async start(){let e=this.#r=f.create(),n=await this.#e();if(n){e.resolve(n);return}let r=async()=>{if(e.finished())return;let o=await this.#e();if(!o){window.requestAnimationFrame(r);return}e.resolve(o),await this.stop()};window.requestAnimationFrame(r)}async stop(){m(this.#r,"Polling never started."),this.#r.finished()||this.#r.reject(new Error("Polling stopped"))}result(){return m(this.#r,"Polling never started."),this.#r.valueOrThrow()}},P=class{#e;#r;#n;#t;constructor(e,n){this.#e=e,this.#r=n}async start(){let e=this.#t=f.create(),n=await this.#e();if(n){e.resolve(n);return}this.#n=setInterval(async()=>{let r=await this.#e();r&&(e.resolve(r),await this.stop())},this.#r)}async stop(){m(this.#t,"Polling never started."),this.#t.finished()||this.#t.reject(new Error("Polling stopped")),this.#n&&(clearInterval(this.#n),this.#n=void 0)}result(){return m(this.#t,"Polling never started."),this.#t.valueOrThrow()}};var V={};u(V,{pQuerySelector:()=>Ce,pQuerySelectorAll:()=>te});var c=class{static async*map(e,n){for await(let r of e)yield await n(r)}static async*flatMap(e,n){for await(let r of e)yield*n(r)}static async collect(e){let n=[];for await(let r of e)n.push(r);return n}static async first(e){for await(let n of e)return n}};var p={attribute:/\\[\\s*(?:(?<namespace>\\*|[-\\w\\P{ASCII}]*)\\|)?(?<name>[-\\w\\P{ASCII}]+)\\s*(?:(?<operator>\\W?=)\\s*(?<value>.+?)\\s*(\\s(?<caseSensitive>[iIsS]))?\\s*)?\\]/gu,id:/#(?<name>[-\\w\\P{ASCII}]+)/gu,class:/\\.(?<name>[-\\w\\P{ASCII}]+)/gu,comma:/\\s*,\\s*/g,combinator:/\\s*[\\s>+~]\\s*/g,"pseudo-element":/::(?<name>[-\\w\\P{ASCII}]+)(?:\\((?<argument>\xB6*)\\))?/gu,"pseudo-class":/:(?<name>[-\\w\\P{ASCII}]+)(?:\\((?<argument>\xB6*)\\))?/gu,universal:/(?:(?<namespace>\\*|[-\\w\\P{ASCII}]*)\\|)?\\*/gu,type:/(?:(?<namespace>\\*|[-\\w\\P{ASCII}]*)\\|)?(?<name>[-\\w\\P{ASCII}]+)/gu},ue=new Set(["combinator","comma"]);var fe=t=>{switch(t){case"pseudo-element":case"pseudo-class":return new RegExp(p[t].source.replace("(?<argument>\\xB6*)","(?<argument>.*)"),"gu");default:return p[t]}};function de(t,e){let n=0,r="";for(;e<t.length;e++){let o=t[e];switch(o){case"(":++n;break;case")":--n;break}if(r+=o,n===0)return r}return r}function me(t,e=p){if(!t)return[];let n=[t];for(let[o,i]of Object.entries(e))for(let s=0;s<n.length;s++){let l=n[s];if(typeof l!="string")continue;i.lastIndex=0;let a=i.exec(l);if(!a)continue;let h=a.index-1,d=[],W=a[0],H=l.slice(0,h+1);H&&d.push(H),d.push({...a.groups,type:o,content:W});let B=l.slice(h+W.length+1);B&&d.push(B),n.splice(s,1,...d)}let r=0;for(let o of n)switch(typeof o){case"string":throw new Error(`Unexpected sequence ${o} found at index ${r}`);case"object":r+=o.content.length,o.pos=[r-o.content.length,r],ue.has(o.type)&&(o.content=o.content.trim()||" ");break}return n}var he=/([\'"])([^\\\\\\n]+?)\\1/g,pe=/\\\\./g;function G(t,e=p){if(t=t.trim(),t==="")return[];let n=[];t=t.replace(pe,(i,s)=>(n.push({value:i,offset:s}),"\\uE000".repeat(i.length))),t=t.replace(he,(i,s,l,a)=>(n.push({value:i,offset:a}),`${s}${"\\uE001".repeat(l.length)}${s}`));{let i=0,s;for(;(s=t.indexOf("(",i))>-1;){let l=de(t,s);n.push({value:l,offset:s}),t=`${t.substring(0,s)}(${"\\xB6".repeat(l.length-2)})${t.substring(s+l.length)}`,i=s+l.length}}let r=me(t,e),o=new Set;for(let i of n.reverse())for(let s of r){let{offset:l,value:a}=i;if(!(s.pos[0]<=l&&l+a.length<=s.pos[1]))continue;let{content:h}=s,d=l-s.pos[0];s.content=h.slice(0,d)+a+h.slice(d+a.length),s.content!==h&&o.add(s)}for(let i of o){let s=fe(i.type);if(!s)throw new Error(`Unknown token type: ${i.type}`);s.lastIndex=0;let l=s.exec(i.content);if(!l)throw new Error(`Unable to parse content for ${i.type}: ${i.content}`);Object.assign(i,l.groups)}return r}function*x(t,e){switch(t.type){case"list":for(let n of t.list)yield*x(n,t);break;case"complex":yield*x(t.left,t),yield*x(t.right,t);break;case"compound":yield*t.list.map(n=>[n,t]);break;default:yield[t,e]}}function y(t){let e;return Array.isArray(t)?e=t:e=[...x(t)].map(([n])=>n),e.map(n=>n.content).join("")}p.combinator=/\\s*(>>>>?|[\\s>+~])\\s*/g;var ye=/\\\\[\\s\\S]/g,ge=t=>t.length<=1?t:((t[0]===\'"\'||t[0]==="\'")&&t.endsWith(t[0])&&(t=t.slice(1,-1)),t.replace(ye,e=>e[1]));function K(t){let e=!0,n=G(t);if(n.length===0)return[[],e];let r=[],o=[r],i=[o],s=[];for(let l of n){switch(l.type){case"combinator":switch(l.content){case">>>":e=!1,s.length&&(r.push(y(s)),s.splice(0)),r=[],o.push(">>>"),o.push(r);continue;case">>>>":e=!1,s.length&&(r.push(y(s)),s.splice(0)),r=[],o.push(">>>>"),o.push(r);continue}break;case"pseudo-element":if(!l.name.startsWith("-p-"))break;e=!1,s.length&&(r.push(y(s)),s.splice(0)),r.push({name:l.name.slice(3),value:ge(l.argument??"")});continue;case"comma":s.length&&(r.push(y(s)),s.splice(0)),r=[],o=[r],i.push(o);continue}s.push(l)}return s.length&&r.push(y(s)),[i,e]}var _={};u(_,{textQuerySelectorAll:()=>S});var we=new Set(["checkbox","image","radio"]),Se=t=>t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!we.has(t.type),be=new Set(["SCRIPT","STYLE"]),w=t=>!be.has(t.nodeName)&&!document.head?.contains(t),D=new WeakMap,J=t=>{for(;t;)D.delete(t),t instanceof ShadowRoot?t=t.host:t=t.parentNode},Y=new WeakSet,Te=new MutationObserver(t=>{for(let e of t)J(e.target)}),g=t=>{let e=D.get(t);if(e||(e={full:"",immediate:[]},!w(t)))return e;let n="";if(Se(t))e.full=t.value,e.immediate.push(t.value),t.addEventListener("input",r=>{J(r.target)},{once:!0,capture:!0});else{for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===Node.TEXT_NODE){e.full+=r.nodeValue??"",n+=r.nodeValue??"";continue}n&&e.immediate.push(n),n="",r.nodeType===Node.ELEMENT_NODE&&(e.full+=g(r).full)}n&&e.immediate.push(n),t instanceof Element&&t.shadowRoot&&(e.full+=g(t.shadowRoot).full),Y.has(t)||(Te.observe(t,{childList:!0,characterData:!0,subtree:!0}),Y.add(t))}return D.set(t,e),e};var S=function*(t,e){let n=!1;for(let r of t.childNodes)if(r instanceof Element&&w(r)){let o;r.shadowRoot?o=S(r.shadowRoot,e):o=S(r,e);for(let i of o)yield i,n=!0}n||t instanceof Element&&w(t)&&g(t).full.includes(e)&&(yield t)};var L={};u(L,{checkVisibility:()=>Pe,pierce:()=>N,pierceAll:()=>Q});var Ee=["hidden","collapse"],Pe=(t,e)=>{if(!t)return e===!1;if(e===void 0)return t;let n=t.nodeType===Node.TEXT_NODE?t.parentElement:t,r=window.getComputedStyle(n),o=r&&!Ee.includes(r.visibility)&&!xe(n);return e===o?t:!1};function xe(t){let e=t.getBoundingClientRect();return e.width===0||e.height===0}var Ne=t=>"shadowRoot"in t&&t.shadowRoot instanceof ShadowRoot;function*N(t){Ne(t)?yield t.shadowRoot:yield t}function*Q(t){t=N(t).next().value,yield t;let e=[document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT)];for(let n of e){let r;for(;r=n.nextNode();)r.shadowRoot&&(yield r.shadowRoot,e.push(document.createTreeWalker(r.shadowRoot,NodeFilter.SHOW_ELEMENT)))}}var j={};u(j,{xpathQuerySelectorAll:()=>$});var $=function*(t,e,n=-1){let o=(t.ownerDocument||document).evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE),i=[],s;for(;(s=o.iterateNext())&&(i.push(s),!(n&&i.length===n)););for(let l=0;l<i.length;l++)s=i[l],yield s,delete i[l]};var Ae=/[-\\w\\P{ASCII}*]/,Z=t=>"querySelectorAll"in t,A=class extends Error{constructor(e,n){super(`${e} is not a valid selector: ${n}`)}},U=class{#e;#r;#n=[];#t=void 0;elements;constructor(e,n,r){this.elements=[e],this.#e=n,this.#r=r,this.#o()}async run(){if(typeof this.#t=="string")switch(this.#t.trimStart()){case":scope":this.#o();break}for(;this.#t!==void 0;this.#o()){let e=this.#t,n=this.#e;typeof e=="string"?e[0]&&Ae.test(e[0])?this.elements=c.flatMap(this.elements,async function*(r){Z(r)&&(yield*r.querySelectorAll(e))}):this.elements=c.flatMap(this.elements,async function*(r){if(!r.parentElement){if(!Z(r))return;yield*r.querySelectorAll(e);return}let o=0;for(let i of r.parentElement.children)if(++o,i===r)break;yield*r.parentElement.querySelectorAll(`:scope>:nth-child(${o})${e}`)}):this.elements=c.flatMap(this.elements,async function*(r){switch(e.name){case"text":yield*S(r,e.value);break;case"xpath":yield*$(r,e.value);break;case"aria":yield*I(r,e.value);break;default:let o=O.get(e.name);if(!o)throw new A(n,`Unknown selector type: ${e.name}`);yield*o.querySelectorAll(r,e.value)}})}}#o(){if(this.#n.length!==0){this.#t=this.#n.shift();return}if(this.#r.length===0){this.#t=void 0;return}let e=this.#r.shift();switch(e){case">>>>":{this.elements=c.flatMap(this.elements,N),this.#o();break}case">>>":{this.elements=c.flatMap(this.elements,Q),this.#o();break}default:this.#n=e,this.#o();break}}},F=class{#e=new WeakMap;calculate(e,n=[]){if(e===null)return n;e instanceof ShadowRoot&&(e=e.host);let r=this.#e.get(e);if(r)return[...r,...n];let o=0;for(let s=e.previousSibling;s;s=s.previousSibling)++o;let i=this.calculate(e.parentNode,[o]);return this.#e.set(e,i),[...i,...n]}},ee=(t,e)=>{if(t.length+e.length===0)return 0;let[n=-1,...r]=t,[o=-1,...i]=e;return n===o?ee(r,i):n<o?-1:1},ve=async function*(t){let e=new Set;for await(let r of t)e.add(r);let n=new F;yield*[...e.values()].map(r=>[r,n.calculate(r)]).sort(([,r],[,o])=>ee(r,o)).map(([r])=>r)},te=function(t,e){let n,r;try{[n,r]=K(e)}catch{return t.querySelectorAll(e)}if(r)return t.querySelectorAll(e);if(n.some(o=>{let i=0;return o.some(s=>(typeof s=="string"?++i:i=0,i>1))}))throw new A(e,"Multiple deep combinators found in sequence.");return ve(c.flatMap(n,o=>{let i=new U(t,e,o);return i.run(),i.elements}))},Ce=async function(t,e){for await(let n of te(t,e))return n;return null};var Ie=Object.freeze({...k,...M,...q,...V,..._,...L,...j,Deferred:f,createFunction:z,createTextContent:g,IntervalPoller:P,isSuitableNodeForTextMatching:w,MutationPoller:T,RAFPoller:E}),ke=Ie;\n/**\n * @license\n * Copyright 2018 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2024 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2023 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2022 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2020 Google Inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n';
23006
22876
 
23007
22877
  // node_modules/puppeteer-core/lib/esm/puppeteer/common/ScriptInjector.js
23008
22878
  var ScriptInjector = class {
@@ -23133,9 +23003,6 @@
23133
23003
  init_buffer2();
23134
23004
  var _isElementHandle = Symbol("_isElementHandle");
23135
23005
 
23136
- // node_modules/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.js
23137
- init_ErrorLike();
23138
-
23139
23006
  // node_modules/puppeteer-core/lib/esm/puppeteer/common/HandleIterator.js
23140
23007
  init_dirname();
23141
23008
  init_buffer2();
@@ -23684,7 +23551,6 @@
23684
23551
  init_util2();
23685
23552
  init_assert();
23686
23553
  init_decorators();
23687
- init_disposable();
23688
23554
  var __runInitializers5 = function(thisArg, initializers, value) {
23689
23555
  var useValue = arguments.length > 2;
23690
23556
  for (var i7 = 0; i7 < initializers.length; i7++) {
@@ -23789,7 +23655,7 @@
23789
23655
  return e9.name = "SuppressedError", e9.error = error, e9.suppressed = suppressed, e9;
23790
23656
  });
23791
23657
  var ElementHandle = (() => {
23792
- var _a, _b, _c, _d, _e2, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r2, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _22, _32, _42, _5, _6, _7;
23658
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r2, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _22, _32, _42, _5;
23793
23659
  let _classSuper = JSHandle;
23794
23660
  let _instanceExtraInitializers = [];
23795
23661
  let _getProperty_decorators;
@@ -23797,11 +23663,9 @@
23797
23663
  let _jsonValue_decorators;
23798
23664
  let _$_decorators;
23799
23665
  let _$$_decorators;
23800
- let _$x_decorators;
23801
23666
  let _waitForSelector_decorators;
23802
23667
  let _isVisible_decorators;
23803
23668
  let _isHidden_decorators;
23804
- let _waitForXPath_decorators;
23805
23669
  let _toElement_decorators;
23806
23670
  let _clickablePoint_decorators;
23807
23671
  let _hover_decorators;
@@ -23832,43 +23696,39 @@
23832
23696
  _jsonValue_decorators = [throwIfDisposed(), (_c = ElementHandle2).bindIsolatedHandle.bind(_c)];
23833
23697
  _$_decorators = [throwIfDisposed(), (_d = ElementHandle2).bindIsolatedHandle.bind(_d)];
23834
23698
  _$$_decorators = [throwIfDisposed(), (_e2 = ElementHandle2).bindIsolatedHandle.bind(_e2)];
23835
- _$x_decorators = [throwIfDisposed(), (_f = ElementHandle2).bindIsolatedHandle.bind(_f)];
23836
- _waitForSelector_decorators = [throwIfDisposed(), (_g = ElementHandle2).bindIsolatedHandle.bind(_g)];
23837
- _isVisible_decorators = [throwIfDisposed(), (_h = ElementHandle2).bindIsolatedHandle.bind(_h)];
23838
- _isHidden_decorators = [throwIfDisposed(), (_j = ElementHandle2).bindIsolatedHandle.bind(_j)];
23839
- _waitForXPath_decorators = [throwIfDisposed(), (_k = ElementHandle2).bindIsolatedHandle.bind(_k)];
23840
- _toElement_decorators = [throwIfDisposed(), (_l = ElementHandle2).bindIsolatedHandle.bind(_l)];
23841
- _clickablePoint_decorators = [throwIfDisposed(), (_m = ElementHandle2).bindIsolatedHandle.bind(_m)];
23842
- _hover_decorators = [throwIfDisposed(), (_o = ElementHandle2).bindIsolatedHandle.bind(_o)];
23843
- _click_decorators = [throwIfDisposed(), (_p = ElementHandle2).bindIsolatedHandle.bind(_p)];
23844
- _drag_decorators = [throwIfDisposed(), (_q = ElementHandle2).bindIsolatedHandle.bind(_q)];
23845
- _dragEnter_decorators = [throwIfDisposed(), (_r2 = ElementHandle2).bindIsolatedHandle.bind(_r2)];
23846
- _dragOver_decorators = [throwIfDisposed(), (_s = ElementHandle2).bindIsolatedHandle.bind(_s)];
23847
- _drop_decorators = [throwIfDisposed(), (_t = ElementHandle2).bindIsolatedHandle.bind(_t)];
23848
- _dragAndDrop_decorators = [throwIfDisposed(), (_u = ElementHandle2).bindIsolatedHandle.bind(_u)];
23849
- _select_decorators = [throwIfDisposed(), (_v = ElementHandle2).bindIsolatedHandle.bind(_v)];
23850
- _tap_decorators = [throwIfDisposed(), (_w = ElementHandle2).bindIsolatedHandle.bind(_w)];
23851
- _touchStart_decorators = [throwIfDisposed(), (_x = ElementHandle2).bindIsolatedHandle.bind(_x)];
23852
- _touchMove_decorators = [throwIfDisposed(), (_y = ElementHandle2).bindIsolatedHandle.bind(_y)];
23853
- _touchEnd_decorators = [throwIfDisposed(), (_z = ElementHandle2).bindIsolatedHandle.bind(_z)];
23854
- _focus_decorators = [throwIfDisposed(), (_0 = ElementHandle2).bindIsolatedHandle.bind(_0)];
23855
- _type_decorators = [throwIfDisposed(), (_1 = ElementHandle2).bindIsolatedHandle.bind(_1)];
23856
- _press_decorators = [throwIfDisposed(), (_22 = ElementHandle2).bindIsolatedHandle.bind(_22)];
23857
- _boundingBox_decorators = [throwIfDisposed(), (_32 = ElementHandle2).bindIsolatedHandle.bind(_32)];
23858
- _boxModel_decorators = [throwIfDisposed(), (_42 = ElementHandle2).bindIsolatedHandle.bind(_42)];
23859
- _screenshot_decorators = [throwIfDisposed(), (_5 = ElementHandle2).bindIsolatedHandle.bind(_5)];
23860
- _isIntersectingViewport_decorators = [throwIfDisposed(), (_6 = ElementHandle2).bindIsolatedHandle.bind(_6)];
23861
- _scrollIntoView_decorators = [throwIfDisposed(), (_7 = ElementHandle2).bindIsolatedHandle.bind(_7)];
23699
+ _waitForSelector_decorators = [throwIfDisposed(), (_f = ElementHandle2).bindIsolatedHandle.bind(_f)];
23700
+ _isVisible_decorators = [throwIfDisposed(), (_g = ElementHandle2).bindIsolatedHandle.bind(_g)];
23701
+ _isHidden_decorators = [throwIfDisposed(), (_h = ElementHandle2).bindIsolatedHandle.bind(_h)];
23702
+ _toElement_decorators = [throwIfDisposed(), (_j = ElementHandle2).bindIsolatedHandle.bind(_j)];
23703
+ _clickablePoint_decorators = [throwIfDisposed(), (_k = ElementHandle2).bindIsolatedHandle.bind(_k)];
23704
+ _hover_decorators = [throwIfDisposed(), (_l = ElementHandle2).bindIsolatedHandle.bind(_l)];
23705
+ _click_decorators = [throwIfDisposed(), (_m = ElementHandle2).bindIsolatedHandle.bind(_m)];
23706
+ _drag_decorators = [throwIfDisposed(), (_o = ElementHandle2).bindIsolatedHandle.bind(_o)];
23707
+ _dragEnter_decorators = [throwIfDisposed(), (_p = ElementHandle2).bindIsolatedHandle.bind(_p)];
23708
+ _dragOver_decorators = [throwIfDisposed(), (_q = ElementHandle2).bindIsolatedHandle.bind(_q)];
23709
+ _drop_decorators = [throwIfDisposed(), (_r2 = ElementHandle2).bindIsolatedHandle.bind(_r2)];
23710
+ _dragAndDrop_decorators = [throwIfDisposed(), (_s = ElementHandle2).bindIsolatedHandle.bind(_s)];
23711
+ _select_decorators = [throwIfDisposed(), (_t = ElementHandle2).bindIsolatedHandle.bind(_t)];
23712
+ _tap_decorators = [throwIfDisposed(), (_u = ElementHandle2).bindIsolatedHandle.bind(_u)];
23713
+ _touchStart_decorators = [throwIfDisposed(), (_v = ElementHandle2).bindIsolatedHandle.bind(_v)];
23714
+ _touchMove_decorators = [throwIfDisposed(), (_w = ElementHandle2).bindIsolatedHandle.bind(_w)];
23715
+ _touchEnd_decorators = [throwIfDisposed(), (_x = ElementHandle2).bindIsolatedHandle.bind(_x)];
23716
+ _focus_decorators = [throwIfDisposed(), (_y = ElementHandle2).bindIsolatedHandle.bind(_y)];
23717
+ _type_decorators = [throwIfDisposed(), (_z = ElementHandle2).bindIsolatedHandle.bind(_z)];
23718
+ _press_decorators = [throwIfDisposed(), (_0 = ElementHandle2).bindIsolatedHandle.bind(_0)];
23719
+ _boundingBox_decorators = [throwIfDisposed(), (_1 = ElementHandle2).bindIsolatedHandle.bind(_1)];
23720
+ _boxModel_decorators = [throwIfDisposed(), (_22 = ElementHandle2).bindIsolatedHandle.bind(_22)];
23721
+ _screenshot_decorators = [throwIfDisposed(), (_32 = ElementHandle2).bindIsolatedHandle.bind(_32)];
23722
+ _isIntersectingViewport_decorators = [throwIfDisposed(), (_42 = ElementHandle2).bindIsolatedHandle.bind(_42)];
23723
+ _scrollIntoView_decorators = [throwIfDisposed(), (_5 = ElementHandle2).bindIsolatedHandle.bind(_5)];
23862
23724
  __esDecorate5(this, null, _getProperty_decorators, { kind: "method", name: "getProperty", static: false, private: false, access: { has: (obj) => "getProperty" in obj, get: (obj) => obj.getProperty }, metadata: _metadata }, null, _instanceExtraInitializers);
23863
23725
  __esDecorate5(this, null, _getProperties_decorators, { kind: "method", name: "getProperties", static: false, private: false, access: { has: (obj) => "getProperties" in obj, get: (obj) => obj.getProperties }, metadata: _metadata }, null, _instanceExtraInitializers);
23864
23726
  __esDecorate5(this, null, _jsonValue_decorators, { kind: "method", name: "jsonValue", static: false, private: false, access: { has: (obj) => "jsonValue" in obj, get: (obj) => obj.jsonValue }, metadata: _metadata }, null, _instanceExtraInitializers);
23865
23727
  __esDecorate5(this, null, _$_decorators, { kind: "method", name: "$", static: false, private: false, access: { has: (obj) => "$" in obj, get: (obj) => obj.$ }, metadata: _metadata }, null, _instanceExtraInitializers);
23866
23728
  __esDecorate5(this, null, _$$_decorators, { kind: "method", name: "$$", static: false, private: false, access: { has: (obj) => "$$" in obj, get: (obj) => obj.$$ }, metadata: _metadata }, null, _instanceExtraInitializers);
23867
- __esDecorate5(this, null, _$x_decorators, { kind: "method", name: "$x", static: false, private: false, access: { has: (obj) => "$x" in obj, get: (obj) => obj.$x }, metadata: _metadata }, null, _instanceExtraInitializers);
23868
23729
  __esDecorate5(this, null, _waitForSelector_decorators, { kind: "method", name: "waitForSelector", static: false, private: false, access: { has: (obj) => "waitForSelector" in obj, get: (obj) => obj.waitForSelector }, metadata: _metadata }, null, _instanceExtraInitializers);
23869
23730
  __esDecorate5(this, null, _isVisible_decorators, { kind: "method", name: "isVisible", static: false, private: false, access: { has: (obj) => "isVisible" in obj, get: (obj) => obj.isVisible }, metadata: _metadata }, null, _instanceExtraInitializers);
23870
23731
  __esDecorate5(this, null, _isHidden_decorators, { kind: "method", name: "isHidden", static: false, private: false, access: { has: (obj) => "isHidden" in obj, get: (obj) => obj.isHidden }, metadata: _metadata }, null, _instanceExtraInitializers);
23871
- __esDecorate5(this, null, _waitForXPath_decorators, { kind: "method", name: "waitForXPath", static: false, private: false, access: { has: (obj) => "waitForXPath" in obj, get: (obj) => obj.waitForXPath }, metadata: _metadata }, null, _instanceExtraInitializers);
23872
23732
  __esDecorate5(this, null, _toElement_decorators, { kind: "method", name: "toElement", static: false, private: false, access: { has: (obj) => "toElement" in obj, get: (obj) => obj.toElement }, metadata: _metadata }, null, _instanceExtraInitializers);
23873
23733
  __esDecorate5(this, null, _clickablePoint_decorators, { kind: "method", name: "clickablePoint", static: false, private: false, access: { has: (obj) => "clickablePoint" in obj, get: (obj) => obj.clickablePoint }, metadata: _metadata }, null, _instanceExtraInitializers);
23874
23734
  __esDecorate5(this, null, _hover_decorators, { kind: "method", name: "hover", static: false, private: false, access: { has: (obj) => "hover" in obj, get: (obj) => obj.hover }, metadata: _metadata }, null, _instanceExtraInitializers);
@@ -23902,7 +23762,7 @@
23902
23762
  *
23903
23763
  * @internal
23904
23764
  */
23905
- static bindIsolatedHandle(target, _8) {
23765
+ static bindIsolatedHandle(target, _6) {
23906
23766
  return async function(...args) {
23907
23767
  const env_1 = { stack: [], error: void 0, hasError: false };
23908
23768
  try {
@@ -24122,7 +23982,7 @@
24122
23982
  try {
24123
23983
  pageFunction = withSourcePuppeteerURLIfNone(this.$$eval.name, pageFunction);
24124
23984
  const results = await this.$$(selector);
24125
- const elements = __addDisposableResource8(env_3, await this.evaluateHandle((_8, ...elements2) => {
23985
+ const elements = __addDisposableResource8(env_3, await this.evaluateHandle((_6, ...elements2) => {
24126
23986
  return elements2;
24127
23987
  }, ...results), false);
24128
23988
  const [result] = await Promise.all([
@@ -24139,24 +23999,6 @@
24139
23999
  __disposeResources8(env_3);
24140
24000
  }
24141
24001
  }
24142
- /**
24143
- * @deprecated Use {@link ElementHandle.$$} with the `xpath` prefix.
24144
- *
24145
- * Example: `await elementHandle.$$('xpath/' + xpathExpression)`
24146
- *
24147
- * The method evaluates the XPath expression relative to the elementHandle.
24148
- * If `xpath` starts with `//` instead of `.//`, the dot will be appended
24149
- * automatically.
24150
- *
24151
- * If there are no such elements, the method will resolve to an empty array.
24152
- * @param expression - Expression to {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/evaluate | evaluate}
24153
- */
24154
- async $x(expression) {
24155
- if (expression.startsWith("//")) {
24156
- expression = `.${expression}`;
24157
- }
24158
- return await this.$$(`xpath/${expression}`);
24159
- }
24160
24002
  /**
24161
24003
  * Wait for an element matching the given selector to appear in the current
24162
24004
  * element.
@@ -24219,74 +24061,6 @@
24219
24061
  async isHidden() {
24220
24062
  return await this.#checkVisibility(false);
24221
24063
  }
24222
- /**
24223
- * @deprecated Use {@link ElementHandle.waitForSelector} with the `xpath`
24224
- * prefix.
24225
- *
24226
- * Example: `await elementHandle.waitForSelector('xpath/' + xpathExpression)`
24227
- *
24228
- * The method evaluates the XPath expression relative to the elementHandle.
24229
- *
24230
- * Wait for the `xpath` within the element. If at the moment of calling the
24231
- * method the `xpath` already exists, the method will return immediately. If
24232
- * the `xpath` doesn't appear after the `timeout` milliseconds of waiting, the
24233
- * function will throw.
24234
- *
24235
- * If `xpath` starts with `//` instead of `.//`, the dot will be appended
24236
- * automatically.
24237
- *
24238
- * @example
24239
- * This method works across navigation.
24240
- *
24241
- * ```ts
24242
- * import puppeteer from 'puppeteer';
24243
- * (async () => {
24244
- * const browser = await puppeteer.launch();
24245
- * const page = await browser.newPage();
24246
- * let currentURL;
24247
- * page
24248
- * .waitForXPath('//img')
24249
- * .then(() => console.log('First URL with image: ' + currentURL));
24250
- * for (currentURL of [
24251
- * 'https://example.com',
24252
- * 'https://google.com',
24253
- * 'https://bbc.com',
24254
- * ]) {
24255
- * await page.goto(currentURL);
24256
- * }
24257
- * await browser.close();
24258
- * })();
24259
- * ```
24260
- *
24261
- * @param xpath - A
24262
- * {@link https://developer.mozilla.org/en-US/docs/Web/XPath | xpath} of an
24263
- * element to wait for
24264
- * @param options - Optional waiting parameters
24265
- * @returns Promise which resolves when element specified by xpath string is
24266
- * added to DOM. Resolves to `null` if waiting for `hidden: true` and xpath is
24267
- * not found in DOM, otherwise resolves to `ElementHandle`.
24268
- * @remarks
24269
- * The optional Argument `options` have properties:
24270
- *
24271
- * - `visible`: A boolean to wait for element to be present in DOM and to be
24272
- * visible, i.e. to not have `display: none` or `visibility: hidden` CSS
24273
- * properties. Defaults to `false`.
24274
- *
24275
- * - `hidden`: A boolean wait for element to not be found in the DOM or to be
24276
- * hidden, i.e. have `display: none` or `visibility: hidden` CSS properties.
24277
- * Defaults to `false`.
24278
- *
24279
- * - `timeout`: A number which is maximum time to wait for in milliseconds.
24280
- * Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
24281
- * default value can be changed by using the {@link Page.setDefaultTimeout}
24282
- * method.
24283
- */
24284
- async waitForXPath(xpath, options = {}) {
24285
- if (xpath.startsWith("//")) {
24286
- xpath = `.${xpath}`;
24287
- }
24288
- return await this.waitForSelector(`xpath/${xpath}`, options);
24289
- }
24290
24064
  /**
24291
24065
  * Converts the current handle to the given element type.
24292
24066
  *
@@ -24803,54 +24577,25 @@
24803
24577
  return point;
24804
24578
  }
24805
24579
  async screenshot(options = {}) {
24806
- const env_6 = { stack: [], error: void 0, hasError: false };
24807
- try {
24808
- const { scrollIntoView = true } = options;
24809
- let clip = await this.#nonEmptyVisibleBoundingBox();
24810
- const page = this.frame.page();
24811
- const viewport = page.viewport() ?? {
24812
- width: clip.width,
24813
- height: clip.height
24814
- };
24815
- const stack = __addDisposableResource8(env_6, new AsyncDisposableStack(), true);
24816
- if (clip.width > viewport.width || clip.height > viewport.height) {
24817
- await this.frame.page().setViewport({
24818
- ...viewport,
24819
- width: Math.max(viewport.width, Math.ceil(clip.width)),
24820
- height: Math.max(viewport.height, Math.ceil(clip.height))
24821
- });
24822
- stack.defer(async () => {
24823
- try {
24824
- await this.frame.page().setViewport(viewport);
24825
- } catch (error) {
24826
- debugError(error);
24827
- }
24828
- });
24829
- }
24830
- if (scrollIntoView) {
24831
- await this.scrollIntoViewIfNeeded();
24832
- clip = await this.#nonEmptyVisibleBoundingBox();
24833
- }
24834
- const [pageLeft, pageTop] = await this.evaluate(() => {
24835
- if (!window.visualViewport) {
24836
- throw new Error("window.visualViewport is not supported.");
24837
- }
24838
- return [
24839
- window.visualViewport.pageLeft,
24840
- window.visualViewport.pageTop
24841
- ];
24842
- });
24843
- clip.x += pageLeft;
24844
- clip.y += pageTop;
24845
- return await page.screenshot({ ...options, clip });
24846
- } catch (e_6) {
24847
- env_6.error = e_6;
24848
- env_6.hasError = true;
24849
- } finally {
24850
- const result_1 = __disposeResources8(env_6);
24851
- if (result_1)
24852
- await result_1;
24580
+ const { scrollIntoView = true } = options;
24581
+ let clip = await this.#nonEmptyVisibleBoundingBox();
24582
+ const page = this.frame.page();
24583
+ if (scrollIntoView) {
24584
+ await this.scrollIntoViewIfNeeded();
24585
+ clip = await this.#nonEmptyVisibleBoundingBox();
24853
24586
  }
24587
+ const [pageLeft, pageTop] = await this.evaluate(() => {
24588
+ if (!window.visualViewport) {
24589
+ throw new Error("window.visualViewport is not supported.");
24590
+ }
24591
+ return [
24592
+ window.visualViewport.pageLeft,
24593
+ window.visualViewport.pageTop
24594
+ ];
24595
+ });
24596
+ clip.x += pageLeft;
24597
+ clip.y += pageTop;
24598
+ return await page.screenshot({ ...options, clip });
24854
24599
  }
24855
24600
  async #nonEmptyVisibleBoundingBox() {
24856
24601
  const box = await this.boundingBox();
@@ -24896,11 +24641,11 @@
24896
24641
  * (full intersection). Defaults to 1.
24897
24642
  */
24898
24643
  async isIntersectingViewport(options = {}) {
24899
- const env_7 = { stack: [], error: void 0, hasError: false };
24644
+ const env_6 = { stack: [], error: void 0, hasError: false };
24900
24645
  try {
24901
24646
  await this.assertConnectedElement();
24902
24647
  const handle = await this.#asSVGElementHandle();
24903
- const target = __addDisposableResource8(env_7, handle && await handle.#getOwnerSVGElement(), false);
24648
+ const target = __addDisposableResource8(env_6, handle && await handle.#getOwnerSVGElement(), false);
24904
24649
  return await (target ?? this).evaluate(async (element, threshold) => {
24905
24650
  const visibleRatio = await new Promise((resolve3) => {
24906
24651
  const observer = new IntersectionObserver((entries) => {
@@ -24911,11 +24656,11 @@
24911
24656
  });
24912
24657
  return threshold === 1 ? visibleRatio === 1 : visibleRatio > threshold;
24913
24658
  }, options.threshold ?? 0);
24914
- } catch (e_7) {
24915
- env_7.error = e_7;
24916
- env_7.hasError = true;
24659
+ } catch (e_6) {
24660
+ env_6.error = e_6;
24661
+ env_6.hasError = true;
24917
24662
  } finally {
24918
- __disposeResources8(env_7);
24663
+ __disposeResources8(env_6);
24919
24664
  }
24920
24665
  }
24921
24666
  /**
@@ -25871,9 +25616,7 @@ ${sourceUrlComment}
25871
25616
  let _$$_decorators;
25872
25617
  let _$eval_decorators;
25873
25618
  let _$$eval_decorators;
25874
- let _$x_decorators;
25875
25619
  let _waitForSelector_decorators;
25876
- let _waitForXPath_decorators;
25877
25620
  let _waitForFunction_decorators;
25878
25621
  let _content_decorators;
25879
25622
  let _addScriptTag_decorators;
@@ -25896,9 +25639,7 @@ ${sourceUrlComment}
25896
25639
  _$$_decorators = [throwIfDetached];
25897
25640
  _$eval_decorators = [throwIfDetached];
25898
25641
  _$$eval_decorators = [throwIfDetached];
25899
- _$x_decorators = [throwIfDetached];
25900
25642
  _waitForSelector_decorators = [throwIfDetached];
25901
- _waitForXPath_decorators = [throwIfDetached];
25902
25643
  _waitForFunction_decorators = [throwIfDetached];
25903
25644
  _content_decorators = [throwIfDetached];
25904
25645
  _addScriptTag_decorators = [throwIfDetached];
@@ -25918,9 +25659,7 @@ ${sourceUrlComment}
25918
25659
  __esDecorate7(this, null, _$$_decorators, { kind: "method", name: "$$", static: false, private: false, access: { has: (obj) => "$$" in obj, get: (obj) => obj.$$ }, metadata: _metadata }, null, _instanceExtraInitializers);
25919
25660
  __esDecorate7(this, null, _$eval_decorators, { kind: "method", name: "$eval", static: false, private: false, access: { has: (obj) => "$eval" in obj, get: (obj) => obj.$eval }, metadata: _metadata }, null, _instanceExtraInitializers);
25920
25661
  __esDecorate7(this, null, _$$eval_decorators, { kind: "method", name: "$$eval", static: false, private: false, access: { has: (obj) => "$$eval" in obj, get: (obj) => obj.$$eval }, metadata: _metadata }, null, _instanceExtraInitializers);
25921
- __esDecorate7(this, null, _$x_decorators, { kind: "method", name: "$x", static: false, private: false, access: { has: (obj) => "$x" in obj, get: (obj) => obj.$x }, metadata: _metadata }, null, _instanceExtraInitializers);
25922
25662
  __esDecorate7(this, null, _waitForSelector_decorators, { kind: "method", name: "waitForSelector", static: false, private: false, access: { has: (obj) => "waitForSelector" in obj, get: (obj) => obj.waitForSelector }, metadata: _metadata }, null, _instanceExtraInitializers);
25923
- __esDecorate7(this, null, _waitForXPath_decorators, { kind: "method", name: "waitForXPath", static: false, private: false, access: { has: (obj) => "waitForXPath" in obj, get: (obj) => obj.waitForXPath }, metadata: _metadata }, null, _instanceExtraInitializers);
25924
25663
  __esDecorate7(this, null, _waitForFunction_decorators, { kind: "method", name: "waitForFunction", static: false, private: false, access: { has: (obj) => "waitForFunction" in obj, get: (obj) => obj.waitForFunction }, metadata: _metadata }, null, _instanceExtraInitializers);
25925
25664
  __esDecorate7(this, null, _content_decorators, { kind: "method", name: "content", static: false, private: false, access: { has: (obj) => "content" in obj, get: (obj) => obj.content }, metadata: _metadata }, null, _instanceExtraInitializers);
25926
25665
  __esDecorate7(this, null, _addScriptTag_decorators, { kind: "method", name: "addScriptTag", static: false, private: false, access: { has: (obj) => "addScriptTag" in obj, get: (obj) => obj.addScriptTag }, metadata: _metadata }, null, _instanceExtraInitializers);
@@ -26121,20 +25860,6 @@ ${sourceUrlComment}
26121
25860
  const document2 = await this.#document();
26122
25861
  return await document2.$$eval(selector, pageFunction, ...args);
26123
25862
  }
26124
- /**
26125
- * @deprecated Use {@link Frame.$$} with the `xpath` prefix.
26126
- *
26127
- * Example: `await frame.$$('xpath/' + xpathExpression)`
26128
- *
26129
- * This method evaluates the given XPath expression and returns the results.
26130
- * If `xpath` starts with `//` instead of `.//`, the dot will be appended
26131
- * automatically.
26132
- * @param expression - the XPath expression to evaluate.
26133
- */
26134
- async $x(expression) {
26135
- const document2 = await this.#document();
26136
- return await document2.$x(expression);
26137
- }
26138
25863
  /**
26139
25864
  * Waits for an element matching the given selector to appear in the frame.
26140
25865
  *
@@ -26174,34 +25899,6 @@ ${sourceUrlComment}
26174
25899
  const { updatedSelector, QueryHandler: QueryHandler2 } = getQueryHandlerAndSelector(selector);
26175
25900
  return await QueryHandler2.waitFor(this, updatedSelector, options);
26176
25901
  }
26177
- /**
26178
- * @deprecated Use {@link Frame.waitForSelector} with the `xpath` prefix.
26179
- *
26180
- * Example: `await frame.waitForSelector('xpath/' + xpathExpression)`
26181
- *
26182
- * The method evaluates the XPath expression relative to the Frame.
26183
- * If `xpath` starts with `//` instead of `.//`, the dot will be appended
26184
- * automatically.
26185
- *
26186
- * Wait for the `xpath` to appear in page. If at the moment of calling the
26187
- * method the `xpath` already exists, the method will return immediately. If
26188
- * the xpath doesn't appear after the `timeout` milliseconds of waiting, the
26189
- * function will throw.
26190
- *
26191
- * For a code example, see the example for {@link Frame.waitForSelector}. That
26192
- * function behaves identically other than taking a CSS selector rather than
26193
- * an XPath.
26194
- *
26195
- * @param xpath - the XPath expression to wait for.
26196
- * @param options - options to configure the visibility of the element and how
26197
- * long to wait before timing out.
26198
- */
26199
- async waitForXPath(xpath, options = {}) {
26200
- if (xpath.startsWith("//")) {
26201
- xpath = `.${xpath}`;
26202
- }
26203
- return await this.waitForSelector(`xpath/${xpath}`, options);
26204
- }
26205
25902
  /**
26206
25903
  * @example
26207
25904
  * The `waitForFunction` can be used to observe viewport size change:
@@ -26534,31 +26231,6 @@ ${sourceUrlComment}
26534
26231
  __disposeResources9(env_8);
26535
26232
  }
26536
26233
  }
26537
- /**
26538
- * @deprecated Replace with `new Promise(r => setTimeout(r, milliseconds));`.
26539
- *
26540
- * Causes your script to wait for the given number of milliseconds.
26541
- *
26542
- * @remarks
26543
- * It's generally recommended to not wait for a number of seconds, but instead
26544
- * use {@link Frame.waitForSelector}, {@link Frame.waitForXPath} or
26545
- * {@link Frame.waitForFunction} to wait for exactly the conditions you want.
26546
- *
26547
- * @example
26548
- *
26549
- * Wait for 1 second:
26550
- *
26551
- * ```ts
26552
- * await frame.waitForTimeout(1000);
26553
- * ```
26554
- *
26555
- * @param milliseconds - the number of milliseconds to wait.
26556
- */
26557
- async waitForTimeout(milliseconds) {
26558
- return await new Promise((resolve3) => {
26559
- setTimeout(resolve3, milliseconds);
26560
- });
26561
- }
26562
26234
  /**
26563
26235
  * The frame's title.
26564
26236
  */
@@ -26576,7 +26248,6 @@ ${sourceUrlComment}
26576
26248
  init_assert();
26577
26249
  init_Deferred();
26578
26250
  init_disposable();
26579
- init_ErrorLike();
26580
26251
 
26581
26252
  // node_modules/puppeteer-core/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js
26582
26253
  init_dirname();
@@ -26756,7 +26427,6 @@ ${sourceUrlComment}
26756
26427
  init_Errors();
26757
26428
  init_Deferred();
26758
26429
  init_disposable();
26759
- init_ErrorLike();
26760
26430
 
26761
26431
  // node_modules/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js
26762
26432
  init_dirname();
@@ -26770,7 +26440,6 @@ ${sourceUrlComment}
26770
26440
  init_dirname();
26771
26441
  init_buffer2();
26772
26442
  init_Deferred();
26773
- init_ErrorLike();
26774
26443
  init_Errors();
26775
26444
  var WaitTask = class {
26776
26445
  #world;
@@ -30154,7 +29823,6 @@ ${sourceUrlComment}
30154
29823
  init_util2();
30155
29824
  init_assert();
30156
29825
  init_Deferred();
30157
- init_ErrorLike();
30158
29826
  var Tracing = class {
30159
29827
  #client;
30160
29828
  #recording = false;
@@ -30403,6 +30071,14 @@ ${sourceUrlComment}
30403
30071
  var e9 = new Error(message);
30404
30072
  return e9.name = "SuppressedError", e9.error = error, e9.suppressed = suppressed, e9;
30405
30073
  });
30074
+ function convertConsoleMessageLevel(method) {
30075
+ switch (method) {
30076
+ case "warning":
30077
+ return "warn";
30078
+ default:
30079
+ return method;
30080
+ }
30081
+ }
30406
30082
  var CdpPage = class _CdpPage extends Page {
30407
30083
  static async _create(client, target, ignoreHTTPSErrors, defaultViewport) {
30408
30084
  const page = new _CdpPage(client, target, ignoreHTTPSErrors);
@@ -30704,7 +30380,7 @@ ${sourceUrlComment}
30704
30380
  });
30705
30381
  }
30706
30382
  if (source2 !== "worker") {
30707
- this.emit("console", new ConsoleMessage(level, text, [], [{ url, lineNumber }]));
30383
+ this.emit("console", new ConsoleMessage(convertConsoleMessageLevel(level), text, [], [{ url, lineNumber }]));
30708
30384
  }
30709
30385
  }
30710
30386
  mainFrame() {
@@ -30771,7 +30447,7 @@ ${sourceUrlComment}
30771
30447
  const originalCookies = (await this.#primaryTargetClient.send("Network.getCookies", {
30772
30448
  urls: urls.length ? urls : [this.url()]
30773
30449
  })).cookies;
30774
- const unsupportedCookieAttributes = ["priority"];
30450
+ const unsupportedCookieAttributes = ["sourcePort"];
30775
30451
  const filterUnsupportedAttributes = (cookie) => {
30776
30452
  for (const attr of unsupportedCookieAttributes) {
30777
30453
  delete cookie[attr];
@@ -30897,7 +30573,7 @@ ${sourceUrlComment}
30897
30573
  const values = event.args.map((arg) => {
30898
30574
  return createCdpHandle(context._world, arg);
30899
30575
  });
30900
- this.#addConsoleMessage(event.type, values, event.stackTrace);
30576
+ this.#addConsoleMessage(convertConsoleMessageLevel(event.type), values, event.stackTrace);
30901
30577
  }
30902
30578
  async #onBindingCalled(event) {
30903
30579
  let payload;
@@ -30946,7 +30622,7 @@ ${sourceUrlComment}
30946
30622
  });
30947
30623
  }
30948
30624
  }
30949
- const message = new ConsoleMessage(eventType, textTokens.join(" "), args, stackTraceLocations);
30625
+ const message = new ConsoleMessage(convertConsoleMessageLevel(eventType), textTokens.join(" "), args, stackTraceLocations);
30950
30626
  this.emit("console", message);
30951
30627
  }
30952
30628
  #onDialog(event) {
@@ -31720,7 +31396,7 @@ ${sourceUrlComment}
31720
31396
  _getIsPageTargetCallback() {
31721
31397
  return this.#isPageTargetCallback;
31722
31398
  }
31723
- async createIncognitoBrowserContext(options = {}) {
31399
+ async createBrowserContext(options = {}) {
31724
31400
  const { proxyServer, proxyBypassList } = options;
31725
31401
  const { browserContextId } = await this.#connection.send("Target.createBrowserContext", {
31726
31402
  proxyServer,
@@ -32021,13 +31697,6 @@ puppeteer-core/lib/esm/third_party/rxjs/rxjs.js:
32021
31697
  * SPDX-License-Identifier: Apache-2.0
32022
31698
  *)
32023
31699
 
32024
- puppeteer-core/lib/esm/puppeteer/environment.js:
32025
- (**
32026
- * @license
32027
- * Copyright 2020 Google Inc.
32028
- * SPDX-License-Identifier: Apache-2.0
32029
- *)
32030
-
32031
31700
  puppeteer-core/lib/esm/puppeteer/util/assert.js:
32032
31701
  (**
32033
31702
  * @license
@@ -32035,10 +31704,10 @@ puppeteer-core/lib/esm/puppeteer/util/assert.js:
32035
31704
  * SPDX-License-Identifier: Apache-2.0
32036
31705
  *)
32037
31706
 
32038
- puppeteer-core/lib/esm/puppeteer/util/ErrorLike.js:
31707
+ puppeteer-core/lib/esm/puppeteer/environment.js:
32039
31708
  (**
32040
31709
  * @license
32041
- * Copyright 2022 Google Inc.
31710
+ * Copyright 2020 Google Inc.
32042
31711
  * SPDX-License-Identifier: Apache-2.0
32043
31712
  *)
32044
31713
 
@@ -32102,6 +31771,20 @@ puppeteer-core/lib/esm/puppeteer/common/EventEmitter.js:
32102
31771
  * SPDX-License-Identifier: Apache-2.0
32103
31772
  *)
32104
31773
 
31774
+ puppeteer-core/lib/esm/puppeteer/util/Deferred.js:
31775
+ (**
31776
+ * @license
31777
+ * Copyright 2024 Google Inc.
31778
+ * SPDX-License-Identifier: Apache-2.0
31779
+ *)
31780
+
31781
+ puppeteer-core/lib/esm/puppeteer/util/Mutex.js:
31782
+ (**
31783
+ * @license
31784
+ * Copyright 2024 Google Inc.
31785
+ * SPDX-License-Identifier: Apache-2.0
31786
+ *)
31787
+
32105
31788
  puppeteer-core/lib/esm/puppeteer/util/decorators.js:
32106
31789
  (**
32107
31790
  * @license
@@ -32137,6 +31820,13 @@ puppeteer-core/lib/esm/puppeteer/api/Target.js:
32137
31820
  * SPDX-License-Identifier: Apache-2.0
32138
31821
  *)
32139
31822
 
31823
+ puppeteer-core/lib/esm/puppeteer/util/ErrorLike.js:
31824
+ (**
31825
+ * @license
31826
+ * Copyright 2022 Google Inc.
31827
+ * SPDX-License-Identifier: Apache-2.0
31828
+ *)
31829
+
32140
31830
  puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:
32141
31831
  (**
32142
31832
  * @license
@@ -32200,6 +31890,13 @@ puppeteer-core/lib/esm/puppeteer/api/JSHandle.js:
32200
31890
  * SPDX-License-Identifier: Apache-2.0
32201
31891
  *)
32202
31892
 
31893
+ puppeteer-core/lib/esm/puppeteer/cdp/Binding.js:
31894
+ (**
31895
+ * @license
31896
+ * Copyright 2024 Google Inc.
31897
+ * SPDX-License-Identifier: Apache-2.0
31898
+ *)
31899
+
32203
31900
  puppeteer-core/lib/esm/puppeteer/cdp/Connection.js:
32204
31901
  (**
32205
31902
  * @license
@@ -32235,6 +31932,13 @@ puppeteer-core/lib/esm/puppeteer/common/LazyArg.js:
32235
31932
  * SPDX-License-Identifier: Apache-2.0
32236
31933
  *)
32237
31934
 
31935
+ puppeteer-core/lib/esm/puppeteer/common/ScriptInjector.js:
31936
+ (**
31937
+ * @license
31938
+ * Copyright 2024 Google Inc.
31939
+ * SPDX-License-Identifier: Apache-2.0
31940
+ *)
31941
+
32238
31942
  puppeteer-core/lib/esm/puppeteer/util/Function.js:
32239
31943
  (**
32240
31944
  * @license