@duckduckgo/autoconsent 6.2.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -646,6 +646,7 @@
646
646
  EVAL_BORLABS_0: () => !JSON.parse(decodeURIComponent(document.cookie.split(";").find((c) => c.indexOf("borlabs-cookie") !== -1).split("=", 2)[1])).consents.statistics,
647
647
  EVAL_BUNDESREGIERUNG_DE_0: () => document.cookie.match("cookie-allow-tracking=0"),
648
648
  EVAL_CANVA_0: () => !document.cookie.includes("gtm_fpc_engagement_event"),
649
+ EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
649
650
  EVAL_CLICKIO_0: () => document.cookie.includes("__lxG__consent__v2_daisybit="),
650
651
  EVAL_CLINCH_0: () => document.cookie.includes("ctc_rejected=1"),
651
652
  EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
@@ -698,6 +699,7 @@
698
699
  EVAL_SIRDATA_0: () => document.cookie.includes("euconsent-v2"),
699
700
  EVAL_SNIGEL_0: () => !!document.cookie.match("snconsent"),
700
701
  EVAL_STEAMPOWERED_0: () => JSON.parse(decodeURIComponent(document.cookie.split(";").find((s) => s.trim().startsWith("cookieSettings")).split("=")[1])).preference_state === 2,
702
+ EVAL_TAKEALOT_0: () => document.body.classList.remove("freeze") || (document.body.style = "") || true,
701
703
  EVAL_TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true,
702
704
  EVAL_TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true,
703
705
  EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes("false"),
@@ -1474,6 +1476,9 @@
1474
1476
  return elementVisible("#onetrust-banner-sdk", "all");
1475
1477
  }
1476
1478
  async optOut() {
1479
+ if (elementVisible("#onetrust-reject-all-handler,.js-reject-cookies", "any")) {
1480
+ return click("#onetrust-reject-all-handler,.js-reject-cookies");
1481
+ }
1477
1482
  if (elementExists("#onetrust-pc-btn-handler")) {
1478
1483
  click("#onetrust-pc-btn-handler");
1479
1484
  } else {
@@ -1485,18 +1490,18 @@
1485
1490
  await wait(1e3);
1486
1491
  await waitForElement(".save-preference-btn-handler,.js-consent-save", 2e3);
1487
1492
  click(".save-preference-btn-handler,.js-consent-save");
1488
- await waitFor(
1489
- () => elementVisible("#onetrust-banner-sdk", "none"),
1490
- 10,
1491
- 500
1492
- );
1493
+ await waitForVisible("#onetrust-banner-sdk", 5e3, "none");
1493
1494
  return true;
1494
1495
  }
1495
1496
  async optIn() {
1496
1497
  return click("#onetrust-accept-btn-handler,.js-accept-cookies");
1497
1498
  }
1498
1499
  async test() {
1499
- return await this.mainWorldEval("EVAL_ONETRUST_1");
1500
+ return await waitFor(
1501
+ () => this.mainWorldEval("EVAL_ONETRUST_1"),
1502
+ 10,
1503
+ 500
1504
+ );
1500
1505
  }
1501
1506
  };
1502
1507
 
@@ -1920,6 +1925,9 @@
1920
1925
  return false;
1921
1926
  }
1922
1927
  this.updateState({ lifecycle: "openPopupDetected" });
1928
+ if (this.config.enablePrehide && !this.state.prehideOn) {
1929
+ this.prehideElements();
1930
+ }
1923
1931
  if (foundPopups.length > 1) {
1924
1932
  const errorDetails = {
1925
1933
  msg: `Found multiple CMPs, check the detection rules.`,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 2,
3
3
  "name": "Autoconsent",
4
- "version": "2023.9.14",
4
+ "version": "2023.11.14",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"
@@ -777,6 +777,71 @@
777
777
  }
778
778
  ]
779
779
  },
780
+ {
781
+ "name": "cc-banner-springer",
782
+ "prehideSelectors": [
783
+ ".cc-banner[data-cc-banner]"
784
+ ],
785
+ "detectCmp": [
786
+ {
787
+ "exists": ".cc-banner[data-cc-banner]"
788
+ }
789
+ ],
790
+ "detectPopup": [
791
+ {
792
+ "visible": ".cc-banner[data-cc-banner]"
793
+ }
794
+ ],
795
+ "optIn": [
796
+ {
797
+ "waitForThenClick": ".cc-banner[data-cc-banner] button[data-cc-action=accept]"
798
+ }
799
+ ],
800
+ "optOut": [
801
+ {
802
+ "if": {
803
+ "exists": ".cc-banner[data-cc-banner] button[data-cc-action=reject]"
804
+ },
805
+ "then": [
806
+ {
807
+ "click": ".cc-banner[data-cc-banner] button[data-cc-action=reject]"
808
+ }
809
+ ],
810
+ "else": [
811
+ {
812
+ "waitForThenClick": ".cc-banner[data-cc-banner] button[data-cc-action=preferences]"
813
+ },
814
+ {
815
+ "waitFor": ".cc-preferences[data-cc-preferences]"
816
+ },
817
+ {
818
+ "click": ".cc-preferences[data-cc-preferences] input[type=radio][data-cc-action=toggle-category][value=off]",
819
+ "all": true
820
+ },
821
+ {
822
+ "if": {
823
+ "exists": ".cc-preferences[data-cc-preferences] button[data-cc-action=reject]"
824
+ },
825
+ "then": [
826
+ {
827
+ "click": ".cc-preferences[data-cc-preferences] button[data-cc-action=reject]"
828
+ }
829
+ ],
830
+ "else": [
831
+ {
832
+ "click": ".cc-preferences[data-cc-preferences] button[data-cc-action=save]"
833
+ }
834
+ ]
835
+ }
836
+ ]
837
+ }
838
+ ],
839
+ "test": [
840
+ {
841
+ "eval": "EVAL_CC_BANNER2_0"
842
+ }
843
+ ]
844
+ },
780
845
  {
781
846
  "name": "cc_banner",
782
847
  "cosmetic": true,
@@ -3917,7 +3982,7 @@
3917
3982
  "name": "takealot.com",
3918
3983
  "cosmetic": true,
3919
3984
  "prehideSelectors": [
3920
- "div[class^=\"cookies-banner-module_cookie-banner_\"]"
3985
+ "div[class^=\"cookies-banner-module_\"]"
3921
3986
  ],
3922
3987
  "detectCmp": [
3923
3988
  {
@@ -3937,8 +4002,19 @@
3937
4002
  "optOut": [
3938
4003
  {
3939
4004
  "hide": [
3940
- "div[class^=\"cookies-banner-module_cookie-banner_\"]"
4005
+ "div[class^=\"cookies-banner-module_\"]"
3941
4006
  ]
4007
+ },
4008
+ {
4009
+ "if": {
4010
+ "exists": "div[class^=\"cookies-banner-module_small-cookie-banner_\"]"
4011
+ },
4012
+ "then": [
4013
+ {
4014
+ "eval": "EVAL_TAKEALOT_0"
4015
+ }
4016
+ ],
4017
+ "else": []
3942
4018
  }
3943
4019
  ]
3944
4020
  },
@@ -5229,6 +5305,33 @@
5229
5305
  "eval": "EVAL_YOUTUBE_MOBILE_0"
5230
5306
  }
5231
5307
  ]
5308
+ },
5309
+ {
5310
+ "name": "zdf",
5311
+ "prehideSelectors": [
5312
+ "#zdf-cmp-banner-sdk"
5313
+ ],
5314
+ "detectCmp": [
5315
+ {
5316
+ "exists": "#zdf-cmp-banner-sdk"
5317
+ }
5318
+ ],
5319
+ "detectPopup": [
5320
+ {
5321
+ "visible": "#zdf-cmp-main.zdf-cmp-show"
5322
+ }
5323
+ ],
5324
+ "optIn": [
5325
+ {
5326
+ "waitForThenClick": "#zdf-cmp-main #zdf-cmp-accept-btn"
5327
+ }
5328
+ ],
5329
+ "optOut": [
5330
+ {
5331
+ "waitForThenClick": "#zdf-cmp-main #zdf-cmp-deny-btn"
5332
+ }
5333
+ ],
5334
+ "test": []
5232
5335
  }
5233
5336
  ],
5234
5337
  "consentomatic": {
@@ -646,6 +646,7 @@
646
646
  EVAL_BORLABS_0: () => !JSON.parse(decodeURIComponent(document.cookie.split(";").find((c) => c.indexOf("borlabs-cookie") !== -1).split("=", 2)[1])).consents.statistics,
647
647
  EVAL_BUNDESREGIERUNG_DE_0: () => document.cookie.match("cookie-allow-tracking=0"),
648
648
  EVAL_CANVA_0: () => !document.cookie.includes("gtm_fpc_engagement_event"),
649
+ EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
649
650
  EVAL_CLICKIO_0: () => document.cookie.includes("__lxG__consent__v2_daisybit="),
650
651
  EVAL_CLINCH_0: () => document.cookie.includes("ctc_rejected=1"),
651
652
  EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
@@ -698,6 +699,7 @@
698
699
  EVAL_SIRDATA_0: () => document.cookie.includes("euconsent-v2"),
699
700
  EVAL_SNIGEL_0: () => !!document.cookie.match("snconsent"),
700
701
  EVAL_STEAMPOWERED_0: () => JSON.parse(decodeURIComponent(document.cookie.split(";").find((s) => s.trim().startsWith("cookieSettings")).split("=")[1])).preference_state === 2,
702
+ EVAL_TAKEALOT_0: () => document.body.classList.remove("freeze") || (document.body.style = "") || true,
701
703
  EVAL_TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true,
702
704
  EVAL_TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true,
703
705
  EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes("false"),
@@ -1474,6 +1476,9 @@
1474
1476
  return elementVisible("#onetrust-banner-sdk", "all");
1475
1477
  }
1476
1478
  async optOut() {
1479
+ if (elementVisible("#onetrust-reject-all-handler,.js-reject-cookies", "any")) {
1480
+ return click("#onetrust-reject-all-handler,.js-reject-cookies");
1481
+ }
1477
1482
  if (elementExists("#onetrust-pc-btn-handler")) {
1478
1483
  click("#onetrust-pc-btn-handler");
1479
1484
  } else {
@@ -1485,18 +1490,18 @@
1485
1490
  await wait(1e3);
1486
1491
  await waitForElement(".save-preference-btn-handler,.js-consent-save", 2e3);
1487
1492
  click(".save-preference-btn-handler,.js-consent-save");
1488
- await waitFor(
1489
- () => elementVisible("#onetrust-banner-sdk", "none"),
1490
- 10,
1491
- 500
1492
- );
1493
+ await waitForVisible("#onetrust-banner-sdk", 5e3, "none");
1493
1494
  return true;
1494
1495
  }
1495
1496
  async optIn() {
1496
1497
  return click("#onetrust-accept-btn-handler,.js-accept-cookies");
1497
1498
  }
1498
1499
  async test() {
1499
- return await this.mainWorldEval("EVAL_ONETRUST_1");
1500
+ return await waitFor(
1501
+ () => this.mainWorldEval("EVAL_ONETRUST_1"),
1502
+ 10,
1503
+ 500
1504
+ );
1500
1505
  }
1501
1506
  };
1502
1507
 
@@ -1920,6 +1925,9 @@
1920
1925
  return false;
1921
1926
  }
1922
1927
  this.updateState({ lifecycle: "openPopupDetected" });
1928
+ if (this.config.enablePrehide && !this.state.prehideOn) {
1929
+ this.prehideElements();
1930
+ }
1923
1931
  if (foundPopups.length > 1) {
1924
1932
  const errorDetails = {
1925
1933
  msg: `Found multiple CMPs, check the detection rules.`,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2023.9.14",
4
+ "version": "2023.11.14",
5
5
  "background": {
6
6
  "service_worker": "background.bundle.js"
7
7
  },
@@ -777,6 +777,71 @@
777
777
  }
778
778
  ]
779
779
  },
780
+ {
781
+ "name": "cc-banner-springer",
782
+ "prehideSelectors": [
783
+ ".cc-banner[data-cc-banner]"
784
+ ],
785
+ "detectCmp": [
786
+ {
787
+ "exists": ".cc-banner[data-cc-banner]"
788
+ }
789
+ ],
790
+ "detectPopup": [
791
+ {
792
+ "visible": ".cc-banner[data-cc-banner]"
793
+ }
794
+ ],
795
+ "optIn": [
796
+ {
797
+ "waitForThenClick": ".cc-banner[data-cc-banner] button[data-cc-action=accept]"
798
+ }
799
+ ],
800
+ "optOut": [
801
+ {
802
+ "if": {
803
+ "exists": ".cc-banner[data-cc-banner] button[data-cc-action=reject]"
804
+ },
805
+ "then": [
806
+ {
807
+ "click": ".cc-banner[data-cc-banner] button[data-cc-action=reject]"
808
+ }
809
+ ],
810
+ "else": [
811
+ {
812
+ "waitForThenClick": ".cc-banner[data-cc-banner] button[data-cc-action=preferences]"
813
+ },
814
+ {
815
+ "waitFor": ".cc-preferences[data-cc-preferences]"
816
+ },
817
+ {
818
+ "click": ".cc-preferences[data-cc-preferences] input[type=radio][data-cc-action=toggle-category][value=off]",
819
+ "all": true
820
+ },
821
+ {
822
+ "if": {
823
+ "exists": ".cc-preferences[data-cc-preferences] button[data-cc-action=reject]"
824
+ },
825
+ "then": [
826
+ {
827
+ "click": ".cc-preferences[data-cc-preferences] button[data-cc-action=reject]"
828
+ }
829
+ ],
830
+ "else": [
831
+ {
832
+ "click": ".cc-preferences[data-cc-preferences] button[data-cc-action=save]"
833
+ }
834
+ ]
835
+ }
836
+ ]
837
+ }
838
+ ],
839
+ "test": [
840
+ {
841
+ "eval": "EVAL_CC_BANNER2_0"
842
+ }
843
+ ]
844
+ },
780
845
  {
781
846
  "name": "cc_banner",
782
847
  "cosmetic": true,
@@ -3917,7 +3982,7 @@
3917
3982
  "name": "takealot.com",
3918
3983
  "cosmetic": true,
3919
3984
  "prehideSelectors": [
3920
- "div[class^=\"cookies-banner-module_cookie-banner_\"]"
3985
+ "div[class^=\"cookies-banner-module_\"]"
3921
3986
  ],
3922
3987
  "detectCmp": [
3923
3988
  {
@@ -3937,8 +4002,19 @@
3937
4002
  "optOut": [
3938
4003
  {
3939
4004
  "hide": [
3940
- "div[class^=\"cookies-banner-module_cookie-banner_\"]"
4005
+ "div[class^=\"cookies-banner-module_\"]"
3941
4006
  ]
4007
+ },
4008
+ {
4009
+ "if": {
4010
+ "exists": "div[class^=\"cookies-banner-module_small-cookie-banner_\"]"
4011
+ },
4012
+ "then": [
4013
+ {
4014
+ "eval": "EVAL_TAKEALOT_0"
4015
+ }
4016
+ ],
4017
+ "else": []
3942
4018
  }
3943
4019
  ]
3944
4020
  },
@@ -5229,6 +5305,33 @@
5229
5305
  "eval": "EVAL_YOUTUBE_MOBILE_0"
5230
5306
  }
5231
5307
  ]
5308
+ },
5309
+ {
5310
+ "name": "zdf",
5311
+ "prehideSelectors": [
5312
+ "#zdf-cmp-banner-sdk"
5313
+ ],
5314
+ "detectCmp": [
5315
+ {
5316
+ "exists": "#zdf-cmp-banner-sdk"
5317
+ }
5318
+ ],
5319
+ "detectPopup": [
5320
+ {
5321
+ "visible": "#zdf-cmp-main.zdf-cmp-show"
5322
+ }
5323
+ ],
5324
+ "optIn": [
5325
+ {
5326
+ "waitForThenClick": "#zdf-cmp-main #zdf-cmp-accept-btn"
5327
+ }
5328
+ ],
5329
+ "optOut": [
5330
+ {
5331
+ "waitForThenClick": "#zdf-cmp-main #zdf-cmp-deny-btn"
5332
+ }
5333
+ ],
5334
+ "test": []
5232
5335
  }
5233
5336
  ],
5234
5337
  "consentomatic": {
@@ -669,6 +669,7 @@ var snippets = {
669
669
  EVAL_BORLABS_0: () => !JSON.parse(decodeURIComponent(document.cookie.split(";").find((c) => c.indexOf("borlabs-cookie") !== -1).split("=", 2)[1])).consents.statistics,
670
670
  EVAL_BUNDESREGIERUNG_DE_0: () => document.cookie.match("cookie-allow-tracking=0"),
671
671
  EVAL_CANVA_0: () => !document.cookie.includes("gtm_fpc_engagement_event"),
672
+ EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
672
673
  EVAL_CLICKIO_0: () => document.cookie.includes("__lxG__consent__v2_daisybit="),
673
674
  EVAL_CLINCH_0: () => document.cookie.includes("ctc_rejected=1"),
674
675
  EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
@@ -721,6 +722,7 @@ var snippets = {
721
722
  EVAL_SIRDATA_0: () => document.cookie.includes("euconsent-v2"),
722
723
  EVAL_SNIGEL_0: () => !!document.cookie.match("snconsent"),
723
724
  EVAL_STEAMPOWERED_0: () => JSON.parse(decodeURIComponent(document.cookie.split(";").find((s) => s.trim().startsWith("cookieSettings")).split("=")[1])).preference_state === 2,
725
+ EVAL_TAKEALOT_0: () => document.body.classList.remove("freeze") || (document.body.style = "") || true,
724
726
  EVAL_TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true,
725
727
  EVAL_TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true,
726
728
  EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes("false"),
@@ -1497,6 +1499,9 @@ var Onetrust = class extends AutoConsentCMPBase {
1497
1499
  return elementVisible("#onetrust-banner-sdk", "all");
1498
1500
  }
1499
1501
  async optOut() {
1502
+ if (elementVisible("#onetrust-reject-all-handler,.js-reject-cookies", "any")) {
1503
+ return click("#onetrust-reject-all-handler,.js-reject-cookies");
1504
+ }
1500
1505
  if (elementExists("#onetrust-pc-btn-handler")) {
1501
1506
  click("#onetrust-pc-btn-handler");
1502
1507
  } else {
@@ -1508,18 +1513,18 @@ var Onetrust = class extends AutoConsentCMPBase {
1508
1513
  await wait(1e3);
1509
1514
  await waitForElement(".save-preference-btn-handler,.js-consent-save", 2e3);
1510
1515
  click(".save-preference-btn-handler,.js-consent-save");
1511
- await waitFor(
1512
- () => elementVisible("#onetrust-banner-sdk", "none"),
1513
- 10,
1514
- 500
1515
- );
1516
+ await waitForVisible("#onetrust-banner-sdk", 5e3, "none");
1516
1517
  return true;
1517
1518
  }
1518
1519
  async optIn() {
1519
1520
  return click("#onetrust-accept-btn-handler,.js-accept-cookies");
1520
1521
  }
1521
1522
  async test() {
1522
- return await this.mainWorldEval("EVAL_ONETRUST_1");
1523
+ return await waitFor(
1524
+ () => this.mainWorldEval("EVAL_ONETRUST_1"),
1525
+ 10,
1526
+ 500
1527
+ );
1523
1528
  }
1524
1529
  };
1525
1530
 
@@ -1943,6 +1948,9 @@ var AutoConsent = class {
1943
1948
  return false;
1944
1949
  }
1945
1950
  this.updateState({ lifecycle: "openPopupDetected" });
1951
+ if (this.config.enablePrehide && !this.state.prehideOn) {
1952
+ this.prehideElements();
1953
+ }
1946
1954
  if (foundPopups.length > 1) {
1947
1955
  const errorDetails = {
1948
1956
  msg: `Found multiple CMPs, check the detection rules.`,
@@ -644,6 +644,7 @@ var snippets = {
644
644
  EVAL_BORLABS_0: () => !JSON.parse(decodeURIComponent(document.cookie.split(";").find((c) => c.indexOf("borlabs-cookie") !== -1).split("=", 2)[1])).consents.statistics,
645
645
  EVAL_BUNDESREGIERUNG_DE_0: () => document.cookie.match("cookie-allow-tracking=0"),
646
646
  EVAL_CANVA_0: () => !document.cookie.includes("gtm_fpc_engagement_event"),
647
+ EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
647
648
  EVAL_CLICKIO_0: () => document.cookie.includes("__lxG__consent__v2_daisybit="),
648
649
  EVAL_CLINCH_0: () => document.cookie.includes("ctc_rejected=1"),
649
650
  EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
@@ -696,6 +697,7 @@ var snippets = {
696
697
  EVAL_SIRDATA_0: () => document.cookie.includes("euconsent-v2"),
697
698
  EVAL_SNIGEL_0: () => !!document.cookie.match("snconsent"),
698
699
  EVAL_STEAMPOWERED_0: () => JSON.parse(decodeURIComponent(document.cookie.split(";").find((s) => s.trim().startsWith("cookieSettings")).split("=")[1])).preference_state === 2,
700
+ EVAL_TAKEALOT_0: () => document.body.classList.remove("freeze") || (document.body.style = "") || true,
699
701
  EVAL_TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true,
700
702
  EVAL_TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true,
701
703
  EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes("false"),
@@ -1472,6 +1474,9 @@ var Onetrust = class extends AutoConsentCMPBase {
1472
1474
  return elementVisible("#onetrust-banner-sdk", "all");
1473
1475
  }
1474
1476
  async optOut() {
1477
+ if (elementVisible("#onetrust-reject-all-handler,.js-reject-cookies", "any")) {
1478
+ return click("#onetrust-reject-all-handler,.js-reject-cookies");
1479
+ }
1475
1480
  if (elementExists("#onetrust-pc-btn-handler")) {
1476
1481
  click("#onetrust-pc-btn-handler");
1477
1482
  } else {
@@ -1483,18 +1488,18 @@ var Onetrust = class extends AutoConsentCMPBase {
1483
1488
  await wait(1e3);
1484
1489
  await waitForElement(".save-preference-btn-handler,.js-consent-save", 2e3);
1485
1490
  click(".save-preference-btn-handler,.js-consent-save");
1486
- await waitFor(
1487
- () => elementVisible("#onetrust-banner-sdk", "none"),
1488
- 10,
1489
- 500
1490
- );
1491
+ await waitForVisible("#onetrust-banner-sdk", 5e3, "none");
1491
1492
  return true;
1492
1493
  }
1493
1494
  async optIn() {
1494
1495
  return click("#onetrust-accept-btn-handler,.js-accept-cookies");
1495
1496
  }
1496
1497
  async test() {
1497
- return await this.mainWorldEval("EVAL_ONETRUST_1");
1498
+ return await waitFor(
1499
+ () => this.mainWorldEval("EVAL_ONETRUST_1"),
1500
+ 10,
1501
+ 500
1502
+ );
1498
1503
  }
1499
1504
  };
1500
1505
 
@@ -1918,6 +1923,9 @@ var AutoConsent = class {
1918
1923
  return false;
1919
1924
  }
1920
1925
  this.updateState({ lifecycle: "openPopupDetected" });
1926
+ if (this.config.enablePrehide && !this.state.prehideOn) {
1927
+ this.prehideElements();
1928
+ }
1921
1929
  if (foundPopups.length > 1) {
1922
1930
  const errorDetails = {
1923
1931
  msg: `Found multiple CMPs, check the detection rules.`,