@duckduckgo/autoconsent 3.0.4 → 4.0.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.
- package/.eslintrc +21 -0
- package/.github/dependabot.yml +6 -0
- package/.github/workflows/checks.yml +19 -0
- package/.prettierrc +4 -0
- package/CHANGELOG.md +38 -0
- package/Jenkinsfile +2 -2
- package/dist/addon-firefox/content.bundle.js +1 -1
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +49 -4
- package/dist/addon-mv3/content.bundle.js +1 -1
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +49 -4
- package/dist/autoconsent.cjs.js +1 -1
- package/dist/autoconsent.esm.js +1 -1
- package/dist/autoconsent.playwright.js +1 -1
- package/lib/cmps/sourcepoint-frame.ts +31 -7
- package/lib/consentomatic/index.ts +12 -12
- package/lib/consentomatic/tools.ts +13 -13
- package/lib/rule-executors.ts +8 -3
- package/package.json +10 -8
- package/rules/autoconsent/affinity-serif-com.json +1 -4
- package/rules/autoconsent/cookiealert.json +48 -0
- package/rules/rules.json +49 -4
- package/tests/192.spec.ts +3 -3
- package/tests/adroll.spec.ts +7 -7
- package/tests/affinity-serif-com.spec.ts +1 -1
- package/tests/airbnb.spec.ts +3 -3
- package/tests/amazon.spec.ts +8 -8
- package/tests/arzt-auskunft.spec.ts +3 -3
- package/tests/ausopen.spec.ts +2 -2
- package/tests/aws.amazon.spec.ts +3 -3
- package/tests/axeptio.spec.ts +3 -3
- package/tests/baden-wuerttemberg.spec.ts +3 -3
- package/tests/borlabs.spec.ts +4 -4
- package/tests/bundesregierung.spec.ts +6 -6
- package/tests/ccbanner.spec.ts +4 -4
- package/tests/clickio.spec.ts +5 -5
- package/tests/complianz-banner.spec.ts +2 -2
- package/tests/complianz-categories.spec.ts +5 -5
- package/tests/complianz-notice.spec.ts +3 -3
- package/tests/complianz-optin.spec.ts +1 -1
- package/tests/consentmanager.spec.ts +8 -8
- package/tests/conversant.spec.ts +5 -5
- package/tests/cookie-notice.spec.ts +2 -2
- package/tests/cookiealert.spec.ts +9 -0
- package/tests/cookiebot.spec.ts +9 -9
- package/tests/cookieinformation.spec.ts +5 -5
- package/tests/cookielawinfo.spec.ts +3 -3
- package/tests/corona-in-zahlen.spec.ts +3 -3
- package/tests/dailymotion.spec.ts +5 -5
- package/tests/deepl.spec.ts +3 -3
- package/tests/didomi.spec.ts +8 -8
- package/tests/dmgmedia.spec.ts +7 -7
- package/tests/drupal.spec.ts +3 -3
- package/tests/dunelm.spec.ts +3 -3
- package/tests/etsy.spec.ts +2 -2
- package/tests/eu-cookie-compliance-banner.spec.ts +2 -2
- package/tests/eu-cookie-law.spec.ts +2 -2
- package/tests/evidon.spec.ts +3 -3
- package/tests/ezoic.spec.ts +3 -3
- package/tests/facebook.spec.ts +5 -5
- package/tests/fundingchoices.spec.ts +6 -6
- package/tests/google.spec.ts +2 -2
- package/tests/gov-uk.spec.ts +4 -4
- package/tests/hl-co-uk.spec.ts +3 -3
- package/tests/hubspot.spec.ts +2 -2
- package/tests/ionos.spec.ts +3 -3
- package/tests/iubenda.spec.ts +3 -3
- package/tests/johnlewis.spec.ts +3 -3
- package/tests/jquery-cookiebar.spec.ts +2 -2
- package/tests/klaro.spec.ts +5 -5
- package/tests/linkedin.spec.ts +2 -2
- package/tests/marksandspencer.spec.ts +2 -2
- package/tests/mediamarkt.spec.ts +3 -3
- package/tests/mediavine.spec.ts +3 -3
- package/tests/metoffice-gov-uk.spec.ts +3 -3
- package/tests/microsoft.spec.ts +4 -4
- package/tests/moneysavingexpert.spec.ts +3 -3
- package/tests/monzo-com.spec.ts +1 -1
- package/tests/moove.spec.ts +6 -6
- package/tests/motor-talk.spec.ts +3 -3
- package/tests/national-lottery.spec.ts +3 -3
- package/tests/netflix.spec.ts +3 -3
- package/tests/nhs.spec.ts +3 -3
- package/tests/notice-cookie.spec.ts +2 -2
- package/tests/obi.spec.ts +3 -3
- package/tests/oil.spec.ts +6 -6
- package/tests/onetrust.spec.ts +24 -24
- package/tests/osano.spec.ts +1 -1
- package/tests/otto.spec.ts +3 -3
- package/tests/paypal.spec.ts +4 -4
- package/tests/primebox.spec.ts +2 -2
- package/tests/privacymanager.spec.ts +3 -3
- package/tests/pubtech.spec.ts +9 -9
- package/tests/quantcast.spec.ts +10 -10
- package/tests/reddit.spec.ts +3 -3
- package/tests/sibbo.spec.ts +10 -10
- package/tests/sirdata.spec.ts +3 -3
- package/tests/snigel.spec.ts +3 -3
- package/tests/sourcepoint.spec.ts +17 -17
- package/tests/springer.spec.ts +6 -6
- package/tests/steampowered.spec.ts +3 -3
- package/tests/tarteaucitron.spec.ts +4 -4
- package/tests/tealium.spec.ts +2 -2
- package/tests/termly.spec.ts +4 -4
- package/tests/testcmp.spec.ts +1 -1
- package/tests/thalia.spec.ts +3 -3
- package/tests/thefreedictionary.spec.ts +3 -3
- package/tests/tiktok.spec.ts +5 -5
- package/tests/trustarc.spec.ts +15 -15
- package/tests/twitter.spec.ts +7 -7
- package/tests/uk-cookie-consent.spec.ts +3 -3
- package/tests/uniconsent.spec.ts +4 -4
- package/tests/usercentrics-api.spec.ts +5 -5
- package/tests/usercentrics-button.spec.ts +3 -3
- package/tests/uswitch.spec.ts +3 -3
- package/tests/vodafone.spec.ts +3 -3
- package/tests/waitrose.spec.ts +3 -3
- package/tests/wetransfer.spec.ts +3 -3
- package/tests/wordpressgdpr.spec.ts +3 -3
- package/tests/wp-cookie-notice.spec.ts +3 -3
- package/tests/xing.spec.ts +4 -4
- package/tests/youtube-desktop.spec.ts +2 -4
- package/tests/youtube-mobile.spec.ts +3 -3
- package/.eslintrc.cjs +0 -14
package/.eslintrc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2021": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"eslint:recommended",
|
|
8
|
+
"plugin:@typescript-eslint/recommended",
|
|
9
|
+
"plugin:json/recommended"
|
|
10
|
+
],
|
|
11
|
+
"overrides": [],
|
|
12
|
+
"parser": "@typescript-eslint/parser",
|
|
13
|
+
"parserOptions": {
|
|
14
|
+
"ecmaVersion": "latest",
|
|
15
|
+
"sourceType": "module"
|
|
16
|
+
},
|
|
17
|
+
"rules": {
|
|
18
|
+
"@typescript-eslint/no-explicit-any": 0,
|
|
19
|
+
"indent": ["error", 2, { "SwitchCase": 1 }],
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Validate
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
lint:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v3
|
|
10
|
+
|
|
11
|
+
- name: Use Node.js 16.x
|
|
12
|
+
uses: actions/setup-node@v3
|
|
13
|
+
with:
|
|
14
|
+
node-version: 16.x
|
|
15
|
+
cache: 'npm'
|
|
16
|
+
|
|
17
|
+
- run: npm ci
|
|
18
|
+
|
|
19
|
+
- run: npm run lint
|
package/.prettierrc
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
# v4.0.0 (Wed Dec 14 2022)
|
|
2
|
+
|
|
3
|
+
#### 💥 Breaking Change
|
|
4
|
+
|
|
5
|
+
- Bump @rollup/plugin-json from 4.1.0 to 5.0.2 [#61](https://github.com/duckduckgo/autoconsent/pull/61) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
6
|
+
- Bump @rollup/plugin-typescript from 8.3.2 to 10.0.1 [#58](https://github.com/duckduckgo/autoconsent/pull/58) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
7
|
+
|
|
8
|
+
#### 🚀 Enhancement
|
|
9
|
+
|
|
10
|
+
- Bump @typescript-eslint/parser from 5.42.1 to 5.45.1 [#60](https://github.com/duckduckgo/autoconsent/pull/60) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
11
|
+
- Bump @typescript-eslint/eslint-plugin from 5.42.1 to 5.45.1 [#59](https://github.com/duckduckgo/autoconsent/pull/59) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
12
|
+
- Add cookiealert CMP (cookiebot variant) [#47](https://github.com/duckduckgo/autoconsent/pull/47) ([@sammacbeth](https://github.com/sammacbeth))
|
|
13
|
+
|
|
14
|
+
#### 🐛 Bug Fix
|
|
15
|
+
|
|
16
|
+
- Bump @typescript-eslint/parser from 5.45.1 to 5.46.1 [#65](https://github.com/duckduckgo/autoconsent/pull/65) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
17
|
+
- Bump @types/chrome from 0.0.188 to 0.0.204 [#63](https://github.com/duckduckgo/autoconsent/pull/63) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
18
|
+
- Fix Sourcepoint CCPA popup handling [#57](https://github.com/duckduckgo/autoconsent/pull/57) ([@muodov](https://github.com/muodov))
|
|
19
|
+
- Fix typescript warnings [#56](https://github.com/duckduckgo/autoconsent/pull/56) ([@sammacbeth](https://github.com/sammacbeth))
|
|
20
|
+
- Bump tslib from 2.4.0 to 2.4.1 [#52](https://github.com/duckduckgo/autoconsent/pull/52) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
21
|
+
- Bump chai from 4.3.6 to 4.3.7 [#51](https://github.com/duckduckgo/autoconsent/pull/51) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
22
|
+
- Lint all code and rules in CI [#44](https://github.com/duckduckgo/autoconsent/pull/44) ([@sammacbeth](https://github.com/sammacbeth))
|
|
23
|
+
- Reduce triggering of affinity.serif.com rule [#45](https://github.com/duckduckgo/autoconsent/pull/45) ([@sammacbeth](https://github.com/sammacbeth))
|
|
24
|
+
|
|
25
|
+
#### 🔩 Dependency Updates
|
|
26
|
+
|
|
27
|
+
- Bump eslint from 8.28.0 to 8.29.0 [#62](https://github.com/duckduckgo/autoconsent/pull/62) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
28
|
+
- Bump mocha and @types/mocha [#53](https://github.com/duckduckgo/autoconsent/pull/53) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
29
|
+
- Bump web-ext from 7.3.0 to 7.4.0 [#54](https://github.com/duckduckgo/autoconsent/pull/54) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
30
|
+
|
|
31
|
+
#### Authors: 3
|
|
32
|
+
|
|
33
|
+
- [@dependabot[bot]](https://github.com/dependabot[bot])
|
|
34
|
+
- Maxim Tsoy ([@muodov](https://github.com/muodov))
|
|
35
|
+
- Sam Macbeth ([@sammacbeth](https://github.com/sammacbeth))
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
1
39
|
# v3.0.4 (Mon Nov 21 2022)
|
|
2
40
|
|
|
3
41
|
#### 🐛 Bug Fix
|
package/Jenkinsfile
CHANGED
|
@@ -31,7 +31,7 @@ pipeline {
|
|
|
31
31
|
string(name: 'GREP', defaultValue: '', description: 'filter for tests matching a specific string')
|
|
32
32
|
}
|
|
33
33
|
environment {
|
|
34
|
-
NODENV_VERSION = "
|
|
34
|
+
NODENV_VERSION = "16.16.0"
|
|
35
35
|
NODENV_ROOT = "/opt/nodeenv"
|
|
36
36
|
PATH = "/opt/nodenv/shims:/opt/nodenv/bin:$PATH"
|
|
37
37
|
}
|
|
@@ -46,7 +46,7 @@ pipeline {
|
|
|
46
46
|
steps {
|
|
47
47
|
sh '''
|
|
48
48
|
npm ci
|
|
49
|
-
npx playwright install
|
|
49
|
+
npx playwright install
|
|
50
50
|
'''
|
|
51
51
|
script {
|
|
52
52
|
currentBuild.description = "${params.BROWSER} - ${params.GREP}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";class e{constructor(e,t=1e3){this.id=e,this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),this.timer=window.setTimeout((()=>{this.reject(new Error("timeout"))}),t)}}const t={pending:new Map,sendContentMessage:null};function n(e="autoconsent-css-rules"){const t=`style#${e}`,n=document.querySelector(t);if(n&&n instanceof HTMLStyleElement)return n;{const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("style");return n.id=e,t.appendChild(n),n}}function o(e,t,n="display"){const o="opacity"===n?"opacity: 0":"display: none",i=`${t.join(",")} { ${o} !important; z-index: -1 !important; pointer-events: none !important; } `;return e instanceof HTMLStyleElement&&(e.innerText+=i,t.length>0)}async function i(e,t,n){const o=await e();return!o&&t>0?new Promise((o=>{setTimeout((async()=>{o(i(e,t-1,n))}),n)})):Promise.resolve(o)}function s(e){if(!e)return!1;if(null!==e.offsetParent)return!0;{const t=window.getComputedStyle(e);if("fixed"===t.position&&"none"!==t.display)return!0}return!1}function r(n){return function(n){let o;o=crypto&&void 0!==crypto.randomUUID?crypto.randomUUID():Math.random().toString(),t.sendContentMessage({type:"eval",id:o,code:n});const i=new e(o);return t.pending.set(i.id,i),i.promise}(n).catch((e=>!1))}function a(e,t=!1){const n=document.querySelectorAll(e);return n.length>0&&(t?n.forEach((e=>e.click())):n[0].click()),n.length>0}function c(e){return null!==document.querySelector(e)}function u(e,t){const n=document.querySelectorAll(e),o=new Array(n.length);return n.forEach(((e,t)=>{o[t]=s(e)})),"none"===t?o.every((e=>!e)):0!==o.length&&("any"===t?o.some((e=>e)):o.every((e=>e)))}function l(e,t=1e4){return i((()=>null!==document.querySelector(e)),Math.ceil(t/200),200)}async function d(e,t=1e4,n=!1){return await l(e,t),a(e,n)}function p(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}function h(){const e=n("autoconsent-prehide");return e&&e.remove(),!!e}const m={main:!0,frame:!1,urlPattern:""};class f{constructor(e){this.runContext=m,this.name=e}get hasSelfTest(){throw new Error("Not Implemented")}get isIntermediate(){throw new Error("Not Implemented")}checkRunContext(){const e={...m,...this.runContext},t=window.top===window;return!(t&&!e.main)&&(!(!t&&!e.frame)&&!(e.urlPattern&&!window.location.href.match(e.urlPattern)))}detectCmp(){throw new Error("Not Implemented")}async detectPopup(){return!1}optOut(){throw new Error("Not Implemented")}optIn(){throw new Error("Not Implemented")}openCmp(){throw new Error("Not Implemented")}async test(){return Promise.resolve(!0)}}async function y(e){const t=[];if(e.exists&&t.push(c(e.exists)),e.visible&&t.push(u(e.visible,e.check)),e.eval){const n=r(e.eval);t.push(n)}var s,h;if(e.waitFor&&t.push(l(e.waitFor,e.timeout)),e.waitForVisible&&t.push(function(e,t=1e4,n="any"){return i((()=>u(e,n)),Math.ceil(t/200),200)}(e.waitForVisible,e.timeout,e.check)),e.click&&t.push(a(e.click,e.all)),e.waitForThenClick&&t.push(d(e.waitForThenClick,e.timeout,e.all)),e.wait&&t.push(p(e.wait)),e.hide&&t.push((s=e.hide,h=e.method,o(n(),s,h))),e.if){if(!e.if.exists&&!e.if.visible)return console.error("invalid conditional rule",e.if),!1;await y(e.if)?t.push(w(e.then)):e.else&&t.push(w(e.else))}if(0===t.length)return!1;return(await Promise.all(t)).reduce(((e,t)=>e&&t),!0)}async function w(e){for(const t of e){if(!await y(t)&&!t.optional)return!1}return!0}class g extends f{constructor(e){super(e.name),this.config=e,this.runContext=e.runContext||m}get hasSelfTest(){return!!this.config.test}get isIntermediate(){return!!this.config.intermediate}get prehideSelectors(){return this.config.prehideSelectors}async detectCmp(){return!!this.config.detectCmp&&async function(e){const t=e.map((e=>y(e)));return(await Promise.all(t)).every((e=>!!e))}(this.config.detectCmp)}async detectPopup(){return!!this.config.detectPopup&&w(this.config.detectPopup)}async optOut(){return!!this.config.optOut&&w(this.config.optOut)}async optIn(){return!!this.config.optIn&&w(this.config.optIn)}async openCmp(){return!!this.config.openCmp&&w(this.config.openCmp)}async test(){return this.hasSelfTest?w(this.config.test):super.test()}}const b="#truste-show-consent",C="#truste-consent-track";const k=[new class extends f{constructor(){super("TrustArc-top"),this.prehideSelectors=[".trustarc-banner-container",`.truste_popframe,.truste_overlay,.truste_box_overlay,${C}`],this.runContext={main:!0,frame:!1},this._shortcutButton=null,this._optInDone=!1}get hasSelfTest(){return!1}get isIntermediate(){return!this._optInDone&&!this._shortcutButton}async detectCmp(){const e=c(`#truste-show-consent,${C}`);return e&&(this._shortcutButton=document.querySelector("#truste-consent-required")),e}async detectPopup(){return u(`#truste-consent-content,#trustarc-banner-overlay,${C}`,"all")}openFrame(){a(b)}async optOut(){return this._shortcutButton?(this._shortcutButton.click(),!0):(o(n(),[".truste_popframe",".truste_overlay",".truste_box_overlay",C]),a(b),setTimeout((()=>{n().remove()}),1e4),!0)}async optIn(){return this._optInDone=!0,a("#truste-consent-button")}async openCmp(){return!0}async test(){return!0}},new class extends f{constructor(){super("TrustArc-frame"),this.runContext={main:!1,frame:!0,urlPattern:"^https://consent-pref\\.trustarc\\.com/\\?"}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return!0}async detectPopup(){return u("#defaultpreferencemanager","any")&&u(".mainContent","any")}async navigateToSettings(){return await i((async()=>c(".shp")||u(".advance","any")||c(".switch span:first-child")),10,500),c(".shp")&&a(".shp"),await l(".prefPanel",5e3),u(".advance","any")&&a(".advance"),await i((()=>u(".switch span:first-child","any")),5,1e3)}async optOut(){return await i((()=>"complete"===document.readyState),20,100),await l(".mainContent[aria-hidden=false]",5e3),!!a(".rejectAll")||(c(".prefPanel")&&await l('.prefPanel[style="visibility: visible;"]',3e3),a("#catDetails0")?(a(".submit"),!0):(a(".required")||(await this.navigateToSettings(),a(".switch span:nth-child(1):not(.active)",!0),a(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{a("#gwt-debug-close_id")}))),!0))}async optIn(){return a(".call")||(await this.navigateToSettings(),a(".switch span:nth-child(2)",!0),a(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{a("#gwt-debug-close_id")}))),!0}},new class extends f{constructor(){super("Cybotcookiebot"),this.prehideSelectors=["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("#CybotCookiebotDialogBodyLevelButtonPreferences")}async detectPopup(){return c("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner")}async optOut(){return a(".cookie-alert-extended-detail-link")?(await l(".cookie-alert-configuration",2e3),a(".cookie-alert-configuration-input:checked",!0),a(".cookie-alert-extended-button-secondary"),!0):c("#dtcookie-container")?a(".h-dtcookie-decline"):(a(".cookiebot__button--settings")||a("#CybotCookiebotDialogBodyButtonDecline")||(a(".cookiebanner__link--details"),a('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled',!0),a("#CybotCookiebotDialogBodyButtonDecline"),a("input[id^=CybotCookiebotDialogBodyLevelButton]:checked",!0),c("#CybotCookiebotDialogBodyButtonAcceptSelected")?a("#CybotCookiebotDialogBodyButtonAcceptSelected"):a("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection",!0),await r("window.CookieConsent.hasResponse !== true")&&(await r("window.Cookiebot.dialog.submitConsent()"),await p(500)),c("#cb-confirmedSettings")&&await r("endCookieProcess()")),!0)}async optIn(){return c("#dtcookie-container")?a(".h-dtcookie-accept"):(a(".CybotCookiebotDialogBodyLevelButton:not(:checked):enabled",!0),a("#CybotCookiebotDialogBodyLevelButtonAccept"),a("#CybotCookiebotDialogBodyButtonAccept"),!0)}async test(){return r("window.CookieConsent.declined === true")}},new class extends f{constructor(){super("Sourcepoint-frame"),this.prehideSelectors=["div[id^='sp_message_container_'],.message-overlay"],this.ccpaMode=!1,this.runContext={main:!1,frame:!0}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){const e=new URL(location.href);return e.searchParams.has("message_id")&&"ccpa-notice.sp-prod.net"===e.hostname?(this.ccpaMode=!0,!0):("/index.html"===e.pathname||"/privacy-manager/index.html"===e.pathname)&&(e.searchParams.has("message_id")||e.searchParams.has("requestUUID")||e.searchParams.has("consentUUID"))}async detectPopup(){return await l(".sp_choice_type_11,.sp_choice_type_12,.sp_choice_type_13,.sp_choice_type_ACCEPT_ALL",2e3),!c(".sp_choice_type_9")}async optIn(){return await l(".sp_choice_type_11,.sp_choice_type_ACCEPT_ALL",2e3),!!a(".sp_choice_type_11")||!!a(".sp_choice_type_ACCEPT_ALL")}isManagerOpen(){return"/privacy-manager/index.html"===new URL(location.href).pathname}async optOut(){if(!this.isManagerOpen()){if(!await l(".sp_choice_type_12,.sp_choice_type_13"))return!1;if(!c(".sp_choice_type_12"))return a(".sp_choice_type_13");a(".sp_choice_type_12"),await i((()=>"/privacy-manager/index.html"===location.pathname),200,100)}await l(".type-modal",2e4);try{const e=".sp_choice_type_REJECT_ALL",t=".reject-toggle",n=await Promise.race([l(e,2e3).then((e=>e?0:-1)),l(t,2e3).then((e=>e?1:-1)),l(".pm-features",2e3).then((e=>e?2:-1))]);if(0===n)return await p(1e3),a(e);1===n?a(t):2===n&&(await l(".pm-features",1e4),a(".checked > span",!0),a(".chevron"))}catch(e){}return a(".sp_choice_type_SAVE_AND_EXIT"),!0}},new class extends f{constructor(){super("consentmanager.net"),this.prehideSelectors=["#cmpbox,#cmpbox2"],this.apiAvailable=!1}get hasSelfTest(){return this.apiAvailable}get isIntermediate(){return!1}async detectCmp(){return this.apiAvailable=await r('window.__cmp && typeof __cmp("getCMPData") === "object"'),!!this.apiAvailable||c("#cmpbox")}async detectPopup(){return this.apiAvailable?(await p(500),await r("!__cmp('consentStatus').userChoiceExists")):u("#cmpbox .cmpmore","any")}async optOut(){return await p(500),this.apiAvailable?await r("__cmp('setConsent', 0)"):!!a(".cmpboxbtnno")||(c(".cmpwelcomeprpsbtn")?(a(".cmpwelcomeprpsbtn > a[aria-checked=true]",!0),a(".cmpboxbtnsave"),!0):(a(".cmpboxbtncustom"),await l(".cmptblbox",2e3),a(".cmptdchoice > a[aria-checked=true]",!0),a(".cmpboxbtnyescustomchoices"),!0))}async optIn(){return this.apiAvailable?await r("__cmp('setConsent', 1)"):a(".cmpboxbtnyes")}async test(){if(this.apiAvailable)return await r("__cmp('consentStatus').userChoiceExists")}},new class extends f{constructor(){super("Evidon")}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return c("#_evidon_banner")}async detectPopup(){return u("#_evidon_banner","any")}async optOut(){return a("#_evidon-decline-button")||(o(n(),["#evidon-prefdiag-overlay","#evidon-prefdiag-background"]),a("#_evidon-option-button"),await l("#evidon-prefdiag-overlay",5e3),a("#evidon-prefdiag-decline")),!0}async optIn(){return a("#_evidon-accept-button")}},new class extends f{constructor(){super("Onetrust"),this.prehideSelectors=["#onetrust-banner-sdk,#onetrust-consent-sdk,.onetrust-pc-dark-filter,.js-consent-banner"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("#onetrust-banner-sdk")}async detectPopup(){return u("#onetrust-banner-sdk","all")}async optOut(){return c("#onetrust-pc-btn-handler")?a("#onetrust-pc-btn-handler"):a(".ot-sdk-show-settings,button.js-cookie-settings"),await l("#onetrust-consent-sdk",2e3),await p(1e3),a("#onetrust-consent-sdk input.category-switch-handler:checked,.js-editor-toggle-state:checked",!0),await p(1e3),await l(".save-preference-btn-handler,.js-consent-save",2e3),a(".save-preference-btn-handler,.js-consent-save"),await i((()=>u("#onetrust-banner-sdk","none")),10,500),!0}async optIn(){return a("#onetrust-accept-btn-handler,.js-accept-cookies")}async test(){return await r("window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1")}},new class extends f{constructor(){super("Klaro"),this.prehideSelectors=[".klaro"],this.settingsOpen=!1}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".klaro > .cookie-modal")?(this.settingsOpen=!0,!0):c(".klaro > .cookie-notice")}async detectPopup(){return u(".klaro > .cookie-notice,.klaro > .cookie-modal","any")}async optOut(){return!!a(".klaro .cn-decline")||(this.settingsOpen||(a(".klaro .cn-learn-more"),await l(".klaro > .cookie-modal",2e3),this.settingsOpen=!0),!!a(".klaro .cn-decline")||(a(".cm-purpose:not(.cm-toggle-all) > input:not(.half-checked)",!0),a(".cm-btn-accept")))}async optIn(){return!!a(".klaro .cm-btn-accept-all")||(this.settingsOpen?(a(".cm-purpose:not(.cm-toggle-all) > input.half-checked",!0),a(".cm-btn-accept")):a(".klaro .cookie-notice .cm-btn-success"))}async test(){return await r("klaro.getManager().config.services.every(c => c.required || !klaro.getManager().consents[c.name])")}},new class extends f{constructor(){super("Uniconsent")}get prehideSelectors(){return[".unic",".modal:has(.unic)"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".unic .unic-box,.unic .unic-bar")}async detectPopup(){return u(".unic .unic-box,.unic .unic-bar","any")}async optOut(){if(await l(".unic button",1e3),document.querySelectorAll(".unic button").forEach((e=>{const t=e.textContent;(t.includes("Manage Options")||t.includes("Optionen verwalten"))&&e.click()})),await l(".unic input[type=checkbox]",1e3)){await l(".unic button",1e3),document.querySelectorAll(".unic input[type=checkbox]").forEach((e=>{e.checked&&e.click()}));for(const e of document.querySelectorAll(".unic button")){const t=e.textContent;for(const n of["Confirm Choices","Save Choices","Auswahl speichern"])if(t.includes(n))return e.click(),await p(500),!0}}return!1}async optIn(){return d(".unic #unic-agree")}async test(){await p(1e3);return!c(".unic .unic-box,.unic .unic-bar")}},new class extends f{constructor(){super("Conversant"),this.prehideSelectors=[".cmp-root"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".cmp-root .cmp-receptacle")}async detectPopup(){return u(".cmp-root .cmp-receptacle","any")}async optOut(){if(!await d(".cmp-main-button:not(.cmp-main-button--primary)"))return!1;if(!await l(".cmp-view-tab-tabs"))return!1;await d(".cmp-view-tab-tabs > :first-child"),await d(".cmp-view-tab-tabs > .cmp-view-tab--active:first-child");for(const e of Array.from(document.querySelectorAll(".cmp-accordion-item"))){e.querySelector(".cmp-accordion-item-title").click(),await i((()=>!!e.querySelector(".cmp-accordion-item-content.cmp-active")),10,50);const t=e.querySelector(".cmp-accordion-item-content.cmp-active");t.querySelectorAll(".cmp-toggle-actions .cmp-toggle-deny:not(.cmp-toggle-deny--active)").forEach((e=>e.click())),t.querySelectorAll(".cmp-toggle-actions .cmp-toggle-checkbox:not(.cmp-toggle-checkbox--active)").forEach((e=>e.click()))}return await a(".cmp-main-button:not(.cmp-main-button--primary)"),!0}async optIn(){return d(".cmp-main-button.cmp-main-button--primary")}async test(){return document.cookie.includes("cmp-data=0")}},new class extends f{constructor(){super("tiktok.com"),this.runContext={urlPattern:"tiktok"}}get hasSelfTest(){return!0}get isIntermediate(){return!1}getShadowRoot(){const e=document.querySelector("tiktok-cookie-banner");return e?e.shadowRoot:null}async detectCmp(){return c("tiktok-cookie-banner")}async detectPopup(){return s(this.getShadowRoot().querySelector(".tiktok-cookie-banner"))}async optOut(){const e=this.getShadowRoot().querySelector(".button-wrapper button:first-child");return!!e&&(e.click(),!0)}async optIn(){const e=this.getShadowRoot().querySelector(".button-wrapper button:last-child");return!!e&&(e.click(),!0)}async test(){const e=document.cookie.match(/cookie-consent=([^;]+)/);if(!e)return!1;const t=JSON.parse(decodeURIComponent(e[1]));return Object.values(t).every((e=>"boolean"!=typeof e||!1===e))}},new class extends f{constructor(){super("airbnb"),this.runContext={urlPattern:"^https://(www\\.)?airbnb\\.[^/]+/"},this.prehideSelectors=["div[data-testid=main-cookies-banner-container]",'div:has(> div:first-child):has(> div:last-child):has(> section [data-testid="strictly-necessary-cookies"])']}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("div[data-testid=main-cookies-banner-container]")}async detectPopup(){return u("div[data-testid=main-cookies-banner-container","any")}async optOut(){let e;for(await d("div[data-testid=main-cookies-banner-container] button._snbhip0");e=document.querySelector("[data-testid=modal-container] button[aria-checked=true]:not([disabled])");)e.click();return d("button[data-testid=save-btn]")}async optIn(){return d("div[data-testid=main-cookies-banner-container] button._148dgdpk")}async test(){return await i((()=>!!document.cookie.match("OptanonAlertBoxClosed")),20,200)}}];class v{static setBase(e){v.base=e}static findElement(e,t=null,n=!1){let o=null;return o=null!=t?Array.from(t.querySelectorAll(e.selector)):null!=v.base?Array.from(v.base.querySelectorAll(e.selector)):Array.from(document.querySelectorAll(e.selector)),null!=e.textFilter&&(o=o.filter((t=>{let n=t.textContent.toLowerCase();if(Array.isArray(e.textFilter)){let t=!1;for(let o of e.textFilter)if(-1!==n.indexOf(o.toLowerCase())){t=!0;break}return t}if(null!=e.textFilter)return-1!==n.indexOf(e.textFilter.toLowerCase())}))),null!=e.styleFilters&&(o=o.filter((t=>{let n=window.getComputedStyle(t),o=!0;for(let t of e.styleFilters){let e=n[t.option];o=t.negated?o&&e!==t.value:o&&e===t.value}return o}))),null!=e.displayFilter&&(o=o.filter((t=>e.displayFilter?0!==t.offsetHeight:0===t.offsetHeight))),null!=e.iframeFilter&&(o=o.filter((t=>e.iframeFilter?window.location!==window.parent.location:window.location===window.parent.location))),null!=e.childFilter&&(o=o.filter((t=>{let n=v.base;v.setBase(t);let o=v.find(e.childFilter);return v.setBase(n),null!=o.target}))),n?o:(o.length>1&&console.warn("Multiple possible targets: ",o,e,t),o[0])}static find(e,t=!1){let n=[];if(null!=e.parent){let o=v.findElement(e.parent,null,t);if(null!=o){if(o instanceof Array)return o.forEach((o=>{let i=v.findElement(e.target,o,t);i instanceof Array?i.forEach((e=>{n.push({parent:o,target:e})})):n.push({parent:o,target:i})})),n;{let i=v.findElement(e.target,o,t);i instanceof Array?i.forEach((e=>{n.push({parent:o,target:e})})):n.push({parent:o,target:i})}}}else{let o=v.findElement(e.target,null,t);o instanceof Array?o.forEach((e=>{n.push({parent:null,target:e})})):n.push({parent:null,target:o})}return 0===n.length&&n.push({parent:null,target:null}),t?n:(1!==n.length&&console.warn("Multiple results found, even though multiple false",n),n[0])}}function _(e){const t=v.find(e);return"css"===e.type?!!t.target:"checkbox"===e.type?!!t.target&&t.target.checked:void 0}async function S(e,t){switch(e.type){case"click":return async function(e){const t=v.find(e);null!=t.target&&t.target.click();return x(0)}(e);case"list":return async function(e,t){for(let n of e.actions)await S(n,t)}(e,t);case"consent":return async function(e,t){for(const n of e.consents){const e=-1!==t.indexOf(n.type);if(n.matcher&&n.toggleAction){_(n.matcher)!==e&&await S(n.toggleAction)}else e?await S(n.trueAction):await S(n.falseAction)}}(e,t);case"ifcss":return async function(e,t){v.find(e).target?e.falseAction&&await S(e.falseAction,t):e.trueAction&&await S(e.trueAction,t)}(e,t);case"waitcss":return async function(e){await new Promise((t=>{let n=e.retries||10;const o=e.waitTime||250,i=()=>{const s=v.find(e);(e.negated&&s.target||!e.negated&&!s.target)&&n>0?(n-=1,setTimeout(i,o)):t()};i()}))}(e);case"foreach":return async function(e,t){const n=v.find(e,!0),o=v.base;for(const o of n)o.target&&(v.setBase(o.target),await S(e.action,t));v.setBase(o)}(e,t);case"hide":return async function(e){const t=v.find(e);t.target&&t.target.classList.add("Autoconsent-Hidden")}(e);case"slide":return async function(e){const t=v.find(e),n=v.find(e.dragTarget);if(t.target){let e=t.target.getBoundingClientRect(),o=n.target.getBoundingClientRect(),i=o.top-e.top,s=o.left-e.left;"y"===this.config.axis.toLowerCase()&&(s=0),"x"===this.config.axis.toLowerCase()&&(i=0);let r=window.screenX+e.left+e.width/2,a=window.screenY+e.top+e.height/2,c=e.left+e.width/2,u=e.top+e.height/2,l=document.createEvent("MouseEvents");l.initMouseEvent("mousedown",!0,!0,window,0,r,a,c,u,!1,!1,!1,!1,0,t.target);let d=document.createEvent("MouseEvents");d.initMouseEvent("mousemove",!0,!0,window,0,r+s,a+i,c+s,u+i,!1,!1,!1,!1,0,t.target);let p=document.createEvent("MouseEvents");p.initMouseEvent("mouseup",!0,!0,window,0,r+s,a+i,c+s,u+i,!1,!1,!1,!1,0,t.target),t.target.dispatchEvent(l),await this.waitTimeout(10),t.target.dispatchEvent(d),await this.waitTimeout(10),t.target.dispatchEvent(p)}}(e);case"close":return async function(e){window.close()}();case"wait":return async function(e){await x(e.waitTime)}(e);case"eval":return async function(e){return console.log("eval!",e.code),new Promise((t=>{try{e.async?(window.eval(e.code),setTimeout((()=>{t(window.eval("window.__consentCheckResult"))}),e.timeout||250)):t(window.eval(e.code))}catch(n){console.warn("eval error",n,e.code),t(!1)}}))}(e);default:throw"Unknown action type: "+e.type}}v.base=null;function x(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class A{constructor(e,t){this.name=e,this.config=t,this.methods=new Map,this.runContext=m,t.methods.forEach((e=>{e.action&&this.methods.set(e.name,e.action)})),this.hasSelfTest=!1}get isIntermediate(){return!1}checkRunContext(){return!0}async detectCmp(){return this.config.detectors.map((e=>_(e.presentMatcher))).some((e=>!!e))}async detectPopup(){return this.config.detectors.map((e=>_(e.showingMatcher))).some((e=>!!e))}async executeAction(e,t){return!this.methods.has(e)||S(this.methods.get(e),t)}async optOut(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",[]),await this.executeAction("SAVE_CONSENT"),!0}async optIn(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",["D","A","B","E","F","X"]),await this.executeAction("SAVE_CONSENT"),!0}async openCmp(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),!0}async test(){return!0}}const P=new class{constructor(e,n=null,o=null){if(this.rules=[],this.foundCmp=null,t.sendContentMessage=e,this.sendContentMessage=e,this.rules=[...k],n)this.initialize(n,o);else{o&&this.parseRules(o);e({type:"init",url:window.location.href})}}initialize(e,t){if(this.config=e,e.enabled){if(t&&this.parseRules(t),e.disabledCmps?.length>0&&this.disableCMPs(e.disabledCmps),e.enablePrehide)if(document.documentElement)this.prehideElements();else{const e=()=>{window.removeEventListener("DOMContentLoaded",e),this.prehideElements()};window.addEventListener("DOMContentLoaded",e)}if("loading"===document.readyState){const e=()=>{window.removeEventListener("DOMContentLoaded",e),this.start()};window.addEventListener("DOMContentLoaded",e)}else this.start()}}parseRules(e){Object.keys(e.consentomatic).forEach((t=>{this.addConsentomaticCMP(t,e.consentomatic[t])})),e.autoconsent.forEach((e=>{this.addCMP(e)}))}addCMP(e){this.rules.push(function(e){return new g(e)}(e))}disableCMPs(e){this.rules=this.rules.filter((t=>!e.includes(t.name)))}addConsentomaticCMP(e,t){this.rules.push(new A(`com_${e}`,t))}start(){window.requestIdleCallback?window.requestIdleCallback((()=>this._start()),{timeout:500}):this._start()}async _start(){const e=await this.findCmp(this.config.detectRetries);if(e.length>0){const t=[];for(const n of e)this.sendContentMessage({type:"cmpDetected",url:location.href,cmp:n.name}),t.push(this.waitForPopup(n).then((e=>e?(this.foundCmp||(this.foundCmp=n),this.sendContentMessage({type:"popupFound",cmp:n.name,url:location.href}),!0):Promise.reject(`${n.name} popup not found`))));let n=!1;for(const e of t)try{await e,n=!0;break}catch(e){continue}return n?"optOut"===this.config.autoAction?await this.doOptOut():"optIn"!==this.config.autoAction||await this.doOptIn():(this.config.enablePrehide&&h(),!1)}return this.config.enablePrehide&&h(),!1}async findCmp(e){const t=[];for(const e of this.rules)try{if(!e.checkRunContext())continue;await e.detectCmp()&&t.push(e)}catch(e){}if(t.length>1){const e={msg:"Found multiple CMPs, check the detection rules.",cmps:t.map((e=>e.name))};this.sendContentMessage({type:"autoconsentError",details:e})}return 0===t.length&&e>0?new Promise((t=>{setTimeout((async()=>{const n=this.findCmp(e-1);t(n)}),500)})):t}async doOptOut(){let e;return e=!!this.foundCmp&&await this.foundCmp.optOut(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optOutResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,scheduleSelfTest:this.foundCmp&&this.foundCmp.hasSelfTest,url:location.href}),e&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),e}async doOptIn(){let e;return e=!!this.foundCmp&&await this.foundCmp.optIn(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optInResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,scheduleSelfTest:!1,url:location.href}),e&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),e}async doSelfTest(){let e;return e=!!this.foundCmp&&await this.foundCmp.test(),this.sendContentMessage({type:"selfTestResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,url:location.href}),e}async waitForPopup(e,t=5,n=500){const o=await e.detectPopup();return!o&&t>0?new Promise((o=>setTimeout((()=>o(this.waitForPopup(e,t-1,n))),n))):o}prehideElements(){return function(e){return o(n("autoconsent-prehide"),e,"opacity")}(this.rules.reduce(((e,t)=>t.prehideSelectors?[...e,...t.prehideSelectors]:e),["#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"]))}async receiveMessageCallback(e){switch(e.type){case"initResp":this.initialize(e.config,e.rules);break;case"optIn":await this.doOptIn();break;case"optOut":await this.doOptOut();break;case"selfTest":await this.doSelfTest();break;case"evalResp":!function(e,n){const o=t.pending.get(e);o?(t.pending.delete(e),o.timer&&window.clearTimeout(o.timer),o.resolve(n)):console.warn("no eval #",e)}(e.id,e.result)}}}(chrome.runtime.sendMessage);chrome.runtime.onMessage.addListener((e=>Promise.resolve(P.receiveMessageCallback(e))))}();
|
|
1
|
+
!function(){"use strict";class t{constructor(t,e=1e3){this.id=t,this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),this.timer=window.setTimeout((()=>{this.reject(new Error("timeout"))}),e)}}const e={pending:new Map,sendContentMessage:null};function n(t="autoconsent-css-rules"){const e=`style#${t}`,n=document.querySelector(e);if(n&&n instanceof HTMLStyleElement)return n;{const e=document.head||document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("style");return n.id=t,e.appendChild(n),n}}function o(t,e,n="display"){const o="opacity"===n?"opacity: 0":"display: none",i=`${e.join(",")} { ${o} !important; z-index: -1 !important; pointer-events: none !important; } `;return t instanceof HTMLStyleElement&&(t.innerText+=i,e.length>0)}async function i(t,e,n){const o=await t();return!o&&e>0?new Promise((o=>{setTimeout((async()=>{o(i(t,e-1,n))}),n)})):Promise.resolve(o)}function s(t){if(!t)return!1;if(null!==t.offsetParent)return!0;{const e=window.getComputedStyle(t);if("fixed"===e.position&&"none"!==e.display)return!0}return!1}function r(n){return function(n){let o;o=crypto&&void 0!==crypto.randomUUID?crypto.randomUUID():Math.random().toString(),e.sendContentMessage({type:"eval",id:o,code:n});const i=new t(o);return e.pending.set(i.id,i),i.promise}(n).catch((t=>!1))}function c(t,e=!1){let n=[];return n="string"==typeof t?Array.from(document.querySelectorAll(t)):t,n.length>0&&(e?n.forEach((t=>t.click())):n[0].click()),n.length>0}function a(t){return null!==document.querySelector(t)}function u(t,e){const n=document.querySelectorAll(t),o=new Array(n.length);return n.forEach(((t,e)=>{o[e]=s(t)})),"none"===e?o.every((t=>!t)):0!==o.length&&("any"===e?o.some((t=>t)):o.every((t=>t)))}function l(t,e=1e4){return i((()=>null!==document.querySelector(t)),Math.ceil(e/200),200)}async function p(t,e=1e4,n=!1){return await l(t,e),c(t,n)}function d(t){return new Promise((e=>{setTimeout((()=>{e(!0)}),t)}))}function h(){const t=n("autoconsent-prehide");return t&&t.remove(),!!t}const m={main:!0,frame:!1,urlPattern:""};class f{constructor(t){this.runContext=m,this.name=t}get hasSelfTest(){throw new Error("Not Implemented")}get isIntermediate(){throw new Error("Not Implemented")}checkRunContext(){const t={...m,...this.runContext},e=window.top===window;return!(e&&!t.main)&&(!(!e&&!t.frame)&&!(t.urlPattern&&!window.location.href.match(t.urlPattern)))}detectCmp(){throw new Error("Not Implemented")}async detectPopup(){return!1}optOut(){throw new Error("Not Implemented")}optIn(){throw new Error("Not Implemented")}openCmp(){throw new Error("Not Implemented")}async test(){return Promise.resolve(!0)}}async function y(t){const e=[];if(t.exists&&e.push(a(t.exists)),t.visible&&e.push(u(t.visible,t.check)),t.eval){const n=r(t.eval);e.push(n)}var s,h;if(t.waitFor&&e.push(l(t.waitFor,t.timeout)),t.waitForVisible&&e.push(function(t,e=1e4,n="any"){return i((()=>u(t,n)),Math.ceil(e/200),200)}(t.waitForVisible,t.timeout,t.check)),t.click&&e.push(c(t.click,t.all)),t.waitForThenClick&&e.push(p(t.waitForThenClick,t.timeout,t.all)),t.wait&&e.push(d(t.wait)),t.hide&&e.push((s=t.hide,h=t.method,o(n(),s,h))),t.if){if(!t.if.exists&&!t.if.visible)return console.error("invalid conditional rule",t.if),!1;await y(t.if)?e.push(w(t.then)):t.else&&e.push(w(t.else))}if(0===e.length)return!1;return(await Promise.all(e)).reduce(((t,e)=>t&&e),!0)}async function w(t){for(const e of t){if(!await y(e)&&!e.optional)return!1}return!0}class g extends f{constructor(t){super(t.name),this.config=t,this.runContext=t.runContext||m}get hasSelfTest(){return!!this.config.test}get isIntermediate(){return!!this.config.intermediate}get prehideSelectors(){return this.config.prehideSelectors}async detectCmp(){return!!this.config.detectCmp&&async function(t){const e=t.map((t=>y(t)));return(await Promise.all(e)).every((t=>!!t))}(this.config.detectCmp)}async detectPopup(){return!!this.config.detectPopup&&w(this.config.detectPopup)}async optOut(){return!!this.config.optOut&&w(this.config.optOut)}async optIn(){return!!this.config.optIn&&w(this.config.optIn)}async openCmp(){return!!this.config.openCmp&&w(this.config.openCmp)}async test(){return this.hasSelfTest?w(this.config.test):super.test()}}const b="#truste-show-consent",C="#truste-consent-track";const k=[new class extends f{constructor(){super("TrustArc-top"),this.prehideSelectors=[".trustarc-banner-container",`.truste_popframe,.truste_overlay,.truste_box_overlay,${C}`],this.runContext={main:!0,frame:!1},this._shortcutButton=null,this._optInDone=!1}get hasSelfTest(){return!1}get isIntermediate(){return!this._optInDone&&!this._shortcutButton}async detectCmp(){const t=a(`#truste-show-consent,${C}`);return t&&(this._shortcutButton=document.querySelector("#truste-consent-required")),t}async detectPopup(){return u(`#truste-consent-content,#trustarc-banner-overlay,${C}`,"all")}openFrame(){c(b)}async optOut(){return this._shortcutButton?(this._shortcutButton.click(),!0):(o(n(),[".truste_popframe",".truste_overlay",".truste_box_overlay",C]),c(b),setTimeout((()=>{n().remove()}),1e4),!0)}async optIn(){return this._optInDone=!0,c("#truste-consent-button")}async openCmp(){return!0}async test(){return!0}},new class extends f{constructor(){super("TrustArc-frame"),this.runContext={main:!1,frame:!0,urlPattern:"^https://consent-pref\\.trustarc\\.com/\\?"}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return!0}async detectPopup(){return u("#defaultpreferencemanager","any")&&u(".mainContent","any")}async navigateToSettings(){return await i((async()=>a(".shp")||u(".advance","any")||a(".switch span:first-child")),10,500),a(".shp")&&c(".shp"),await l(".prefPanel",5e3),u(".advance","any")&&c(".advance"),await i((()=>u(".switch span:first-child","any")),5,1e3)}async optOut(){return await i((()=>"complete"===document.readyState),20,100),await l(".mainContent[aria-hidden=false]",5e3),!!c(".rejectAll")||(a(".prefPanel")&&await l('.prefPanel[style="visibility: visible;"]',3e3),c("#catDetails0")?(c(".submit"),!0):(c(".required")||(await this.navigateToSettings(),c(".switch span:nth-child(1):not(.active)",!0),c(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{c("#gwt-debug-close_id")}))),!0))}async optIn(){return c(".call")||(await this.navigateToSettings(),c(".switch span:nth-child(2)",!0),c(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{c("#gwt-debug-close_id")}))),!0}},new class extends f{constructor(){super("Cybotcookiebot"),this.prehideSelectors=["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a("#CybotCookiebotDialogBodyLevelButtonPreferences")}async detectPopup(){return a("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner")}async optOut(){return c(".cookie-alert-extended-detail-link")?(await l(".cookie-alert-configuration",2e3),c(".cookie-alert-configuration-input:checked",!0),c(".cookie-alert-extended-button-secondary"),!0):a("#dtcookie-container")?c(".h-dtcookie-decline"):(c(".cookiebot__button--settings")||c("#CybotCookiebotDialogBodyButtonDecline")||(c(".cookiebanner__link--details"),c('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled',!0),c("#CybotCookiebotDialogBodyButtonDecline"),c("input[id^=CybotCookiebotDialogBodyLevelButton]:checked",!0),a("#CybotCookiebotDialogBodyButtonAcceptSelected")?c("#CybotCookiebotDialogBodyButtonAcceptSelected"):c("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection",!0),await r("window.CookieConsent.hasResponse !== true")&&(await r("window.Cookiebot.dialog.submitConsent()"),await d(500)),a("#cb-confirmedSettings")&&await r("endCookieProcess()")),!0)}async optIn(){return a("#dtcookie-container")?c(".h-dtcookie-accept"):(c(".CybotCookiebotDialogBodyLevelButton:not(:checked):enabled",!0),c("#CybotCookiebotDialogBodyLevelButtonAccept"),c("#CybotCookiebotDialogBodyButtonAccept"),!0)}async test(){return r("window.CookieConsent.declined === true")}},new class extends f{constructor(){super("Sourcepoint-frame"),this.prehideSelectors=["div[id^='sp_message_container_'],.message-overlay","#sp_privacy_manager_container"],this.ccpaNotice=!1,this.ccpaPopup=!1,this.runContext={main:!1,frame:!0}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){const t=new URL(location.href);return t.searchParams.has("message_id")&&"ccpa-notice.sp-prod.net"===t.hostname?(this.ccpaNotice=!0,!0):"ccpa-pm.sp-prod.net"===t.hostname?(this.ccpaPopup=!0,!0):("/index.html"===t.pathname||"/privacy-manager/index.html"===t.pathname)&&(t.searchParams.has("message_id")||t.searchParams.has("requestUUID")||t.searchParams.has("consentUUID"))}async detectPopup(){return!!this.ccpaNotice||(this.ccpaPopup?await l(".priv-save-btn",2e3):(await l(".sp_choice_type_11,.sp_choice_type_12,.sp_choice_type_13,.sp_choice_type_ACCEPT_ALL",2e3),!a(".sp_choice_type_9")))}async optIn(){return await l(".sp_choice_type_11,.sp_choice_type_ACCEPT_ALL",2e3),!!c(".sp_choice_type_11")||!!c(".sp_choice_type_ACCEPT_ALL")}isManagerOpen(){return"/privacy-manager/index.html"===location.pathname}async optOut(){if(this.ccpaPopup){const t=document.querySelectorAll(".priv-purpose-container .sp-switch-arrow-block a.neutral.on .right");for(const e of t)c([e]);const e=document.querySelectorAll(".priv-purpose-container .sp-switch-arrow-block a.switch-bg.on");for(const t of e)c([t]);return c(".priv-save-btn")}if(!this.isManagerOpen()){if(!await l(".sp_choice_type_12,.sp_choice_type_13"))return!1;if(!a(".sp_choice_type_12"))return c(".sp_choice_type_13");c(".sp_choice_type_12"),await i((()=>this.isManagerOpen()),200,100)}await l(".type-modal",2e4);try{const t=".sp_choice_type_REJECT_ALL",e=".reject-toggle",n=await Promise.race([l(t,2e3).then((t=>t?0:-1)),l(e,2e3).then((t=>t?1:-1)),l(".pm-features",2e3).then((t=>t?2:-1))]);if(0===n)return await d(1e3),c(t);1===n?c(e):2===n&&(await l(".pm-features",1e4),c(".checked > span",!0),c(".chevron"))}catch(t){}return c(".sp_choice_type_SAVE_AND_EXIT")}},new class extends f{constructor(){super("consentmanager.net"),this.prehideSelectors=["#cmpbox,#cmpbox2"],this.apiAvailable=!1}get hasSelfTest(){return this.apiAvailable}get isIntermediate(){return!1}async detectCmp(){return this.apiAvailable=await r('window.__cmp && typeof __cmp("getCMPData") === "object"'),!!this.apiAvailable||a("#cmpbox")}async detectPopup(){return this.apiAvailable?(await d(500),await r("!__cmp('consentStatus').userChoiceExists")):u("#cmpbox .cmpmore","any")}async optOut(){return await d(500),this.apiAvailable?await r("__cmp('setConsent', 0)"):!!c(".cmpboxbtnno")||(a(".cmpwelcomeprpsbtn")?(c(".cmpwelcomeprpsbtn > a[aria-checked=true]",!0),c(".cmpboxbtnsave"),!0):(c(".cmpboxbtncustom"),await l(".cmptblbox",2e3),c(".cmptdchoice > a[aria-checked=true]",!0),c(".cmpboxbtnyescustomchoices"),!0))}async optIn(){return this.apiAvailable?await r("__cmp('setConsent', 1)"):c(".cmpboxbtnyes")}async test(){if(this.apiAvailable)return await r("__cmp('consentStatus').userChoiceExists")}},new class extends f{constructor(){super("Evidon")}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return a("#_evidon_banner")}async detectPopup(){return u("#_evidon_banner","any")}async optOut(){return c("#_evidon-decline-button")||(o(n(),["#evidon-prefdiag-overlay","#evidon-prefdiag-background"]),c("#_evidon-option-button"),await l("#evidon-prefdiag-overlay",5e3),c("#evidon-prefdiag-decline")),!0}async optIn(){return c("#_evidon-accept-button")}},new class extends f{constructor(){super("Onetrust"),this.prehideSelectors=["#onetrust-banner-sdk,#onetrust-consent-sdk,.onetrust-pc-dark-filter,.js-consent-banner"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a("#onetrust-banner-sdk")}async detectPopup(){return u("#onetrust-banner-sdk","all")}async optOut(){return a("#onetrust-pc-btn-handler")?c("#onetrust-pc-btn-handler"):c(".ot-sdk-show-settings,button.js-cookie-settings"),await l("#onetrust-consent-sdk",2e3),await d(1e3),c("#onetrust-consent-sdk input.category-switch-handler:checked,.js-editor-toggle-state:checked",!0),await d(1e3),await l(".save-preference-btn-handler,.js-consent-save",2e3),c(".save-preference-btn-handler,.js-consent-save"),await i((()=>u("#onetrust-banner-sdk","none")),10,500),!0}async optIn(){return c("#onetrust-accept-btn-handler,.js-accept-cookies")}async test(){return await r("window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1")}},new class extends f{constructor(){super("Klaro"),this.prehideSelectors=[".klaro"],this.settingsOpen=!1}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a(".klaro > .cookie-modal")?(this.settingsOpen=!0,!0):a(".klaro > .cookie-notice")}async detectPopup(){return u(".klaro > .cookie-notice,.klaro > .cookie-modal","any")}async optOut(){return!!c(".klaro .cn-decline")||(this.settingsOpen||(c(".klaro .cn-learn-more"),await l(".klaro > .cookie-modal",2e3),this.settingsOpen=!0),!!c(".klaro .cn-decline")||(c(".cm-purpose:not(.cm-toggle-all) > input:not(.half-checked)",!0),c(".cm-btn-accept")))}async optIn(){return!!c(".klaro .cm-btn-accept-all")||(this.settingsOpen?(c(".cm-purpose:not(.cm-toggle-all) > input.half-checked",!0),c(".cm-btn-accept")):c(".klaro .cookie-notice .cm-btn-success"))}async test(){return await r("klaro.getManager().config.services.every(c => c.required || !klaro.getManager().consents[c.name])")}},new class extends f{constructor(){super("Uniconsent")}get prehideSelectors(){return[".unic",".modal:has(.unic)"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a(".unic .unic-box,.unic .unic-bar")}async detectPopup(){return u(".unic .unic-box,.unic .unic-bar","any")}async optOut(){if(await l(".unic button",1e3),document.querySelectorAll(".unic button").forEach((t=>{const e=t.textContent;(e.includes("Manage Options")||e.includes("Optionen verwalten"))&&t.click()})),await l(".unic input[type=checkbox]",1e3)){await l(".unic button",1e3),document.querySelectorAll(".unic input[type=checkbox]").forEach((t=>{t.checked&&t.click()}));for(const t of document.querySelectorAll(".unic button")){const e=t.textContent;for(const n of["Confirm Choices","Save Choices","Auswahl speichern"])if(e.includes(n))return t.click(),await d(500),!0}}return!1}async optIn(){return p(".unic #unic-agree")}async test(){await d(1e3);return!a(".unic .unic-box,.unic .unic-bar")}},new class extends f{constructor(){super("Conversant"),this.prehideSelectors=[".cmp-root"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a(".cmp-root .cmp-receptacle")}async detectPopup(){return u(".cmp-root .cmp-receptacle","any")}async optOut(){if(!await p(".cmp-main-button:not(.cmp-main-button--primary)"))return!1;if(!await l(".cmp-view-tab-tabs"))return!1;await p(".cmp-view-tab-tabs > :first-child"),await p(".cmp-view-tab-tabs > .cmp-view-tab--active:first-child");for(const t of Array.from(document.querySelectorAll(".cmp-accordion-item"))){t.querySelector(".cmp-accordion-item-title").click(),await i((()=>!!t.querySelector(".cmp-accordion-item-content.cmp-active")),10,50);const e=t.querySelector(".cmp-accordion-item-content.cmp-active");e.querySelectorAll(".cmp-toggle-actions .cmp-toggle-deny:not(.cmp-toggle-deny--active)").forEach((t=>t.click())),e.querySelectorAll(".cmp-toggle-actions .cmp-toggle-checkbox:not(.cmp-toggle-checkbox--active)").forEach((t=>t.click()))}return await c(".cmp-main-button:not(.cmp-main-button--primary)"),!0}async optIn(){return p(".cmp-main-button.cmp-main-button--primary")}async test(){return document.cookie.includes("cmp-data=0")}},new class extends f{constructor(){super("tiktok.com"),this.runContext={urlPattern:"tiktok"}}get hasSelfTest(){return!0}get isIntermediate(){return!1}getShadowRoot(){const t=document.querySelector("tiktok-cookie-banner");return t?t.shadowRoot:null}async detectCmp(){return a("tiktok-cookie-banner")}async detectPopup(){return s(this.getShadowRoot().querySelector(".tiktok-cookie-banner"))}async optOut(){const t=this.getShadowRoot().querySelector(".button-wrapper button:first-child");return!!t&&(t.click(),!0)}async optIn(){const t=this.getShadowRoot().querySelector(".button-wrapper button:last-child");return!!t&&(t.click(),!0)}async test(){const t=document.cookie.match(/cookie-consent=([^;]+)/);if(!t)return!1;const e=JSON.parse(decodeURIComponent(t[1]));return Object.values(e).every((t=>"boolean"!=typeof t||!1===t))}},new class extends f{constructor(){super("airbnb"),this.runContext={urlPattern:"^https://(www\\.)?airbnb\\.[^/]+/"},this.prehideSelectors=["div[data-testid=main-cookies-banner-container]",'div:has(> div:first-child):has(> div:last-child):has(> section [data-testid="strictly-necessary-cookies"])']}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a("div[data-testid=main-cookies-banner-container]")}async detectPopup(){return u("div[data-testid=main-cookies-banner-container","any")}async optOut(){let t;for(await p("div[data-testid=main-cookies-banner-container] button._snbhip0");t=document.querySelector("[data-testid=modal-container] button[aria-checked=true]:not([disabled])");)t.click();return p("button[data-testid=save-btn]")}async optIn(){return p("div[data-testid=main-cookies-banner-container] button._148dgdpk")}async test(){return await i((()=>!!document.cookie.match("OptanonAlertBoxClosed")),20,200)}}];class v{static setBase(t){v.base=t}static findElement(t,e=null,n=!1){let o=null;return o=null!=e?Array.from(e.querySelectorAll(t.selector)):null!=v.base?Array.from(v.base.querySelectorAll(t.selector)):Array.from(document.querySelectorAll(t.selector)),null!=t.textFilter&&(o=o.filter((e=>{const n=e.textContent.toLowerCase();if(Array.isArray(t.textFilter)){let e=!1;for(const o of t.textFilter)if(-1!==n.indexOf(o.toLowerCase())){e=!0;break}return e}if(null!=t.textFilter)return-1!==n.indexOf(t.textFilter.toLowerCase())}))),null!=t.styleFilters&&(o=o.filter((e=>{const n=window.getComputedStyle(e);let o=!0;for(const e of t.styleFilters){const t=n[e.option];o=e.negated?o&&t!==e.value:o&&t===e.value}return o}))),null!=t.displayFilter&&(o=o.filter((e=>t.displayFilter?0!==e.offsetHeight:0===e.offsetHeight))),null!=t.iframeFilter&&(o=o.filter((()=>t.iframeFilter?window.location!==window.parent.location:window.location===window.parent.location))),null!=t.childFilter&&(o=o.filter((e=>{const n=v.base;v.setBase(e);const o=v.find(t.childFilter);return v.setBase(n),null!=o.target}))),n?o:(o.length>1&&console.warn("Multiple possible targets: ",o,t,e),o[0])}static find(t,e=!1){const n=[];if(null!=t.parent){const o=v.findElement(t.parent,null,e);if(null!=o){if(o instanceof Array)return o.forEach((o=>{const i=v.findElement(t.target,o,e);i instanceof Array?i.forEach((t=>{n.push({parent:o,target:t})})):n.push({parent:o,target:i})})),n;{const i=v.findElement(t.target,o,e);i instanceof Array?i.forEach((t=>{n.push({parent:o,target:t})})):n.push({parent:o,target:i})}}}else{const o=v.findElement(t.target,null,e);o instanceof Array?o.forEach((t=>{n.push({parent:null,target:t})})):n.push({parent:null,target:o})}return 0===n.length&&n.push({parent:null,target:null}),e?n:(1!==n.length&&console.warn("Multiple results found, even though multiple false",n),n[0])}}function _(t){const e=v.find(t);return"css"===t.type?!!e.target:"checkbox"===t.type?!!e.target&&e.target.checked:void 0}async function S(t,e){switch(t.type){case"click":return async function(t){const e=v.find(t);null!=e.target&&e.target.click();return x(0)}(t);case"list":return async function(t,e){for(const n of t.actions)await S(n,e)}(t,e);case"consent":return async function(t,e){for(const n of t.consents){const t=-1!==e.indexOf(n.type);if(n.matcher&&n.toggleAction){_(n.matcher)!==t&&await S(n.toggleAction)}else t?await S(n.trueAction):await S(n.falseAction)}}(t,e);case"ifcss":return async function(t,e){v.find(t).target?t.falseAction&&await S(t.falseAction,e):t.trueAction&&await S(t.trueAction,e)}(t,e);case"waitcss":return async function(t){await new Promise((e=>{let n=t.retries||10;const o=t.waitTime||250,i=()=>{const s=v.find(t);(t.negated&&s.target||!t.negated&&!s.target)&&n>0?(n-=1,setTimeout(i,o)):e()};i()}))}(t);case"foreach":return async function(t,e){const n=v.find(t,!0),o=v.base;for(const o of n)o.target&&(v.setBase(o.target),await S(t.action,e));v.setBase(o)}(t,e);case"hide":return async function(t){const e=v.find(t);e.target&&e.target.classList.add("Autoconsent-Hidden")}(t);case"slide":return async function(t){const e=v.find(t),n=v.find(t.dragTarget);if(e.target){const t=e.target.getBoundingClientRect(),o=n.target.getBoundingClientRect();let i=o.top-t.top,s=o.left-t.left;"y"===this.config.axis.toLowerCase()&&(s=0),"x"===this.config.axis.toLowerCase()&&(i=0);const r=window.screenX+t.left+t.width/2,c=window.screenY+t.top+t.height/2,a=t.left+t.width/2,u=t.top+t.height/2,l=document.createEvent("MouseEvents");l.initMouseEvent("mousedown",!0,!0,window,0,r,c,a,u,!1,!1,!1,!1,0,e.target);const p=document.createEvent("MouseEvents");p.initMouseEvent("mousemove",!0,!0,window,0,r+s,c+i,a+s,u+i,!1,!1,!1,!1,0,e.target);const d=document.createEvent("MouseEvents");d.initMouseEvent("mouseup",!0,!0,window,0,r+s,c+i,a+s,u+i,!1,!1,!1,!1,0,e.target),e.target.dispatchEvent(l),await this.waitTimeout(10),e.target.dispatchEvent(p),await this.waitTimeout(10),e.target.dispatchEvent(d)}}(t);case"close":return async function(){window.close()}();case"wait":return async function(t){await x(t.waitTime)}(t);case"eval":return async function(t){return console.log("eval!",t.code),new Promise((e=>{try{t.async?(window.eval(t.code),setTimeout((()=>{e(window.eval("window.__consentCheckResult"))}),t.timeout||250)):e(window.eval(t.code))}catch(n){console.warn("eval error",n,t.code),e(!1)}}))}(t);default:throw"Unknown action type: "+t.type}}v.base=null;function x(t){return new Promise((e=>{setTimeout((()=>{e()}),t)}))}class P{constructor(t,e){this.name=t,this.config=e,this.methods=new Map,this.runContext=m,e.methods.forEach((t=>{t.action&&this.methods.set(t.name,t.action)})),this.hasSelfTest=!1}get isIntermediate(){return!1}checkRunContext(){return!0}async detectCmp(){return this.config.detectors.map((t=>_(t.presentMatcher))).some((t=>!!t))}async detectPopup(){return this.config.detectors.map((t=>_(t.showingMatcher))).some((t=>!!t))}async executeAction(t,e){return!this.methods.has(t)||S(this.methods.get(t),e)}async optOut(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",[]),await this.executeAction("SAVE_CONSENT"),!0}async optIn(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",["D","A","B","E","F","X"]),await this.executeAction("SAVE_CONSENT"),!0}async openCmp(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),!0}async test(){return!0}}const A=new class{constructor(t,n=null,o=null){if(this.rules=[],this.foundCmp=null,e.sendContentMessage=t,this.sendContentMessage=t,this.rules=[...k],n)this.initialize(n,o);else{o&&this.parseRules(o);t({type:"init",url:window.location.href})}}initialize(t,e){if(this.config=t,t.enabled){if(e&&this.parseRules(e),t.disabledCmps?.length>0&&this.disableCMPs(t.disabledCmps),t.enablePrehide)if(document.documentElement)this.prehideElements();else{const t=()=>{window.removeEventListener("DOMContentLoaded",t),this.prehideElements()};window.addEventListener("DOMContentLoaded",t)}if("loading"===document.readyState){const t=()=>{window.removeEventListener("DOMContentLoaded",t),this.start()};window.addEventListener("DOMContentLoaded",t)}else this.start()}}parseRules(t){Object.keys(t.consentomatic).forEach((e=>{this.addConsentomaticCMP(e,t.consentomatic[e])})),t.autoconsent.forEach((t=>{this.addCMP(t)}))}addCMP(t){this.rules.push(function(t){return new g(t)}(t))}disableCMPs(t){this.rules=this.rules.filter((e=>!t.includes(e.name)))}addConsentomaticCMP(t,e){this.rules.push(new P(`com_${t}`,e))}start(){window.requestIdleCallback?window.requestIdleCallback((()=>this._start()),{timeout:500}):this._start()}async _start(){const t=await this.findCmp(this.config.detectRetries);if(t.length>0){const e=[];for(const n of t)this.sendContentMessage({type:"cmpDetected",url:location.href,cmp:n.name}),e.push(this.waitForPopup(n).then((t=>t?(this.foundCmp||(this.foundCmp=n),this.sendContentMessage({type:"popupFound",cmp:n.name,url:location.href}),!0):Promise.reject(`${n.name} popup not found`))));let n=!1;for(const t of e)try{await t,n=!0;break}catch(t){continue}return n?"optOut"===this.config.autoAction?await this.doOptOut():"optIn"!==this.config.autoAction||await this.doOptIn():(this.config.enablePrehide&&h(),!1)}return this.config.enablePrehide&&h(),!1}async findCmp(t){const e=[];for(const t of this.rules)try{if(!t.checkRunContext())continue;await t.detectCmp()&&e.push(t)}catch(t){}if(e.length>1){const t={msg:"Found multiple CMPs, check the detection rules.",cmps:e.map((t=>t.name))};this.sendContentMessage({type:"autoconsentError",details:t})}return 0===e.length&&t>0?new Promise((e=>{setTimeout((async()=>{const n=this.findCmp(t-1);e(n)}),500)})):e}async doOptOut(){let t;return t=!!this.foundCmp&&await this.foundCmp.optOut(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optOutResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:t,scheduleSelfTest:this.foundCmp&&this.foundCmp.hasSelfTest,url:location.href}),t&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),t}async doOptIn(){let t;return t=!!this.foundCmp&&await this.foundCmp.optIn(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optInResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:t,scheduleSelfTest:!1,url:location.href}),t&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),t}async doSelfTest(){let t;return t=!!this.foundCmp&&await this.foundCmp.test(),this.sendContentMessage({type:"selfTestResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:t,url:location.href}),t}async waitForPopup(t,e=5,n=500){const o=await t.detectPopup();return!o&&e>0?new Promise((o=>setTimeout((()=>o(this.waitForPopup(t,e-1,n))),n))):o}prehideElements(){return function(t){return o(n("autoconsent-prehide"),t,"opacity")}(this.rules.reduce(((t,e)=>e.prehideSelectors?[...t,...e.prehideSelectors]:t),["#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"]))}async receiveMessageCallback(t){switch(t.type){case"initResp":this.initialize(t.config,t.rules);break;case"optIn":await this.doOptIn();break;case"optOut":await this.doOptOut();break;case"selfTest":await this.doSelfTest();break;case"evalResp":!function(t,n){const o=e.pending.get(t);o?(e.pending.delete(t),o.timer&&window.clearTimeout(o.timer),o.resolve(n)):console.warn("no eval #",t)}(t.id,t.result)}}}(chrome.runtime.sendMessage);chrome.runtime.onMessage.addListener((t=>Promise.resolve(A.receiveMessageCallback(t))))}();
|
|
@@ -66,10 +66,7 @@
|
|
|
66
66
|
"name": "affinity.serif.com",
|
|
67
67
|
"detectCmp": [
|
|
68
68
|
{
|
|
69
|
-
"exists": ".c-cookie-banner"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"exists": ".c-cookie-banner button"
|
|
69
|
+
"exists": ".c-cookie-banner button[data-qa='allow-all-cookies']"
|
|
73
70
|
}
|
|
74
71
|
],
|
|
75
72
|
"detectPopup": [
|
|
@@ -721,6 +718,54 @@
|
|
|
721
718
|
}
|
|
722
719
|
]
|
|
723
720
|
},
|
|
721
|
+
{
|
|
722
|
+
"name": "cookiealert",
|
|
723
|
+
"intermediate": false,
|
|
724
|
+
"prehideSelectors": [],
|
|
725
|
+
"runContext": {
|
|
726
|
+
"frame": true,
|
|
727
|
+
"main": true
|
|
728
|
+
},
|
|
729
|
+
"detectCmp": [
|
|
730
|
+
{
|
|
731
|
+
"exists": ".cookie-alert-extended"
|
|
732
|
+
}
|
|
733
|
+
],
|
|
734
|
+
"detectPopup": [
|
|
735
|
+
{
|
|
736
|
+
"visible": ".cookie-alert-extended-modal"
|
|
737
|
+
}
|
|
738
|
+
],
|
|
739
|
+
"optIn": [
|
|
740
|
+
{
|
|
741
|
+
"click": "button[data-controller='cookie-alert/extended/button/accept']"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"eval": "document.querySelector('body').removeAttribute('style') || true"
|
|
745
|
+
}
|
|
746
|
+
],
|
|
747
|
+
"optOut": [
|
|
748
|
+
{
|
|
749
|
+
"click": "a[data-controller='cookie-alert/extended/detail-link']"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"click": ".cookie-alert-configuration-input:checked",
|
|
753
|
+
"all": true,
|
|
754
|
+
"optional": true
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"click": "button[data-controller='cookie-alert/extended/button/configuration']"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"eval": "document.querySelector('body').removeAttribute('style') || true"
|
|
761
|
+
}
|
|
762
|
+
],
|
|
763
|
+
"test": [
|
|
764
|
+
{
|
|
765
|
+
"eval": "window.CookieConsent.declined === true"
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
},
|
|
724
769
|
{
|
|
725
770
|
"name": "Cookie Information Banner",
|
|
726
771
|
"prehideSelectors": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";class e{constructor(e,t=1e3){this.id=e,this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),this.timer=window.setTimeout((()=>{this.reject(new Error("timeout"))}),t)}}const t={pending:new Map,sendContentMessage:null};function n(e="autoconsent-css-rules"){const t=`style#${e}`,n=document.querySelector(t);if(n&&n instanceof HTMLStyleElement)return n;{const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("style");return n.id=e,t.appendChild(n),n}}function o(e,t,n="display"){const o="opacity"===n?"opacity: 0":"display: none",i=`${t.join(",")} { ${o} !important; z-index: -1 !important; pointer-events: none !important; } `;return e instanceof HTMLStyleElement&&(e.innerText+=i,t.length>0)}async function i(e,t,n){const o=await e();return!o&&t>0?new Promise((o=>{setTimeout((async()=>{o(i(e,t-1,n))}),n)})):Promise.resolve(o)}function s(e){if(!e)return!1;if(null!==e.offsetParent)return!0;{const t=window.getComputedStyle(e);if("fixed"===t.position&&"none"!==t.display)return!0}return!1}function r(n){return function(n){let o;o=crypto&&void 0!==crypto.randomUUID?crypto.randomUUID():Math.random().toString(),t.sendContentMessage({type:"eval",id:o,code:n});const i=new e(o);return t.pending.set(i.id,i),i.promise}(n).catch((e=>!1))}function a(e,t=!1){const n=document.querySelectorAll(e);return n.length>0&&(t?n.forEach((e=>e.click())):n[0].click()),n.length>0}function c(e){return null!==document.querySelector(e)}function u(e,t){const n=document.querySelectorAll(e),o=new Array(n.length);return n.forEach(((e,t)=>{o[t]=s(e)})),"none"===t?o.every((e=>!e)):0!==o.length&&("any"===t?o.some((e=>e)):o.every((e=>e)))}function l(e,t=1e4){return i((()=>null!==document.querySelector(e)),Math.ceil(t/200),200)}async function d(e,t=1e4,n=!1){return await l(e,t),a(e,n)}function p(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}function h(){const e=n("autoconsent-prehide");return e&&e.remove(),!!e}const m={main:!0,frame:!1,urlPattern:""};class f{constructor(e){this.runContext=m,this.name=e}get hasSelfTest(){throw new Error("Not Implemented")}get isIntermediate(){throw new Error("Not Implemented")}checkRunContext(){const e={...m,...this.runContext},t=window.top===window;return!(t&&!e.main)&&(!(!t&&!e.frame)&&!(e.urlPattern&&!window.location.href.match(e.urlPattern)))}detectCmp(){throw new Error("Not Implemented")}async detectPopup(){return!1}optOut(){throw new Error("Not Implemented")}optIn(){throw new Error("Not Implemented")}openCmp(){throw new Error("Not Implemented")}async test(){return Promise.resolve(!0)}}async function y(e){const t=[];if(e.exists&&t.push(c(e.exists)),e.visible&&t.push(u(e.visible,e.check)),e.eval){const n=r(e.eval);t.push(n)}var s,h;if(e.waitFor&&t.push(l(e.waitFor,e.timeout)),e.waitForVisible&&t.push(function(e,t=1e4,n="any"){return i((()=>u(e,n)),Math.ceil(t/200),200)}(e.waitForVisible,e.timeout,e.check)),e.click&&t.push(a(e.click,e.all)),e.waitForThenClick&&t.push(d(e.waitForThenClick,e.timeout,e.all)),e.wait&&t.push(p(e.wait)),e.hide&&t.push((s=e.hide,h=e.method,o(n(),s,h))),e.if){if(!e.if.exists&&!e.if.visible)return console.error("invalid conditional rule",e.if),!1;await y(e.if)?t.push(w(e.then)):e.else&&t.push(w(e.else))}if(0===t.length)return!1;return(await Promise.all(t)).reduce(((e,t)=>e&&t),!0)}async function w(e){for(const t of e){if(!await y(t)&&!t.optional)return!1}return!0}class g extends f{constructor(e){super(e.name),this.config=e,this.runContext=e.runContext||m}get hasSelfTest(){return!!this.config.test}get isIntermediate(){return!!this.config.intermediate}get prehideSelectors(){return this.config.prehideSelectors}async detectCmp(){return!!this.config.detectCmp&&async function(e){const t=e.map((e=>y(e)));return(await Promise.all(t)).every((e=>!!e))}(this.config.detectCmp)}async detectPopup(){return!!this.config.detectPopup&&w(this.config.detectPopup)}async optOut(){return!!this.config.optOut&&w(this.config.optOut)}async optIn(){return!!this.config.optIn&&w(this.config.optIn)}async openCmp(){return!!this.config.openCmp&&w(this.config.openCmp)}async test(){return this.hasSelfTest?w(this.config.test):super.test()}}const b="#truste-show-consent",C="#truste-consent-track";const k=[new class extends f{constructor(){super("TrustArc-top"),this.prehideSelectors=[".trustarc-banner-container",`.truste_popframe,.truste_overlay,.truste_box_overlay,${C}`],this.runContext={main:!0,frame:!1},this._shortcutButton=null,this._optInDone=!1}get hasSelfTest(){return!1}get isIntermediate(){return!this._optInDone&&!this._shortcutButton}async detectCmp(){const e=c(`#truste-show-consent,${C}`);return e&&(this._shortcutButton=document.querySelector("#truste-consent-required")),e}async detectPopup(){return u(`#truste-consent-content,#trustarc-banner-overlay,${C}`,"all")}openFrame(){a(b)}async optOut(){return this._shortcutButton?(this._shortcutButton.click(),!0):(o(n(),[".truste_popframe",".truste_overlay",".truste_box_overlay",C]),a(b),setTimeout((()=>{n().remove()}),1e4),!0)}async optIn(){return this._optInDone=!0,a("#truste-consent-button")}async openCmp(){return!0}async test(){return!0}},new class extends f{constructor(){super("TrustArc-frame"),this.runContext={main:!1,frame:!0,urlPattern:"^https://consent-pref\\.trustarc\\.com/\\?"}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return!0}async detectPopup(){return u("#defaultpreferencemanager","any")&&u(".mainContent","any")}async navigateToSettings(){return await i((async()=>c(".shp")||u(".advance","any")||c(".switch span:first-child")),10,500),c(".shp")&&a(".shp"),await l(".prefPanel",5e3),u(".advance","any")&&a(".advance"),await i((()=>u(".switch span:first-child","any")),5,1e3)}async optOut(){return await i((()=>"complete"===document.readyState),20,100),await l(".mainContent[aria-hidden=false]",5e3),!!a(".rejectAll")||(c(".prefPanel")&&await l('.prefPanel[style="visibility: visible;"]',3e3),a("#catDetails0")?(a(".submit"),!0):(a(".required")||(await this.navigateToSettings(),a(".switch span:nth-child(1):not(.active)",!0),a(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{a("#gwt-debug-close_id")}))),!0))}async optIn(){return a(".call")||(await this.navigateToSettings(),a(".switch span:nth-child(2)",!0),a(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{a("#gwt-debug-close_id")}))),!0}},new class extends f{constructor(){super("Cybotcookiebot"),this.prehideSelectors=["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("#CybotCookiebotDialogBodyLevelButtonPreferences")}async detectPopup(){return c("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner")}async optOut(){return a(".cookie-alert-extended-detail-link")?(await l(".cookie-alert-configuration",2e3),a(".cookie-alert-configuration-input:checked",!0),a(".cookie-alert-extended-button-secondary"),!0):c("#dtcookie-container")?a(".h-dtcookie-decline"):(a(".cookiebot__button--settings")||a("#CybotCookiebotDialogBodyButtonDecline")||(a(".cookiebanner__link--details"),a('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled',!0),a("#CybotCookiebotDialogBodyButtonDecline"),a("input[id^=CybotCookiebotDialogBodyLevelButton]:checked",!0),c("#CybotCookiebotDialogBodyButtonAcceptSelected")?a("#CybotCookiebotDialogBodyButtonAcceptSelected"):a("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection",!0),await r("window.CookieConsent.hasResponse !== true")&&(await r("window.Cookiebot.dialog.submitConsent()"),await p(500)),c("#cb-confirmedSettings")&&await r("endCookieProcess()")),!0)}async optIn(){return c("#dtcookie-container")?a(".h-dtcookie-accept"):(a(".CybotCookiebotDialogBodyLevelButton:not(:checked):enabled",!0),a("#CybotCookiebotDialogBodyLevelButtonAccept"),a("#CybotCookiebotDialogBodyButtonAccept"),!0)}async test(){return r("window.CookieConsent.declined === true")}},new class extends f{constructor(){super("Sourcepoint-frame"),this.prehideSelectors=["div[id^='sp_message_container_'],.message-overlay"],this.ccpaMode=!1,this.runContext={main:!1,frame:!0}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){const e=new URL(location.href);return e.searchParams.has("message_id")&&"ccpa-notice.sp-prod.net"===e.hostname?(this.ccpaMode=!0,!0):("/index.html"===e.pathname||"/privacy-manager/index.html"===e.pathname)&&(e.searchParams.has("message_id")||e.searchParams.has("requestUUID")||e.searchParams.has("consentUUID"))}async detectPopup(){return await l(".sp_choice_type_11,.sp_choice_type_12,.sp_choice_type_13,.sp_choice_type_ACCEPT_ALL",2e3),!c(".sp_choice_type_9")}async optIn(){return await l(".sp_choice_type_11,.sp_choice_type_ACCEPT_ALL",2e3),!!a(".sp_choice_type_11")||!!a(".sp_choice_type_ACCEPT_ALL")}isManagerOpen(){return"/privacy-manager/index.html"===new URL(location.href).pathname}async optOut(){if(!this.isManagerOpen()){if(!await l(".sp_choice_type_12,.sp_choice_type_13"))return!1;if(!c(".sp_choice_type_12"))return a(".sp_choice_type_13");a(".sp_choice_type_12"),await i((()=>"/privacy-manager/index.html"===location.pathname),200,100)}await l(".type-modal",2e4);try{const e=".sp_choice_type_REJECT_ALL",t=".reject-toggle",n=await Promise.race([l(e,2e3).then((e=>e?0:-1)),l(t,2e3).then((e=>e?1:-1)),l(".pm-features",2e3).then((e=>e?2:-1))]);if(0===n)return await p(1e3),a(e);1===n?a(t):2===n&&(await l(".pm-features",1e4),a(".checked > span",!0),a(".chevron"))}catch(e){}return a(".sp_choice_type_SAVE_AND_EXIT"),!0}},new class extends f{constructor(){super("consentmanager.net"),this.prehideSelectors=["#cmpbox,#cmpbox2"],this.apiAvailable=!1}get hasSelfTest(){return this.apiAvailable}get isIntermediate(){return!1}async detectCmp(){return this.apiAvailable=await r('window.__cmp && typeof __cmp("getCMPData") === "object"'),!!this.apiAvailable||c("#cmpbox")}async detectPopup(){return this.apiAvailable?(await p(500),await r("!__cmp('consentStatus').userChoiceExists")):u("#cmpbox .cmpmore","any")}async optOut(){return await p(500),this.apiAvailable?await r("__cmp('setConsent', 0)"):!!a(".cmpboxbtnno")||(c(".cmpwelcomeprpsbtn")?(a(".cmpwelcomeprpsbtn > a[aria-checked=true]",!0),a(".cmpboxbtnsave"),!0):(a(".cmpboxbtncustom"),await l(".cmptblbox",2e3),a(".cmptdchoice > a[aria-checked=true]",!0),a(".cmpboxbtnyescustomchoices"),!0))}async optIn(){return this.apiAvailable?await r("__cmp('setConsent', 1)"):a(".cmpboxbtnyes")}async test(){if(this.apiAvailable)return await r("__cmp('consentStatus').userChoiceExists")}},new class extends f{constructor(){super("Evidon")}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return c("#_evidon_banner")}async detectPopup(){return u("#_evidon_banner","any")}async optOut(){return a("#_evidon-decline-button")||(o(n(),["#evidon-prefdiag-overlay","#evidon-prefdiag-background"]),a("#_evidon-option-button"),await l("#evidon-prefdiag-overlay",5e3),a("#evidon-prefdiag-decline")),!0}async optIn(){return a("#_evidon-accept-button")}},new class extends f{constructor(){super("Onetrust"),this.prehideSelectors=["#onetrust-banner-sdk,#onetrust-consent-sdk,.onetrust-pc-dark-filter,.js-consent-banner"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("#onetrust-banner-sdk")}async detectPopup(){return u("#onetrust-banner-sdk","all")}async optOut(){return c("#onetrust-pc-btn-handler")?a("#onetrust-pc-btn-handler"):a(".ot-sdk-show-settings,button.js-cookie-settings"),await l("#onetrust-consent-sdk",2e3),await p(1e3),a("#onetrust-consent-sdk input.category-switch-handler:checked,.js-editor-toggle-state:checked",!0),await p(1e3),await l(".save-preference-btn-handler,.js-consent-save",2e3),a(".save-preference-btn-handler,.js-consent-save"),await i((()=>u("#onetrust-banner-sdk","none")),10,500),!0}async optIn(){return a("#onetrust-accept-btn-handler,.js-accept-cookies")}async test(){return await r("window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1")}},new class extends f{constructor(){super("Klaro"),this.prehideSelectors=[".klaro"],this.settingsOpen=!1}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".klaro > .cookie-modal")?(this.settingsOpen=!0,!0):c(".klaro > .cookie-notice")}async detectPopup(){return u(".klaro > .cookie-notice,.klaro > .cookie-modal","any")}async optOut(){return!!a(".klaro .cn-decline")||(this.settingsOpen||(a(".klaro .cn-learn-more"),await l(".klaro > .cookie-modal",2e3),this.settingsOpen=!0),!!a(".klaro .cn-decline")||(a(".cm-purpose:not(.cm-toggle-all) > input:not(.half-checked)",!0),a(".cm-btn-accept")))}async optIn(){return!!a(".klaro .cm-btn-accept-all")||(this.settingsOpen?(a(".cm-purpose:not(.cm-toggle-all) > input.half-checked",!0),a(".cm-btn-accept")):a(".klaro .cookie-notice .cm-btn-success"))}async test(){return await r("klaro.getManager().config.services.every(c => c.required || !klaro.getManager().consents[c.name])")}},new class extends f{constructor(){super("Uniconsent")}get prehideSelectors(){return[".unic",".modal:has(.unic)"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".unic .unic-box,.unic .unic-bar")}async detectPopup(){return u(".unic .unic-box,.unic .unic-bar","any")}async optOut(){if(await l(".unic button",1e3),document.querySelectorAll(".unic button").forEach((e=>{const t=e.textContent;(t.includes("Manage Options")||t.includes("Optionen verwalten"))&&e.click()})),await l(".unic input[type=checkbox]",1e3)){await l(".unic button",1e3),document.querySelectorAll(".unic input[type=checkbox]").forEach((e=>{e.checked&&e.click()}));for(const e of document.querySelectorAll(".unic button")){const t=e.textContent;for(const n of["Confirm Choices","Save Choices","Auswahl speichern"])if(t.includes(n))return e.click(),await p(500),!0}}return!1}async optIn(){return d(".unic #unic-agree")}async test(){await p(1e3);return!c(".unic .unic-box,.unic .unic-bar")}},new class extends f{constructor(){super("Conversant"),this.prehideSelectors=[".cmp-root"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".cmp-root .cmp-receptacle")}async detectPopup(){return u(".cmp-root .cmp-receptacle","any")}async optOut(){if(!await d(".cmp-main-button:not(.cmp-main-button--primary)"))return!1;if(!await l(".cmp-view-tab-tabs"))return!1;await d(".cmp-view-tab-tabs > :first-child"),await d(".cmp-view-tab-tabs > .cmp-view-tab--active:first-child");for(const e of Array.from(document.querySelectorAll(".cmp-accordion-item"))){e.querySelector(".cmp-accordion-item-title").click(),await i((()=>!!e.querySelector(".cmp-accordion-item-content.cmp-active")),10,50);const t=e.querySelector(".cmp-accordion-item-content.cmp-active");t.querySelectorAll(".cmp-toggle-actions .cmp-toggle-deny:not(.cmp-toggle-deny--active)").forEach((e=>e.click())),t.querySelectorAll(".cmp-toggle-actions .cmp-toggle-checkbox:not(.cmp-toggle-checkbox--active)").forEach((e=>e.click()))}return await a(".cmp-main-button:not(.cmp-main-button--primary)"),!0}async optIn(){return d(".cmp-main-button.cmp-main-button--primary")}async test(){return document.cookie.includes("cmp-data=0")}},new class extends f{constructor(){super("tiktok.com"),this.runContext={urlPattern:"tiktok"}}get hasSelfTest(){return!0}get isIntermediate(){return!1}getShadowRoot(){const e=document.querySelector("tiktok-cookie-banner");return e?e.shadowRoot:null}async detectCmp(){return c("tiktok-cookie-banner")}async detectPopup(){return s(this.getShadowRoot().querySelector(".tiktok-cookie-banner"))}async optOut(){const e=this.getShadowRoot().querySelector(".button-wrapper button:first-child");return!!e&&(e.click(),!0)}async optIn(){const e=this.getShadowRoot().querySelector(".button-wrapper button:last-child");return!!e&&(e.click(),!0)}async test(){const e=document.cookie.match(/cookie-consent=([^;]+)/);if(!e)return!1;const t=JSON.parse(decodeURIComponent(e[1]));return Object.values(t).every((e=>"boolean"!=typeof e||!1===e))}},new class extends f{constructor(){super("airbnb"),this.runContext={urlPattern:"^https://(www\\.)?airbnb\\.[^/]+/"},this.prehideSelectors=["div[data-testid=main-cookies-banner-container]",'div:has(> div:first-child):has(> div:last-child):has(> section [data-testid="strictly-necessary-cookies"])']}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("div[data-testid=main-cookies-banner-container]")}async detectPopup(){return u("div[data-testid=main-cookies-banner-container","any")}async optOut(){let e;for(await d("div[data-testid=main-cookies-banner-container] button._snbhip0");e=document.querySelector("[data-testid=modal-container] button[aria-checked=true]:not([disabled])");)e.click();return d("button[data-testid=save-btn]")}async optIn(){return d("div[data-testid=main-cookies-banner-container] button._148dgdpk")}async test(){return await i((()=>!!document.cookie.match("OptanonAlertBoxClosed")),20,200)}}];class v{static setBase(e){v.base=e}static findElement(e,t=null,n=!1){let o=null;return o=null!=t?Array.from(t.querySelectorAll(e.selector)):null!=v.base?Array.from(v.base.querySelectorAll(e.selector)):Array.from(document.querySelectorAll(e.selector)),null!=e.textFilter&&(o=o.filter((t=>{let n=t.textContent.toLowerCase();if(Array.isArray(e.textFilter)){let t=!1;for(let o of e.textFilter)if(-1!==n.indexOf(o.toLowerCase())){t=!0;break}return t}if(null!=e.textFilter)return-1!==n.indexOf(e.textFilter.toLowerCase())}))),null!=e.styleFilters&&(o=o.filter((t=>{let n=window.getComputedStyle(t),o=!0;for(let t of e.styleFilters){let e=n[t.option];o=t.negated?o&&e!==t.value:o&&e===t.value}return o}))),null!=e.displayFilter&&(o=o.filter((t=>e.displayFilter?0!==t.offsetHeight:0===t.offsetHeight))),null!=e.iframeFilter&&(o=o.filter((t=>e.iframeFilter?window.location!==window.parent.location:window.location===window.parent.location))),null!=e.childFilter&&(o=o.filter((t=>{let n=v.base;v.setBase(t);let o=v.find(e.childFilter);return v.setBase(n),null!=o.target}))),n?o:(o.length>1&&console.warn("Multiple possible targets: ",o,e,t),o[0])}static find(e,t=!1){let n=[];if(null!=e.parent){let o=v.findElement(e.parent,null,t);if(null!=o){if(o instanceof Array)return o.forEach((o=>{let i=v.findElement(e.target,o,t);i instanceof Array?i.forEach((e=>{n.push({parent:o,target:e})})):n.push({parent:o,target:i})})),n;{let i=v.findElement(e.target,o,t);i instanceof Array?i.forEach((e=>{n.push({parent:o,target:e})})):n.push({parent:o,target:i})}}}else{let o=v.findElement(e.target,null,t);o instanceof Array?o.forEach((e=>{n.push({parent:null,target:e})})):n.push({parent:null,target:o})}return 0===n.length&&n.push({parent:null,target:null}),t?n:(1!==n.length&&console.warn("Multiple results found, even though multiple false",n),n[0])}}function _(e){const t=v.find(e);return"css"===e.type?!!t.target:"checkbox"===e.type?!!t.target&&t.target.checked:void 0}async function S(e,t){switch(e.type){case"click":return async function(e){const t=v.find(e);null!=t.target&&t.target.click();return x(0)}(e);case"list":return async function(e,t){for(let n of e.actions)await S(n,t)}(e,t);case"consent":return async function(e,t){for(const n of e.consents){const e=-1!==t.indexOf(n.type);if(n.matcher&&n.toggleAction){_(n.matcher)!==e&&await S(n.toggleAction)}else e?await S(n.trueAction):await S(n.falseAction)}}(e,t);case"ifcss":return async function(e,t){v.find(e).target?e.falseAction&&await S(e.falseAction,t):e.trueAction&&await S(e.trueAction,t)}(e,t);case"waitcss":return async function(e){await new Promise((t=>{let n=e.retries||10;const o=e.waitTime||250,i=()=>{const s=v.find(e);(e.negated&&s.target||!e.negated&&!s.target)&&n>0?(n-=1,setTimeout(i,o)):t()};i()}))}(e);case"foreach":return async function(e,t){const n=v.find(e,!0),o=v.base;for(const o of n)o.target&&(v.setBase(o.target),await S(e.action,t));v.setBase(o)}(e,t);case"hide":return async function(e){const t=v.find(e);t.target&&t.target.classList.add("Autoconsent-Hidden")}(e);case"slide":return async function(e){const t=v.find(e),n=v.find(e.dragTarget);if(t.target){let e=t.target.getBoundingClientRect(),o=n.target.getBoundingClientRect(),i=o.top-e.top,s=o.left-e.left;"y"===this.config.axis.toLowerCase()&&(s=0),"x"===this.config.axis.toLowerCase()&&(i=0);let r=window.screenX+e.left+e.width/2,a=window.screenY+e.top+e.height/2,c=e.left+e.width/2,u=e.top+e.height/2,l=document.createEvent("MouseEvents");l.initMouseEvent("mousedown",!0,!0,window,0,r,a,c,u,!1,!1,!1,!1,0,t.target);let d=document.createEvent("MouseEvents");d.initMouseEvent("mousemove",!0,!0,window,0,r+s,a+i,c+s,u+i,!1,!1,!1,!1,0,t.target);let p=document.createEvent("MouseEvents");p.initMouseEvent("mouseup",!0,!0,window,0,r+s,a+i,c+s,u+i,!1,!1,!1,!1,0,t.target),t.target.dispatchEvent(l),await this.waitTimeout(10),t.target.dispatchEvent(d),await this.waitTimeout(10),t.target.dispatchEvent(p)}}(e);case"close":return async function(e){window.close()}();case"wait":return async function(e){await x(e.waitTime)}(e);case"eval":return async function(e){return console.log("eval!",e.code),new Promise((t=>{try{e.async?(window.eval(e.code),setTimeout((()=>{t(window.eval("window.__consentCheckResult"))}),e.timeout||250)):t(window.eval(e.code))}catch(n){console.warn("eval error",n,e.code),t(!1)}}))}(e);default:throw"Unknown action type: "+e.type}}v.base=null;function x(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class A{constructor(e,t){this.name=e,this.config=t,this.methods=new Map,this.runContext=m,t.methods.forEach((e=>{e.action&&this.methods.set(e.name,e.action)})),this.hasSelfTest=!1}get isIntermediate(){return!1}checkRunContext(){return!0}async detectCmp(){return this.config.detectors.map((e=>_(e.presentMatcher))).some((e=>!!e))}async detectPopup(){return this.config.detectors.map((e=>_(e.showingMatcher))).some((e=>!!e))}async executeAction(e,t){return!this.methods.has(e)||S(this.methods.get(e),t)}async optOut(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",[]),await this.executeAction("SAVE_CONSENT"),!0}async optIn(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",["D","A","B","E","F","X"]),await this.executeAction("SAVE_CONSENT"),!0}async openCmp(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),!0}async test(){return!0}}const P=new class{constructor(e,n=null,o=null){if(this.rules=[],this.foundCmp=null,t.sendContentMessage=e,this.sendContentMessage=e,this.rules=[...k],n)this.initialize(n,o);else{o&&this.parseRules(o);e({type:"init",url:window.location.href})}}initialize(e,t){if(this.config=e,e.enabled){if(t&&this.parseRules(t),e.disabledCmps?.length>0&&this.disableCMPs(e.disabledCmps),e.enablePrehide)if(document.documentElement)this.prehideElements();else{const e=()=>{window.removeEventListener("DOMContentLoaded",e),this.prehideElements()};window.addEventListener("DOMContentLoaded",e)}if("loading"===document.readyState){const e=()=>{window.removeEventListener("DOMContentLoaded",e),this.start()};window.addEventListener("DOMContentLoaded",e)}else this.start()}}parseRules(e){Object.keys(e.consentomatic).forEach((t=>{this.addConsentomaticCMP(t,e.consentomatic[t])})),e.autoconsent.forEach((e=>{this.addCMP(e)}))}addCMP(e){this.rules.push(function(e){return new g(e)}(e))}disableCMPs(e){this.rules=this.rules.filter((t=>!e.includes(t.name)))}addConsentomaticCMP(e,t){this.rules.push(new A(`com_${e}`,t))}start(){window.requestIdleCallback?window.requestIdleCallback((()=>this._start()),{timeout:500}):this._start()}async _start(){const e=await this.findCmp(this.config.detectRetries);if(e.length>0){const t=[];for(const n of e)this.sendContentMessage({type:"cmpDetected",url:location.href,cmp:n.name}),t.push(this.waitForPopup(n).then((e=>e?(this.foundCmp||(this.foundCmp=n),this.sendContentMessage({type:"popupFound",cmp:n.name,url:location.href}),!0):Promise.reject(`${n.name} popup not found`))));let n=!1;for(const e of t)try{await e,n=!0;break}catch(e){continue}return n?"optOut"===this.config.autoAction?await this.doOptOut():"optIn"!==this.config.autoAction||await this.doOptIn():(this.config.enablePrehide&&h(),!1)}return this.config.enablePrehide&&h(),!1}async findCmp(e){const t=[];for(const e of this.rules)try{if(!e.checkRunContext())continue;await e.detectCmp()&&t.push(e)}catch(e){}if(t.length>1){const e={msg:"Found multiple CMPs, check the detection rules.",cmps:t.map((e=>e.name))};this.sendContentMessage({type:"autoconsentError",details:e})}return 0===t.length&&e>0?new Promise((t=>{setTimeout((async()=>{const n=this.findCmp(e-1);t(n)}),500)})):t}async doOptOut(){let e;return e=!!this.foundCmp&&await this.foundCmp.optOut(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optOutResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,scheduleSelfTest:this.foundCmp&&this.foundCmp.hasSelfTest,url:location.href}),e&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),e}async doOptIn(){let e;return e=!!this.foundCmp&&await this.foundCmp.optIn(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optInResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,scheduleSelfTest:!1,url:location.href}),e&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),e}async doSelfTest(){let e;return e=!!this.foundCmp&&await this.foundCmp.test(),this.sendContentMessage({type:"selfTestResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,url:location.href}),e}async waitForPopup(e,t=5,n=500){const o=await e.detectPopup();return!o&&t>0?new Promise((o=>setTimeout((()=>o(this.waitForPopup(e,t-1,n))),n))):o}prehideElements(){return function(e){return o(n("autoconsent-prehide"),e,"opacity")}(this.rules.reduce(((e,t)=>t.prehideSelectors?[...e,...t.prehideSelectors]:e),["#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"]))}async receiveMessageCallback(e){switch(e.type){case"initResp":this.initialize(e.config,e.rules);break;case"optIn":await this.doOptIn();break;case"optOut":await this.doOptOut();break;case"selfTest":await this.doSelfTest();break;case"evalResp":!function(e,n){const o=t.pending.get(e);o?(t.pending.delete(e),o.timer&&window.clearTimeout(o.timer),o.resolve(n)):console.warn("no eval #",e)}(e.id,e.result)}}}(chrome.runtime.sendMessage);chrome.runtime.onMessage.addListener((e=>Promise.resolve(P.receiveMessageCallback(e))))}();
|
|
1
|
+
!function(){"use strict";class t{constructor(t,e=1e3){this.id=t,this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),this.timer=window.setTimeout((()=>{this.reject(new Error("timeout"))}),e)}}const e={pending:new Map,sendContentMessage:null};function n(t="autoconsent-css-rules"){const e=`style#${t}`,n=document.querySelector(e);if(n&&n instanceof HTMLStyleElement)return n;{const e=document.head||document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("style");return n.id=t,e.appendChild(n),n}}function o(t,e,n="display"){const o="opacity"===n?"opacity: 0":"display: none",i=`${e.join(",")} { ${o} !important; z-index: -1 !important; pointer-events: none !important; } `;return t instanceof HTMLStyleElement&&(t.innerText+=i,e.length>0)}async function i(t,e,n){const o=await t();return!o&&e>0?new Promise((o=>{setTimeout((async()=>{o(i(t,e-1,n))}),n)})):Promise.resolve(o)}function s(t){if(!t)return!1;if(null!==t.offsetParent)return!0;{const e=window.getComputedStyle(t);if("fixed"===e.position&&"none"!==e.display)return!0}return!1}function r(n){return function(n){let o;o=crypto&&void 0!==crypto.randomUUID?crypto.randomUUID():Math.random().toString(),e.sendContentMessage({type:"eval",id:o,code:n});const i=new t(o);return e.pending.set(i.id,i),i.promise}(n).catch((t=>!1))}function c(t,e=!1){let n=[];return n="string"==typeof t?Array.from(document.querySelectorAll(t)):t,n.length>0&&(e?n.forEach((t=>t.click())):n[0].click()),n.length>0}function a(t){return null!==document.querySelector(t)}function u(t,e){const n=document.querySelectorAll(t),o=new Array(n.length);return n.forEach(((t,e)=>{o[e]=s(t)})),"none"===e?o.every((t=>!t)):0!==o.length&&("any"===e?o.some((t=>t)):o.every((t=>t)))}function l(t,e=1e4){return i((()=>null!==document.querySelector(t)),Math.ceil(e/200),200)}async function p(t,e=1e4,n=!1){return await l(t,e),c(t,n)}function d(t){return new Promise((e=>{setTimeout((()=>{e(!0)}),t)}))}function h(){const t=n("autoconsent-prehide");return t&&t.remove(),!!t}const m={main:!0,frame:!1,urlPattern:""};class f{constructor(t){this.runContext=m,this.name=t}get hasSelfTest(){throw new Error("Not Implemented")}get isIntermediate(){throw new Error("Not Implemented")}checkRunContext(){const t={...m,...this.runContext},e=window.top===window;return!(e&&!t.main)&&(!(!e&&!t.frame)&&!(t.urlPattern&&!window.location.href.match(t.urlPattern)))}detectCmp(){throw new Error("Not Implemented")}async detectPopup(){return!1}optOut(){throw new Error("Not Implemented")}optIn(){throw new Error("Not Implemented")}openCmp(){throw new Error("Not Implemented")}async test(){return Promise.resolve(!0)}}async function y(t){const e=[];if(t.exists&&e.push(a(t.exists)),t.visible&&e.push(u(t.visible,t.check)),t.eval){const n=r(t.eval);e.push(n)}var s,h;if(t.waitFor&&e.push(l(t.waitFor,t.timeout)),t.waitForVisible&&e.push(function(t,e=1e4,n="any"){return i((()=>u(t,n)),Math.ceil(e/200),200)}(t.waitForVisible,t.timeout,t.check)),t.click&&e.push(c(t.click,t.all)),t.waitForThenClick&&e.push(p(t.waitForThenClick,t.timeout,t.all)),t.wait&&e.push(d(t.wait)),t.hide&&e.push((s=t.hide,h=t.method,o(n(),s,h))),t.if){if(!t.if.exists&&!t.if.visible)return console.error("invalid conditional rule",t.if),!1;await y(t.if)?e.push(w(t.then)):t.else&&e.push(w(t.else))}if(0===e.length)return!1;return(await Promise.all(e)).reduce(((t,e)=>t&&e),!0)}async function w(t){for(const e of t){if(!await y(e)&&!e.optional)return!1}return!0}class g extends f{constructor(t){super(t.name),this.config=t,this.runContext=t.runContext||m}get hasSelfTest(){return!!this.config.test}get isIntermediate(){return!!this.config.intermediate}get prehideSelectors(){return this.config.prehideSelectors}async detectCmp(){return!!this.config.detectCmp&&async function(t){const e=t.map((t=>y(t)));return(await Promise.all(e)).every((t=>!!t))}(this.config.detectCmp)}async detectPopup(){return!!this.config.detectPopup&&w(this.config.detectPopup)}async optOut(){return!!this.config.optOut&&w(this.config.optOut)}async optIn(){return!!this.config.optIn&&w(this.config.optIn)}async openCmp(){return!!this.config.openCmp&&w(this.config.openCmp)}async test(){return this.hasSelfTest?w(this.config.test):super.test()}}const b="#truste-show-consent",C="#truste-consent-track";const k=[new class extends f{constructor(){super("TrustArc-top"),this.prehideSelectors=[".trustarc-banner-container",`.truste_popframe,.truste_overlay,.truste_box_overlay,${C}`],this.runContext={main:!0,frame:!1},this._shortcutButton=null,this._optInDone=!1}get hasSelfTest(){return!1}get isIntermediate(){return!this._optInDone&&!this._shortcutButton}async detectCmp(){const t=a(`#truste-show-consent,${C}`);return t&&(this._shortcutButton=document.querySelector("#truste-consent-required")),t}async detectPopup(){return u(`#truste-consent-content,#trustarc-banner-overlay,${C}`,"all")}openFrame(){c(b)}async optOut(){return this._shortcutButton?(this._shortcutButton.click(),!0):(o(n(),[".truste_popframe",".truste_overlay",".truste_box_overlay",C]),c(b),setTimeout((()=>{n().remove()}),1e4),!0)}async optIn(){return this._optInDone=!0,c("#truste-consent-button")}async openCmp(){return!0}async test(){return!0}},new class extends f{constructor(){super("TrustArc-frame"),this.runContext={main:!1,frame:!0,urlPattern:"^https://consent-pref\\.trustarc\\.com/\\?"}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return!0}async detectPopup(){return u("#defaultpreferencemanager","any")&&u(".mainContent","any")}async navigateToSettings(){return await i((async()=>a(".shp")||u(".advance","any")||a(".switch span:first-child")),10,500),a(".shp")&&c(".shp"),await l(".prefPanel",5e3),u(".advance","any")&&c(".advance"),await i((()=>u(".switch span:first-child","any")),5,1e3)}async optOut(){return await i((()=>"complete"===document.readyState),20,100),await l(".mainContent[aria-hidden=false]",5e3),!!c(".rejectAll")||(a(".prefPanel")&&await l('.prefPanel[style="visibility: visible;"]',3e3),c("#catDetails0")?(c(".submit"),!0):(c(".required")||(await this.navigateToSettings(),c(".switch span:nth-child(1):not(.active)",!0),c(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{c("#gwt-debug-close_id")}))),!0))}async optIn(){return c(".call")||(await this.navigateToSettings(),c(".switch span:nth-child(2)",!0),c(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{c("#gwt-debug-close_id")}))),!0}},new class extends f{constructor(){super("Cybotcookiebot"),this.prehideSelectors=["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a("#CybotCookiebotDialogBodyLevelButtonPreferences")}async detectPopup(){return a("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner")}async optOut(){return c(".cookie-alert-extended-detail-link")?(await l(".cookie-alert-configuration",2e3),c(".cookie-alert-configuration-input:checked",!0),c(".cookie-alert-extended-button-secondary"),!0):a("#dtcookie-container")?c(".h-dtcookie-decline"):(c(".cookiebot__button--settings")||c("#CybotCookiebotDialogBodyButtonDecline")||(c(".cookiebanner__link--details"),c('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled',!0),c("#CybotCookiebotDialogBodyButtonDecline"),c("input[id^=CybotCookiebotDialogBodyLevelButton]:checked",!0),a("#CybotCookiebotDialogBodyButtonAcceptSelected")?c("#CybotCookiebotDialogBodyButtonAcceptSelected"):c("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection",!0),await r("window.CookieConsent.hasResponse !== true")&&(await r("window.Cookiebot.dialog.submitConsent()"),await d(500)),a("#cb-confirmedSettings")&&await r("endCookieProcess()")),!0)}async optIn(){return a("#dtcookie-container")?c(".h-dtcookie-accept"):(c(".CybotCookiebotDialogBodyLevelButton:not(:checked):enabled",!0),c("#CybotCookiebotDialogBodyLevelButtonAccept"),c("#CybotCookiebotDialogBodyButtonAccept"),!0)}async test(){return r("window.CookieConsent.declined === true")}},new class extends f{constructor(){super("Sourcepoint-frame"),this.prehideSelectors=["div[id^='sp_message_container_'],.message-overlay","#sp_privacy_manager_container"],this.ccpaNotice=!1,this.ccpaPopup=!1,this.runContext={main:!1,frame:!0}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){const t=new URL(location.href);return t.searchParams.has("message_id")&&"ccpa-notice.sp-prod.net"===t.hostname?(this.ccpaNotice=!0,!0):"ccpa-pm.sp-prod.net"===t.hostname?(this.ccpaPopup=!0,!0):("/index.html"===t.pathname||"/privacy-manager/index.html"===t.pathname)&&(t.searchParams.has("message_id")||t.searchParams.has("requestUUID")||t.searchParams.has("consentUUID"))}async detectPopup(){return!!this.ccpaNotice||(this.ccpaPopup?await l(".priv-save-btn",2e3):(await l(".sp_choice_type_11,.sp_choice_type_12,.sp_choice_type_13,.sp_choice_type_ACCEPT_ALL",2e3),!a(".sp_choice_type_9")))}async optIn(){return await l(".sp_choice_type_11,.sp_choice_type_ACCEPT_ALL",2e3),!!c(".sp_choice_type_11")||!!c(".sp_choice_type_ACCEPT_ALL")}isManagerOpen(){return"/privacy-manager/index.html"===location.pathname}async optOut(){if(this.ccpaPopup){const t=document.querySelectorAll(".priv-purpose-container .sp-switch-arrow-block a.neutral.on .right");for(const e of t)c([e]);const e=document.querySelectorAll(".priv-purpose-container .sp-switch-arrow-block a.switch-bg.on");for(const t of e)c([t]);return c(".priv-save-btn")}if(!this.isManagerOpen()){if(!await l(".sp_choice_type_12,.sp_choice_type_13"))return!1;if(!a(".sp_choice_type_12"))return c(".sp_choice_type_13");c(".sp_choice_type_12"),await i((()=>this.isManagerOpen()),200,100)}await l(".type-modal",2e4);try{const t=".sp_choice_type_REJECT_ALL",e=".reject-toggle",n=await Promise.race([l(t,2e3).then((t=>t?0:-1)),l(e,2e3).then((t=>t?1:-1)),l(".pm-features",2e3).then((t=>t?2:-1))]);if(0===n)return await d(1e3),c(t);1===n?c(e):2===n&&(await l(".pm-features",1e4),c(".checked > span",!0),c(".chevron"))}catch(t){}return c(".sp_choice_type_SAVE_AND_EXIT")}},new class extends f{constructor(){super("consentmanager.net"),this.prehideSelectors=["#cmpbox,#cmpbox2"],this.apiAvailable=!1}get hasSelfTest(){return this.apiAvailable}get isIntermediate(){return!1}async detectCmp(){return this.apiAvailable=await r('window.__cmp && typeof __cmp("getCMPData") === "object"'),!!this.apiAvailable||a("#cmpbox")}async detectPopup(){return this.apiAvailable?(await d(500),await r("!__cmp('consentStatus').userChoiceExists")):u("#cmpbox .cmpmore","any")}async optOut(){return await d(500),this.apiAvailable?await r("__cmp('setConsent', 0)"):!!c(".cmpboxbtnno")||(a(".cmpwelcomeprpsbtn")?(c(".cmpwelcomeprpsbtn > a[aria-checked=true]",!0),c(".cmpboxbtnsave"),!0):(c(".cmpboxbtncustom"),await l(".cmptblbox",2e3),c(".cmptdchoice > a[aria-checked=true]",!0),c(".cmpboxbtnyescustomchoices"),!0))}async optIn(){return this.apiAvailable?await r("__cmp('setConsent', 1)"):c(".cmpboxbtnyes")}async test(){if(this.apiAvailable)return await r("__cmp('consentStatus').userChoiceExists")}},new class extends f{constructor(){super("Evidon")}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return a("#_evidon_banner")}async detectPopup(){return u("#_evidon_banner","any")}async optOut(){return c("#_evidon-decline-button")||(o(n(),["#evidon-prefdiag-overlay","#evidon-prefdiag-background"]),c("#_evidon-option-button"),await l("#evidon-prefdiag-overlay",5e3),c("#evidon-prefdiag-decline")),!0}async optIn(){return c("#_evidon-accept-button")}},new class extends f{constructor(){super("Onetrust"),this.prehideSelectors=["#onetrust-banner-sdk,#onetrust-consent-sdk,.onetrust-pc-dark-filter,.js-consent-banner"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a("#onetrust-banner-sdk")}async detectPopup(){return u("#onetrust-banner-sdk","all")}async optOut(){return a("#onetrust-pc-btn-handler")?c("#onetrust-pc-btn-handler"):c(".ot-sdk-show-settings,button.js-cookie-settings"),await l("#onetrust-consent-sdk",2e3),await d(1e3),c("#onetrust-consent-sdk input.category-switch-handler:checked,.js-editor-toggle-state:checked",!0),await d(1e3),await l(".save-preference-btn-handler,.js-consent-save",2e3),c(".save-preference-btn-handler,.js-consent-save"),await i((()=>u("#onetrust-banner-sdk","none")),10,500),!0}async optIn(){return c("#onetrust-accept-btn-handler,.js-accept-cookies")}async test(){return await r("window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1")}},new class extends f{constructor(){super("Klaro"),this.prehideSelectors=[".klaro"],this.settingsOpen=!1}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a(".klaro > .cookie-modal")?(this.settingsOpen=!0,!0):a(".klaro > .cookie-notice")}async detectPopup(){return u(".klaro > .cookie-notice,.klaro > .cookie-modal","any")}async optOut(){return!!c(".klaro .cn-decline")||(this.settingsOpen||(c(".klaro .cn-learn-more"),await l(".klaro > .cookie-modal",2e3),this.settingsOpen=!0),!!c(".klaro .cn-decline")||(c(".cm-purpose:not(.cm-toggle-all) > input:not(.half-checked)",!0),c(".cm-btn-accept")))}async optIn(){return!!c(".klaro .cm-btn-accept-all")||(this.settingsOpen?(c(".cm-purpose:not(.cm-toggle-all) > input.half-checked",!0),c(".cm-btn-accept")):c(".klaro .cookie-notice .cm-btn-success"))}async test(){return await r("klaro.getManager().config.services.every(c => c.required || !klaro.getManager().consents[c.name])")}},new class extends f{constructor(){super("Uniconsent")}get prehideSelectors(){return[".unic",".modal:has(.unic)"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a(".unic .unic-box,.unic .unic-bar")}async detectPopup(){return u(".unic .unic-box,.unic .unic-bar","any")}async optOut(){if(await l(".unic button",1e3),document.querySelectorAll(".unic button").forEach((t=>{const e=t.textContent;(e.includes("Manage Options")||e.includes("Optionen verwalten"))&&t.click()})),await l(".unic input[type=checkbox]",1e3)){await l(".unic button",1e3),document.querySelectorAll(".unic input[type=checkbox]").forEach((t=>{t.checked&&t.click()}));for(const t of document.querySelectorAll(".unic button")){const e=t.textContent;for(const n of["Confirm Choices","Save Choices","Auswahl speichern"])if(e.includes(n))return t.click(),await d(500),!0}}return!1}async optIn(){return p(".unic #unic-agree")}async test(){await d(1e3);return!a(".unic .unic-box,.unic .unic-bar")}},new class extends f{constructor(){super("Conversant"),this.prehideSelectors=[".cmp-root"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a(".cmp-root .cmp-receptacle")}async detectPopup(){return u(".cmp-root .cmp-receptacle","any")}async optOut(){if(!await p(".cmp-main-button:not(.cmp-main-button--primary)"))return!1;if(!await l(".cmp-view-tab-tabs"))return!1;await p(".cmp-view-tab-tabs > :first-child"),await p(".cmp-view-tab-tabs > .cmp-view-tab--active:first-child");for(const t of Array.from(document.querySelectorAll(".cmp-accordion-item"))){t.querySelector(".cmp-accordion-item-title").click(),await i((()=>!!t.querySelector(".cmp-accordion-item-content.cmp-active")),10,50);const e=t.querySelector(".cmp-accordion-item-content.cmp-active");e.querySelectorAll(".cmp-toggle-actions .cmp-toggle-deny:not(.cmp-toggle-deny--active)").forEach((t=>t.click())),e.querySelectorAll(".cmp-toggle-actions .cmp-toggle-checkbox:not(.cmp-toggle-checkbox--active)").forEach((t=>t.click()))}return await c(".cmp-main-button:not(.cmp-main-button--primary)"),!0}async optIn(){return p(".cmp-main-button.cmp-main-button--primary")}async test(){return document.cookie.includes("cmp-data=0")}},new class extends f{constructor(){super("tiktok.com"),this.runContext={urlPattern:"tiktok"}}get hasSelfTest(){return!0}get isIntermediate(){return!1}getShadowRoot(){const t=document.querySelector("tiktok-cookie-banner");return t?t.shadowRoot:null}async detectCmp(){return a("tiktok-cookie-banner")}async detectPopup(){return s(this.getShadowRoot().querySelector(".tiktok-cookie-banner"))}async optOut(){const t=this.getShadowRoot().querySelector(".button-wrapper button:first-child");return!!t&&(t.click(),!0)}async optIn(){const t=this.getShadowRoot().querySelector(".button-wrapper button:last-child");return!!t&&(t.click(),!0)}async test(){const t=document.cookie.match(/cookie-consent=([^;]+)/);if(!t)return!1;const e=JSON.parse(decodeURIComponent(t[1]));return Object.values(e).every((t=>"boolean"!=typeof t||!1===t))}},new class extends f{constructor(){super("airbnb"),this.runContext={urlPattern:"^https://(www\\.)?airbnb\\.[^/]+/"},this.prehideSelectors=["div[data-testid=main-cookies-banner-container]",'div:has(> div:first-child):has(> div:last-child):has(> section [data-testid="strictly-necessary-cookies"])']}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return a("div[data-testid=main-cookies-banner-container]")}async detectPopup(){return u("div[data-testid=main-cookies-banner-container","any")}async optOut(){let t;for(await p("div[data-testid=main-cookies-banner-container] button._snbhip0");t=document.querySelector("[data-testid=modal-container] button[aria-checked=true]:not([disabled])");)t.click();return p("button[data-testid=save-btn]")}async optIn(){return p("div[data-testid=main-cookies-banner-container] button._148dgdpk")}async test(){return await i((()=>!!document.cookie.match("OptanonAlertBoxClosed")),20,200)}}];class v{static setBase(t){v.base=t}static findElement(t,e=null,n=!1){let o=null;return o=null!=e?Array.from(e.querySelectorAll(t.selector)):null!=v.base?Array.from(v.base.querySelectorAll(t.selector)):Array.from(document.querySelectorAll(t.selector)),null!=t.textFilter&&(o=o.filter((e=>{const n=e.textContent.toLowerCase();if(Array.isArray(t.textFilter)){let e=!1;for(const o of t.textFilter)if(-1!==n.indexOf(o.toLowerCase())){e=!0;break}return e}if(null!=t.textFilter)return-1!==n.indexOf(t.textFilter.toLowerCase())}))),null!=t.styleFilters&&(o=o.filter((e=>{const n=window.getComputedStyle(e);let o=!0;for(const e of t.styleFilters){const t=n[e.option];o=e.negated?o&&t!==e.value:o&&t===e.value}return o}))),null!=t.displayFilter&&(o=o.filter((e=>t.displayFilter?0!==e.offsetHeight:0===e.offsetHeight))),null!=t.iframeFilter&&(o=o.filter((()=>t.iframeFilter?window.location!==window.parent.location:window.location===window.parent.location))),null!=t.childFilter&&(o=o.filter((e=>{const n=v.base;v.setBase(e);const o=v.find(t.childFilter);return v.setBase(n),null!=o.target}))),n?o:(o.length>1&&console.warn("Multiple possible targets: ",o,t,e),o[0])}static find(t,e=!1){const n=[];if(null!=t.parent){const o=v.findElement(t.parent,null,e);if(null!=o){if(o instanceof Array)return o.forEach((o=>{const i=v.findElement(t.target,o,e);i instanceof Array?i.forEach((t=>{n.push({parent:o,target:t})})):n.push({parent:o,target:i})})),n;{const i=v.findElement(t.target,o,e);i instanceof Array?i.forEach((t=>{n.push({parent:o,target:t})})):n.push({parent:o,target:i})}}}else{const o=v.findElement(t.target,null,e);o instanceof Array?o.forEach((t=>{n.push({parent:null,target:t})})):n.push({parent:null,target:o})}return 0===n.length&&n.push({parent:null,target:null}),e?n:(1!==n.length&&console.warn("Multiple results found, even though multiple false",n),n[0])}}function _(t){const e=v.find(t);return"css"===t.type?!!e.target:"checkbox"===t.type?!!e.target&&e.target.checked:void 0}async function S(t,e){switch(t.type){case"click":return async function(t){const e=v.find(t);null!=e.target&&e.target.click();return x(0)}(t);case"list":return async function(t,e){for(const n of t.actions)await S(n,e)}(t,e);case"consent":return async function(t,e){for(const n of t.consents){const t=-1!==e.indexOf(n.type);if(n.matcher&&n.toggleAction){_(n.matcher)!==t&&await S(n.toggleAction)}else t?await S(n.trueAction):await S(n.falseAction)}}(t,e);case"ifcss":return async function(t,e){v.find(t).target?t.falseAction&&await S(t.falseAction,e):t.trueAction&&await S(t.trueAction,e)}(t,e);case"waitcss":return async function(t){await new Promise((e=>{let n=t.retries||10;const o=t.waitTime||250,i=()=>{const s=v.find(t);(t.negated&&s.target||!t.negated&&!s.target)&&n>0?(n-=1,setTimeout(i,o)):e()};i()}))}(t);case"foreach":return async function(t,e){const n=v.find(t,!0),o=v.base;for(const o of n)o.target&&(v.setBase(o.target),await S(t.action,e));v.setBase(o)}(t,e);case"hide":return async function(t){const e=v.find(t);e.target&&e.target.classList.add("Autoconsent-Hidden")}(t);case"slide":return async function(t){const e=v.find(t),n=v.find(t.dragTarget);if(e.target){const t=e.target.getBoundingClientRect(),o=n.target.getBoundingClientRect();let i=o.top-t.top,s=o.left-t.left;"y"===this.config.axis.toLowerCase()&&(s=0),"x"===this.config.axis.toLowerCase()&&(i=0);const r=window.screenX+t.left+t.width/2,c=window.screenY+t.top+t.height/2,a=t.left+t.width/2,u=t.top+t.height/2,l=document.createEvent("MouseEvents");l.initMouseEvent("mousedown",!0,!0,window,0,r,c,a,u,!1,!1,!1,!1,0,e.target);const p=document.createEvent("MouseEvents");p.initMouseEvent("mousemove",!0,!0,window,0,r+s,c+i,a+s,u+i,!1,!1,!1,!1,0,e.target);const d=document.createEvent("MouseEvents");d.initMouseEvent("mouseup",!0,!0,window,0,r+s,c+i,a+s,u+i,!1,!1,!1,!1,0,e.target),e.target.dispatchEvent(l),await this.waitTimeout(10),e.target.dispatchEvent(p),await this.waitTimeout(10),e.target.dispatchEvent(d)}}(t);case"close":return async function(){window.close()}();case"wait":return async function(t){await x(t.waitTime)}(t);case"eval":return async function(t){return console.log("eval!",t.code),new Promise((e=>{try{t.async?(window.eval(t.code),setTimeout((()=>{e(window.eval("window.__consentCheckResult"))}),t.timeout||250)):e(window.eval(t.code))}catch(n){console.warn("eval error",n,t.code),e(!1)}}))}(t);default:throw"Unknown action type: "+t.type}}v.base=null;function x(t){return new Promise((e=>{setTimeout((()=>{e()}),t)}))}class P{constructor(t,e){this.name=t,this.config=e,this.methods=new Map,this.runContext=m,e.methods.forEach((t=>{t.action&&this.methods.set(t.name,t.action)})),this.hasSelfTest=!1}get isIntermediate(){return!1}checkRunContext(){return!0}async detectCmp(){return this.config.detectors.map((t=>_(t.presentMatcher))).some((t=>!!t))}async detectPopup(){return this.config.detectors.map((t=>_(t.showingMatcher))).some((t=>!!t))}async executeAction(t,e){return!this.methods.has(t)||S(this.methods.get(t),e)}async optOut(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",[]),await this.executeAction("SAVE_CONSENT"),!0}async optIn(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",["D","A","B","E","F","X"]),await this.executeAction("SAVE_CONSENT"),!0}async openCmp(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),!0}async test(){return!0}}const A=new class{constructor(t,n=null,o=null){if(this.rules=[],this.foundCmp=null,e.sendContentMessage=t,this.sendContentMessage=t,this.rules=[...k],n)this.initialize(n,o);else{o&&this.parseRules(o);t({type:"init",url:window.location.href})}}initialize(t,e){if(this.config=t,t.enabled){if(e&&this.parseRules(e),t.disabledCmps?.length>0&&this.disableCMPs(t.disabledCmps),t.enablePrehide)if(document.documentElement)this.prehideElements();else{const t=()=>{window.removeEventListener("DOMContentLoaded",t),this.prehideElements()};window.addEventListener("DOMContentLoaded",t)}if("loading"===document.readyState){const t=()=>{window.removeEventListener("DOMContentLoaded",t),this.start()};window.addEventListener("DOMContentLoaded",t)}else this.start()}}parseRules(t){Object.keys(t.consentomatic).forEach((e=>{this.addConsentomaticCMP(e,t.consentomatic[e])})),t.autoconsent.forEach((t=>{this.addCMP(t)}))}addCMP(t){this.rules.push(function(t){return new g(t)}(t))}disableCMPs(t){this.rules=this.rules.filter((e=>!t.includes(e.name)))}addConsentomaticCMP(t,e){this.rules.push(new P(`com_${t}`,e))}start(){window.requestIdleCallback?window.requestIdleCallback((()=>this._start()),{timeout:500}):this._start()}async _start(){const t=await this.findCmp(this.config.detectRetries);if(t.length>0){const e=[];for(const n of t)this.sendContentMessage({type:"cmpDetected",url:location.href,cmp:n.name}),e.push(this.waitForPopup(n).then((t=>t?(this.foundCmp||(this.foundCmp=n),this.sendContentMessage({type:"popupFound",cmp:n.name,url:location.href}),!0):Promise.reject(`${n.name} popup not found`))));let n=!1;for(const t of e)try{await t,n=!0;break}catch(t){continue}return n?"optOut"===this.config.autoAction?await this.doOptOut():"optIn"!==this.config.autoAction||await this.doOptIn():(this.config.enablePrehide&&h(),!1)}return this.config.enablePrehide&&h(),!1}async findCmp(t){const e=[];for(const t of this.rules)try{if(!t.checkRunContext())continue;await t.detectCmp()&&e.push(t)}catch(t){}if(e.length>1){const t={msg:"Found multiple CMPs, check the detection rules.",cmps:e.map((t=>t.name))};this.sendContentMessage({type:"autoconsentError",details:t})}return 0===e.length&&t>0?new Promise((e=>{setTimeout((async()=>{const n=this.findCmp(t-1);e(n)}),500)})):e}async doOptOut(){let t;return t=!!this.foundCmp&&await this.foundCmp.optOut(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optOutResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:t,scheduleSelfTest:this.foundCmp&&this.foundCmp.hasSelfTest,url:location.href}),t&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),t}async doOptIn(){let t;return t=!!this.foundCmp&&await this.foundCmp.optIn(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optInResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:t,scheduleSelfTest:!1,url:location.href}),t&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),t}async doSelfTest(){let t;return t=!!this.foundCmp&&await this.foundCmp.test(),this.sendContentMessage({type:"selfTestResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:t,url:location.href}),t}async waitForPopup(t,e=5,n=500){const o=await t.detectPopup();return!o&&e>0?new Promise((o=>setTimeout((()=>o(this.waitForPopup(t,e-1,n))),n))):o}prehideElements(){return function(t){return o(n("autoconsent-prehide"),t,"opacity")}(this.rules.reduce(((t,e)=>e.prehideSelectors?[...t,...e.prehideSelectors]:t),["#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"]))}async receiveMessageCallback(t){switch(t.type){case"initResp":this.initialize(t.config,t.rules);break;case"optIn":await this.doOptIn();break;case"optOut":await this.doOptOut();break;case"selfTest":await this.doSelfTest();break;case"evalResp":!function(t,n){const o=e.pending.get(t);o?(e.pending.delete(t),o.timer&&window.clearTimeout(o.timer),o.resolve(n)):console.warn("no eval #",t)}(t.id,t.result)}}}(chrome.runtime.sendMessage);chrome.runtime.onMessage.addListener((t=>Promise.resolve(A.receiveMessageCallback(t))))}();
|
|
@@ -66,10 +66,7 @@
|
|
|
66
66
|
"name": "affinity.serif.com",
|
|
67
67
|
"detectCmp": [
|
|
68
68
|
{
|
|
69
|
-
"exists": ".c-cookie-banner"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"exists": ".c-cookie-banner button"
|
|
69
|
+
"exists": ".c-cookie-banner button[data-qa='allow-all-cookies']"
|
|
73
70
|
}
|
|
74
71
|
],
|
|
75
72
|
"detectPopup": [
|
|
@@ -721,6 +718,54 @@
|
|
|
721
718
|
}
|
|
722
719
|
]
|
|
723
720
|
},
|
|
721
|
+
{
|
|
722
|
+
"name": "cookiealert",
|
|
723
|
+
"intermediate": false,
|
|
724
|
+
"prehideSelectors": [],
|
|
725
|
+
"runContext": {
|
|
726
|
+
"frame": true,
|
|
727
|
+
"main": true
|
|
728
|
+
},
|
|
729
|
+
"detectCmp": [
|
|
730
|
+
{
|
|
731
|
+
"exists": ".cookie-alert-extended"
|
|
732
|
+
}
|
|
733
|
+
],
|
|
734
|
+
"detectPopup": [
|
|
735
|
+
{
|
|
736
|
+
"visible": ".cookie-alert-extended-modal"
|
|
737
|
+
}
|
|
738
|
+
],
|
|
739
|
+
"optIn": [
|
|
740
|
+
{
|
|
741
|
+
"click": "button[data-controller='cookie-alert/extended/button/accept']"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"eval": "document.querySelector('body').removeAttribute('style') || true"
|
|
745
|
+
}
|
|
746
|
+
],
|
|
747
|
+
"optOut": [
|
|
748
|
+
{
|
|
749
|
+
"click": "a[data-controller='cookie-alert/extended/detail-link']"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"click": ".cookie-alert-configuration-input:checked",
|
|
753
|
+
"all": true,
|
|
754
|
+
"optional": true
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"click": "button[data-controller='cookie-alert/extended/button/configuration']"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"eval": "document.querySelector('body').removeAttribute('style') || true"
|
|
761
|
+
}
|
|
762
|
+
],
|
|
763
|
+
"test": [
|
|
764
|
+
{
|
|
765
|
+
"eval": "window.CookieConsent.declined === true"
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
},
|
|
724
769
|
{
|
|
725
770
|
"name": "Cookie Information Banner",
|
|
726
771
|
"prehideSelectors": [
|