@duckduckgo/autoconsent 17.3.0 → 18.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/.prettierignore +1 -0
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +90 -0
- package/dist/addon-firefox/background.bundle.js +28 -7
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +624 -54
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/popup.bundle.js +19 -7
- package/dist/addon-firefox/rule-index.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +28 -7
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +624 -54
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/popup.bundle.js +19 -7
- package/dist/addon-mv3/rule-index.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +630 -60
- package/dist/autoconsent.esm.js +630 -60
- package/dist/autoconsent.playwright.js +624 -54
- package/dist/autoconsent.standalone.js +631 -61
- package/dist/heuristics.cjs.js +621 -52
- package/dist/heuristics.mjs +609 -50
- package/dist/types/cmps/trustarc-top.d.ts +1 -0
- package/dist/types/eval-snippets.d.ts +2 -0
- package/dist/types/heuristic-classify.d.ts +2 -6
- package/dist/types/heuristic-detect.d.ts +32 -0
- package/dist/types/heuristic-literals.d.ts +1 -0
- package/dist/types/heuristic-negatives.d.ts +25 -0
- package/dist/types/heuristic-patterns.d.ts +18 -2
- package/dist/types/heuristic-prefilter.d.ts +13 -0
- package/docs/heuristic-detection.md +78 -0
- package/docs/heuristic-prefilter.md +62 -0
- package/eslint.config.mjs +16 -1
- package/lib/cmps/admiral.ts +10 -0
- package/lib/cmps/trustarc-top.ts +10 -1
- package/lib/eval-snippets.ts +9 -0
- package/lib/heuristic-classify.ts +4 -39
- package/lib/heuristic-detect.ts +209 -0
- package/lib/heuristic-literals.ts +207 -0
- package/lib/heuristic-negatives.ts +173 -0
- package/lib/heuristic-patterns.ts +104 -31
- package/lib/heuristic-prefilter.ts +40 -0
- package/lib/heuristics.ts +8 -4
- package/lib/web.ts +1 -1
- package/package.json +2 -1
- package/rules/autoconsent/adblockplus.json +94 -0
- package/rules/autoconsent/alertamodal-cookies.json +29 -0
- package/rules/autoconsent/altamar-cookieconsent.json +45 -0
- package/rules/autoconsent/autohero.json +49 -0
- package/rules/autoconsent/bing.com-notice-cosmetic.json +28 -0
- package/rules/autoconsent/bing.com-notice.json +13 -0
- package/rules/autoconsent/binogi.json +32 -0
- package/rules/autoconsent/bokio.json +32 -0
- package/rules/autoconsent/botble-cookie-consent.json +16 -0
- package/rules/autoconsent/bsgdprcookies.json +16 -0
- package/rules/autoconsent/calcolo-tools.json +23 -0
- package/rules/autoconsent/casasrurales.json +15 -0
- package/rules/autoconsent/ccoo.json +40 -0
- package/rules/autoconsent/cdu-edu-au.json +29 -0
- package/rules/autoconsent/cnmc-gob-es.json +14 -0
- package/rules/autoconsent/comparandonos.json +66 -0
- package/rules/autoconsent/consent-backdrop.json +34 -0
- package/rules/autoconsent/consilium-europa-eu.json +35 -0
- package/rules/autoconsent/cookie-accordion-settings.json +56 -0
- package/rules/autoconsent/cookies-tip-v1.json +9 -0
- package/rules/autoconsent/cookiesplus.json +20 -0
- package/rules/autoconsent/crtm.json +36 -0
- package/rules/autoconsent/dtu-findit.json +47 -0
- package/rules/autoconsent/edebe.json +22 -0
- package/rules/autoconsent/eduardolosilla.json +12 -0
- package/rules/autoconsent/educastur-alojaweb.json +13 -0
- package/rules/autoconsent/flatsome-cookies.json +25 -0
- package/rules/autoconsent/gameforge.json +42 -0
- package/rules/autoconsent/gamefound-com.json +12 -0
- package/rules/autoconsent/generalitat-catalunya.json +15 -0
- package/rules/autoconsent/hikvision.com.json +18 -0
- package/rules/autoconsent/hurra-consent.json +16 -0
- package/rules/autoconsent/ihavecookies.json +5 -1
- package/rules/autoconsent/imarina.json +25 -0
- package/rules/autoconsent/isidewith.com.json +38 -0
- package/rules/autoconsent/jobtoday.json +18 -0
- package/rules/autoconsent/kaggle.json +21 -0
- package/rules/autoconsent/landgate.json +10 -0
- package/rules/autoconsent/mblock.json +28 -0
- package/rules/autoconsent/mirasvit-gdpr.json +18 -7
- package/rules/autoconsent/mites.gob.es.json +18 -0
- package/rules/autoconsent/pakamera.json +19 -0
- package/rules/autoconsent/purecookie-cosmetic.json +13 -0
- package/rules/autoconsent/random-org.json +41 -0
- package/rules/autoconsent/react-cookie-consent-cosmetic.json +40 -0
- package/rules/autoconsent/supercontable.json +19 -0
- package/rules/autoconsent/tallink.json +13 -0
- package/rules/autoconsent/tealium.json +4 -1
- package/rules/autoconsent/tusclasesparticulares.com.json +14 -0
- package/rules/autoconsent/typo3-cookieconsent.json +9 -0
- package/rules/autoconsent/udg.edu.json +47 -0
- package/rules/autoconsent/uned-barbastro.json +58 -0
- package/rules/autoconsent/uregina.json +35 -0
- package/rules/autoconsent/vinnies-org-au.json +29 -0
- package/rules/autoconsent/vrg-bottom-cookies.json +52 -0
- package/rules/autoconsent/wiki.gg.json +1 -1
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/scripts/build-heuristic-literals.ts +24 -0
- package/scripts/required-literals.ts +177 -0
- package/tests/adblockplus.spec.ts +7 -0
- package/tests/admiral.spec.ts +5 -4
- package/tests/alertamodal-cookies.spec.ts +8 -0
- package/tests/altamar-cookieconsent.spec.ts +6 -0
- package/tests/autohero.spec.ts +3 -0
- package/tests/bing.com-notice-cosmetic.spec.ts +5 -0
- package/tests/bing.com-notice.spec.ts +6 -0
- package/tests/binogi.spec.ts +3 -0
- package/tests/bokio.spec.ts +6 -0
- package/tests/botble-cookie-consent.spec.ts +11 -0
- package/tests/bsgdprcookies.spec.ts +6 -0
- package/tests/calcolo-tools.spec.ts +3 -0
- package/tests/casasrurales.spec.ts +3 -0
- package/tests/ccoo.spec.ts +5 -0
- package/tests/cdu-edu-au.spec.ts +3 -0
- package/tests/cnmc-gob-es.spec.ts +3 -0
- package/tests/comparandonos.spec.ts +3 -0
- package/tests/consent-backdrop.spec.ts +9 -0
- package/tests/consilium-europa-eu.spec.ts +3 -0
- package/tests/cookie-accordion-settings.spec.ts +5 -0
- package/tests/cookies-tip-v1.spec.ts +3 -0
- package/tests/cookiesplus.spec.ts +6 -0
- package/tests/crtm.spec.ts +3 -0
- package/tests/dtu-findit.spec.ts +3 -0
- package/tests/edebe.spec.ts +3 -0
- package/tests/eduardolosilla.spec.ts +3 -0
- package/tests/educastur-alojaweb.spec.ts +6 -0
- package/tests/flatsome-cookies.spec.ts +3 -0
- package/tests/gameforge.spec.ts +8 -0
- package/tests/gamefound-com.spec.ts +3 -0
- package/tests/generalitat-catalunya.spec.ts +3 -0
- package/tests/hikvision.com.spec.ts +3 -0
- package/tests/hurra-consent.spec.ts +8 -0
- package/tests/ihavecookies.spec.ts +7 -1
- package/tests/imarina.spec.ts +8 -0
- package/tests/isidewith.com.spec.ts +3 -0
- package/tests/jobtoday.spec.ts +5 -0
- package/tests/kaggle.spec.ts +3 -0
- package/tests/landgate.spec.ts +3 -0
- package/tests/mblock.spec.ts +3 -0
- package/tests/mirasvit-gdpr.spec.ts +5 -0
- package/tests/mites.gob.es.spec.ts +3 -0
- package/tests/pakamera.spec.ts +5 -0
- package/tests/purecookie-cosmetic.spec.ts +8 -0
- package/tests/random-org.spec.ts +3 -0
- package/tests/react-cookie-consent-cosmetic.spec.ts +9 -0
- package/tests/supercontable.spec.ts +3 -0
- package/tests/tallink.spec.ts +3 -0
- package/tests/trustarc.spec.ts +7 -0
- package/tests/tusclasesparticulares.com.spec.ts +3 -0
- package/tests/typo3-cookieconsent.spec.ts +10 -0
- package/tests/udg.edu.spec.ts +3 -0
- package/tests/uned-barbastro.spec.ts +3 -0
- package/tests/uregina.spec.ts +3 -0
- package/tests/vinnies-org-au.spec.ts +3 -0
- package/tests/vrg-bottom-cookies.spec.ts +3 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +222 -8
- package/tests-wtr/heuristics/regex-syntax.test.ts +81 -0
- package/rules/generated/auto_CA_promessedefleurs.com_noy.json +0 -40
- package/rules/generated/auto_FR_ludum.fr_gl5.json +0 -40
- package/rules/generated/auto_FR_meillandrichardier.com_c2f.json +0 -40
- package/rules/generated/auto_NL_bonprix.nl_ovi.json +0 -40
- package/tests/generated/auto_CA_promessedefleurs.com_noy.spec.ts +0 -6
- package/tests/generated/auto_FR_ludum.fr_gl5.spec.ts +0 -2
- package/tests/generated/auto_FR_meillandrichardier.com_c2f.spec.ts +0 -6
- package/tests/generated/auto_NL_bonprix.nl_ovi.spec.ts +0 -2
|
@@ -304,6 +304,13 @@
|
|
|
304
304
|
EVAL_ADULTFRIENDFINDER_TEST: () => !!localStorage.getItem("cookieConsent"),
|
|
305
305
|
EVAL_AYLO_COOKIE_MANAGER_READY: () => !!(window.wl_cookie_consent_manager || window._Cookie_Consent_Manager_brand),
|
|
306
306
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
307
|
+
// the close handler listens for mouseup, which element.click() does not dispatch
|
|
308
|
+
EVAL_BING_NOTICE_CLOSE: () => {
|
|
309
|
+
const close = document.querySelector("#bnp_ttc_close");
|
|
310
|
+
close.dispatchEvent(new MouseEvent("mouseup", { bubbles: true, cancelable: true, view: window }));
|
|
311
|
+
close.click();
|
|
312
|
+
return true;
|
|
313
|
+
},
|
|
307
314
|
EVAL_BIGCOMMERCE_CONSENT_MANAGER_DETECT: () => !!(window.consentManager && window.consentManager.version),
|
|
308
315
|
EVAL_BORLABS_0: () => !JSON.parse(
|
|
309
316
|
decodeURIComponent(
|
|
@@ -433,6 +440,8 @@
|
|
|
433
440
|
EVAL_TEALIUM_2: () => utag.gdpr.setConsentValue(true) || true,
|
|
434
441
|
EVAL_TEALIUM_3: () => utag.gdpr.getConsentState() !== 1,
|
|
435
442
|
EVAL_TEALIUM_DONOTSELL_CHECK: () => utag.gdpr.dns?.getDnsState() !== 1,
|
|
443
|
+
// 0 means no stored decision; otherwise the user reopened the prompt themselves
|
|
444
|
+
EVAL_TEALIUM_NO_DECISION: () => utag.gdpr.getConsentState() === 0,
|
|
436
445
|
EVAL_TESTCMP_STEP: () => !!document.querySelector("#reject-all"),
|
|
437
446
|
EVAL_TESTCMP_0: () => window.results.results[0] === "button_clicked",
|
|
438
447
|
EVAL_TESTCMP_COSMETIC_0: () => window.results.results[0] === "banner_hidden",
|
|
@@ -455,18 +464,27 @@
|
|
|
455
464
|
}
|
|
456
465
|
|
|
457
466
|
// lib/heuristic-patterns.ts
|
|
467
|
+
var patternOf = (p) => p instanceof RegExp ? p : p.pattern;
|
|
468
|
+
var BY_CONTINUING_PRIVACY = /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi;
|
|
469
|
+
var ACCEPT_ALL = /accept all/gi;
|
|
470
|
+
var USE_OF_COOKIES = /use of cookies/gi;
|
|
471
|
+
var UTILISATION_DES_COOKIES = /utilisation.{0,100}des.{0,100}cookies/gi;
|
|
472
|
+
var ACCEPTEZ_UTILISATION = /acceptez.{0,100}l.{0,100}utilisation/gi;
|
|
473
|
+
var VERWENDUNG_VON_COOKIES = /verwendung.{0,100}von.{0,100}cookies/gi;
|
|
474
|
+
var DE_COOKIE_VERB = /\b(?:nutzen|nutzt|verwenden|verwendet|setzen|setzt|benutzen|benutzt|speichert|platzieren)\b(?: \S+){0,4} cookies\b/gi;
|
|
475
|
+
var GEBRUIK_VAN_COOKIES = /gebruik.{0,100}van.{0,100}cookies/gi;
|
|
458
476
|
var DETECT_PATTERNS = [
|
|
459
477
|
/accept cookies/gi,
|
|
460
|
-
|
|
478
|
+
ACCEPT_ALL,
|
|
461
479
|
/reject all/gi,
|
|
462
480
|
/only necessary cookies/gi,
|
|
463
481
|
// "only necessary" is probably too broad
|
|
464
482
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
465
|
-
|
|
483
|
+
BY_CONTINUING_PRIVACY,
|
|
466
484
|
// up to two qualifiers are common: "optional", "essential", "analytics", "google analytics", "third party", ...
|
|
467
485
|
/we (?:use|serve)(?: \w+){0,2} cookies/gi,
|
|
468
486
|
/we are using cookies/gi,
|
|
469
|
-
|
|
487
|
+
USE_OF_COOKIES,
|
|
470
488
|
/website uses cookies to enhance your browsing experience/gi,
|
|
471
489
|
/(?:this|our) (?:web)?site.{0,100}cookies/gi,
|
|
472
490
|
/cookies (?:and|or) .{0,100} technologies/gi,
|
|
@@ -477,6 +495,33 @@
|
|
|
477
495
|
/we.{0,100}store.{0,100}information.{0,100}such as.{0,100}cookies/gi,
|
|
478
496
|
/store and\/or access information.{0,100}on a device/gi,
|
|
479
497
|
/personalised ads and content, ad and content measurement/gi,
|
|
498
|
+
// TCF wording: "store and/or access information", "and our partners ask for your consent", "we and our N partners"
|
|
499
|
+
/\b(?:store|stores|storing) and\/or access(?:ing)? information\b/gi,
|
|
500
|
+
/\band our partners ask for your consent\b/gi,
|
|
501
|
+
/\bwe and (?:our|up to) (?:\d+ )?(?:partners|vendors)\b/gi,
|
|
502
|
+
// a partner count, in each language: "our 186 partners", "unseren 107 Partnern", "nuestros 1064 socios"
|
|
503
|
+
/\b(?:our|unseren|onze|nos|nuestros|i nostri) \d{2,4} (?:partners|partnern|partner|partenaires|socios|vendors|fornitori)\b/gi,
|
|
504
|
+
/\b\d{2,4} iab[- ]partner/gi,
|
|
505
|
+
// "technologies like cookies", in each language
|
|
506
|
+
/\btechnolog(?:ies|ien|ieën|ías|ie) (?:like|such as|wie|zoals|como(?: las)?|telles que(?: les)?|come(?: i)?) cookies?\b/gi,
|
|
507
|
+
/\buses (?:\S+ ){0,2}cookies\b/gi,
|
|
508
|
+
/\b(?:like|want) to (?:use|set) (?:\S+ ){0,2}cookies\b/gi,
|
|
509
|
+
/\b(?:optional|additional|non-essential) cookies\b/gi,
|
|
510
|
+
/\bstoring of cookies\b|\bplaced cookies\b/gi,
|
|
511
|
+
/\b(?:store|stores) and access (?:data|information) on your device\b|\baccess and store (?:data|information) on your device\b/gi,
|
|
512
|
+
/\bwe use (?:\S+ ){1,4}cookies\b/gi,
|
|
513
|
+
// US privacy notices: opt-out sentences, not the footer link labels
|
|
514
|
+
/\byou (?:can|may) opt[- ]out of (?:the |this )?(?:sale|sharing|use|selling)\b/gi,
|
|
515
|
+
/\b(?:if you wish to|to) opt[- ]out of the sale\b/gi,
|
|
516
|
+
/\bthis website or its third[- ]party tools (?:process|use)\b/gi,
|
|
517
|
+
/["“]?(?:share|sell)["”]? or ["“]?(?:sell|share)["”]? (?:your )?(?:personal )?information\b/gi,
|
|
518
|
+
/\bresidents have (?:certain )?rights with regard to the sale\b/gi,
|
|
519
|
+
/\bwe use technologies (?:on this website )?(?:that may )?(?:to )?collect\b/gi,
|
|
520
|
+
// pay-or-consent walls
|
|
521
|
+
/\bcontinue reading with advertising\b|\b(?:with|mit) (?:advertising|werbung) (?:and|und) tracking\b/gi,
|
|
522
|
+
/\bconsent and continue\b/gi,
|
|
523
|
+
// preference centres are often in the page but hidden, so popup text only
|
|
524
|
+
{ pattern: /\bstore or retrieve information on your browser\b|\bstockées dans votre navigateur ou récupérées\b/gi, input: "popup" },
|
|
480
525
|
// it might be tempting to add the patterns below, but they cause too many false positives. Don't do it :)
|
|
481
526
|
// /cookies? settings/i,
|
|
482
527
|
// /cookies? preferences/i,
|
|
@@ -492,26 +537,32 @@
|
|
|
492
537
|
/consentement.{0,100}à.{0,100}tout.{0,100}moment/gi,
|
|
493
538
|
/votre.{0,100}consentement/gi,
|
|
494
539
|
/accepter.{0,100}tout/gi,
|
|
495
|
-
|
|
540
|
+
UTILISATION_DES_COOKIES,
|
|
496
541
|
/cookies.{0,100}ou.{0,100}technologies/gi,
|
|
497
|
-
|
|
542
|
+
ACCEPTEZ_UTILISATION,
|
|
498
543
|
/continuer sans accepter/gi,
|
|
499
544
|
/tout refuser/gi,
|
|
500
545
|
/(?:refuser|rejeter) tous les cookies/gi,
|
|
501
|
-
|
|
546
|
+
// not "je refuse d'…" in a headline
|
|
547
|
+
/je refuse(?! d['’e])/gi,
|
|
502
548
|
/refuser et continuer/gi,
|
|
503
549
|
/refuser les cookies/gi,
|
|
504
550
|
/seulement nécessaires/gi,
|
|
505
551
|
/je désactive les finalités non essentielles/gi,
|
|
506
552
|
/cookies essentiels uniquement/gi,
|
|
507
553
|
/nécessaires uniquement/gi,
|
|
554
|
+
/\b(?:stocker|stockons) et\/ou (?:accéder|accédons)\b/gi,
|
|
555
|
+
/\bnos partenaires demandent votre consentement\b/gi,
|
|
556
|
+
/\bconsentez à l.utilisation (?:de |des )?cookies\b|\bdépôt (?:de|des) cookies\b/gi,
|
|
557
|
+
/\bles cookies nous permettent\b|\bnos partenaires et nous(?:-mêmes)?\b/gi,
|
|
558
|
+
/\baccepter (?:&|et) fermer\b/gi,
|
|
508
559
|
// DE
|
|
509
560
|
/wir.{0,100}verwenden.{0,100}cookies/gi,
|
|
510
561
|
/wir.{0,100}und.{0,100}unsere.{0,100}partner/gi,
|
|
511
|
-
/zugriff
|
|
562
|
+
/zugriff auf informationen auf/gi,
|
|
512
563
|
/inhalte.{0,100}messung.{0,100}von.{0,100}werbeleistung.{0,100}und/gi,
|
|
513
564
|
/cookies.{0,100}und.{0,100}andere/gi,
|
|
514
|
-
|
|
565
|
+
VERWENDUNG_VON_COOKIES,
|
|
515
566
|
/wir.{0,100}nutzen.{0,100}cookies/gi,
|
|
516
567
|
/verwendet.{0,100}cookies/gi,
|
|
517
568
|
/sie.{0,100}können.{0,100}ihre.{0,100}auswahl/gi,
|
|
@@ -524,8 +575,20 @@
|
|
|
524
575
|
/nur funktionale cookies akzeptieren/gi,
|
|
525
576
|
/optionale ablehnen/gi,
|
|
526
577
|
/zustimmung verweigern/gi,
|
|
578
|
+
/\bspeichern und\/oder (?:zugreifen|abrufen)\b/gi,
|
|
579
|
+
/\bunsere partner bitten um ihre zustimmung\b/gi,
|
|
580
|
+
DE_COOKIE_VERB,
|
|
581
|
+
/\b(?:werden|wird) (?:\S+ ){0,3}cookies (?:verwendet|eingesetzt|gesetzt|genutzt)\b/gi,
|
|
582
|
+
/\bcookies? zum einsatz\b|\beinsatz von cookies\b/gi,
|
|
583
|
+
/\beinverstanden\b.{0,60}\bcookies\b|\bcookies\b.{0,80}\beinverstanden\b/gi,
|
|
584
|
+
/\b(?:alle|alles) (?:cookies |optionalen \S+ )?(?:akzeptieren|zulassen|erlauben|zustimmen)\b/gi,
|
|
585
|
+
/\bzustimmen und weiter\b|\bweiter,? ohne zu (?:akzeptieren|zustimmen)\b/gi,
|
|
586
|
+
/\b(?:einwilligung|zustimmung) (?:zu|zur|in die) (?:\S+ )?cookies\b|\bcookie-(?:zustimmung|einwilligung)\b/gi,
|
|
587
|
+
/\btracking-technologien\b/gi,
|
|
588
|
+
/\bakzeptier\w* (?:du |sie )?(?:die )?verwendung (?:\S+ )?cookies\b/gi,
|
|
589
|
+
/\bmit werbetracking weiterlesen\b|\bweiter mit werbung\b|\bcon tracking e annunci\b/gi,
|
|
527
590
|
// NL
|
|
528
|
-
|
|
591
|
+
GEBRUIK_VAN_COOKIES,
|
|
529
592
|
/(?:we|wij).{0,100}gebruiken.{0,100}cookies.{0,100}om/gi,
|
|
530
593
|
/cookies.{0,100}en.{0,100}vergelijkbare/gi,
|
|
531
594
|
/(?:alles|cookies).{0,100}(?:afwijzen|weigeren|verwerpen)/gi,
|
|
@@ -535,6 +598,13 @@
|
|
|
535
598
|
/doorgaan zonder (?:te accepteren|akkoord te gaan)/gi,
|
|
536
599
|
/alleen.{0,100}(?:optionele|functionele|functioneel|noodzakelijke|essentiële).{0,100}cookies/gi,
|
|
537
600
|
/wijs alles af/gi,
|
|
601
|
+
/\b(?:op te slaan en\/of te (?:raadplegen|openen|lezen)|opslaan en\/of (?:openen|raadplegen|lezen)|slaan informatie\b.{0,60}\bop en\/of)\b/gi,
|
|
602
|
+
/\bonze partners vragen om (?:jouw|uw|je) toestemming\b/gi,
|
|
603
|
+
/\bwij en onze (?:\d+ )?partners\b/gi,
|
|
604
|
+
/\b(?:gebruiken|gebruikt|plaatsen|plaatst)\b(?: \S+){0,3} cookies\b/gi,
|
|
605
|
+
/\baccepteer (?:alles|alle cookies)\b/gi,
|
|
606
|
+
// Dutch words only: "tracking cookies" and "marketing cookies" are also English prose and footer links
|
|
607
|
+
/\b(?:analytische|functionele|essentiële|noodzakelijke) cookies\b/gi,
|
|
538
608
|
// Spanish (ES)
|
|
539
609
|
/(si|al) contin[úu]a[sr]?( navegando)?.{0,100} cookie/gi,
|
|
540
610
|
/(usamos|utilizar?|utilizamos)( (tanto|las))?.{0,20}cookie/gi,
|
|
@@ -551,6 +621,15 @@
|
|
|
551
621
|
/nosotros y nuestros( \d+)? (socios|proveedores).{0,180} cookies/gi,
|
|
552
622
|
/recopilamos y almacenamos datos de usted y de su dispositivo/gi,
|
|
553
623
|
/utilizamos tecnolog[ií]as como las cookies/gi,
|
|
624
|
+
/\b(?:almacenar|almacenamos) y\/o (?:acceder|accedemos)\b/gi,
|
|
625
|
+
/\bnuestros socios solicitan su consentimiento\b/gi,
|
|
626
|
+
/\b(?:tanto nosotros como|nosotros y) nuestros (?:\d+ )?socios\b/gi,
|
|
627
|
+
/\b(?:aceptar|rechazar) todas\b|\bcontinuar sin aceptar\b|\bsolo las necesarias\b/gi,
|
|
628
|
+
/\bacept\w* (?:\S+ ){0,3}uso de (?:las )?cookies\b/gi,
|
|
629
|
+
/\bcookies (?:técnicas|analíticas|propias|de terceros|opcionales|necesarias)\b/gi,
|
|
630
|
+
/\blas cookies nos (?:ayudan|permiten)\b/gi,
|
|
631
|
+
/\b(?:instalamos|empleamos)\b(?: \S+){0,4} cookies\b/gi,
|
|
632
|
+
/\bacept(?:a|ar|as)? (?:el uso de |las )?(?:\S+ )?cookies\b|\bnecesitamos usar cookies\b/gi,
|
|
554
633
|
// Polish (PL)
|
|
555
634
|
// examples:
|
|
556
635
|
// wykorzystuje pliki cookie (uses cookies)
|
|
@@ -579,10 +658,11 @@
|
|
|
579
658
|
// Catalan (CA)
|
|
580
659
|
/cookies pròpies i de tercers/gi,
|
|
581
660
|
/utilitzem galetes/gi,
|
|
582
|
-
|
|
661
|
+
/únicament utilitza galetes pròpies amb finalitat tècnica\b/gi,
|
|
583
662
|
/este lloc web utilitza només cookies tècniques necessàries per al seu funcionament/gi,
|
|
584
663
|
/utilitza cookies tècniques,\s*de personalització i anàlisi/gi,
|
|
585
664
|
/utilitzem cookies i altres tecnologies/gi,
|
|
665
|
+
/\b(?:utilitz\w*|fa servir|fem servir|usem)\b(?: \S+){0,3} (?:cookies|galetes)\b/gi,
|
|
586
666
|
// Basque (EU)
|
|
587
667
|
/cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu/gi,
|
|
588
668
|
/cookie propioak eta hirugarrenen cookieak erabiltzen ditugu/gi,
|
|
@@ -612,7 +692,18 @@
|
|
|
612
692
|
/(?:usiamo|utilizziamo).{0,20}cookie/gi,
|
|
613
693
|
/sito.{0,50}(?:usa|utilizza).{0,20}cookie/gi,
|
|
614
694
|
/noi e i nostri.{0,20}partner.{0,100}cookie/gi,
|
|
615
|
-
|
|
695
|
+
/\b(?:utilizziamo|usiamo|impieghiamo|installiamo)\b(?: \S+){0,3} cookies?\b/gi,
|
|
696
|
+
/\b(?:utilizza|utilizzano|usa|usano|impiega|installa|fa uso di)\b(?: \S+){0,3} cookies?\b/gi,
|
|
697
|
+
/\bcookies? (?:tecnici|di profilazione|di terze parti|analitici|statistici|di marketing)\b/gi,
|
|
698
|
+
/\b(?:acconsent|accett)\w*\b.{0,40}\b(?:uso|utilizzo|installazione)\b.{0,15}\bcookies?\b/gi,
|
|
699
|
+
/\b(?:continuando|proseguendo)(?: la| nella)? navigazione\b.{0,80}\b(?:accett|acconsent)\w*/gi,
|
|
700
|
+
/\b(?:accetta|accetto|accettare|rifiuta|rifiuto|rifiutare)(?: tutti| tutto)\b/gi,
|
|
701
|
+
/\b(?:continua|prosegui|chiudi) senza accettare\b/gi,
|
|
702
|
+
/\brifiuta e abbonati\b/gi,
|
|
703
|
+
/\bconsenso (?:all.(?:uso|utilizzo) (?:dei |di )?)?cookies?\b/gi,
|
|
704
|
+
/\b(?:insieme ai|con i) nostri (?:\d+ )?partner\b/gi,
|
|
705
|
+
/\bterze parti selezionate\b/gi,
|
|
706
|
+
/\b(?:archiviare|archiviamo|memorizzare|memorizziamo) e\/o (?:accedere|accediamo)\b/gi,
|
|
616
707
|
// Swedish (SV)
|
|
617
708
|
// e.g. "vi använder cookies", "vi använder spårningstekniker såsom cookies", "webbplatsen använder kakor"
|
|
618
709
|
/(?:vi|webbplatsen|webbplats|sajten|sidan)\s+använder.{0,60}(?:cookies|kakor)/gi,
|
|
@@ -867,26 +958,12 @@
|
|
|
867
958
|
// Russian (RU): paywall/subscription wording, e.g. "отказаться от подписки", "оплатить"
|
|
868
959
|
/подписатьс|подписк|оплатит|оплачива/is
|
|
869
960
|
];
|
|
870
|
-
var DETECT_NEVER_MATCH_PATTERNS = [
|
|
871
|
-
// e.g. "age verification", "age confirmation", "age check", "age gate", "age restriction"
|
|
872
|
-
/age\s+(?:verification|confirmation|check|gate|restriction)/i,
|
|
873
|
-
// e.g. "over 18 years", "at least 21 years", "older than 21", "18+"
|
|
874
|
-
/(?:over|above|at\s*least|minimum|older\s+than)\s*(?:18|21)\s*(?:years|yo|y\.?o\.?|\+)?/i,
|
|
875
|
-
// e.g. "18 years of age", "18+ years old", "21 years or older"
|
|
876
|
-
/(?:18|21)\s*(?:\+|years?)\s*(?:of\s*age|or\s*older|or\s*above)/i,
|
|
877
|
-
// e.g. "I am 18+", "I am over 18", "I'm 21 or older"
|
|
878
|
-
/(?:i'?m|i\s*am)\s*(?:over|above|at\s*least)?\s*(?:18|21)(?:\+|\s*(?:or\s*older|years))?/i,
|
|
879
|
-
// e.g. "you must be 18", "users must be at least 21", "visitors must be over 18"
|
|
880
|
-
/(?:you|users?|visitors?)\s+must\s+be\s+(?:over|above|at\s*least)?\s*(?:18|21)/i,
|
|
881
|
-
// e.g. "adult oriented material", "adult content", "adult-only website"
|
|
882
|
-
/adult[\s-]+(?:oriented|only|content|material|websites?)/i
|
|
883
|
-
];
|
|
884
961
|
var SETTINGS_PATTERNS = [
|
|
885
962
|
// Multilingual "open customization" patterns: a customization verb next to a
|
|
886
963
|
// cookie/preference/settings/options/details/purposes noun (both word orders).
|
|
887
964
|
// The negative lookahead avoids policy links and save/confirm/accept phrases (those are accept/acknowledge/other).
|
|
888
|
-
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)
|
|
889
|
-
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b(.{0,14}\W)?(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)
|
|
965
|
+
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)(?!\w).{0,20}(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b/is,
|
|
966
|
+
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b(.{0,14}\W)?(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)(?!\w)/is,
|
|
890
967
|
// settings noun + cookies, e.g. "paramètres des cookies", "ajustes de cookies", "instellingen voor cookies en diensten"
|
|
891
968
|
/^(paramètres|préférences|réglages|ajustes|opciones|elección|preferencias|instellingen)( (de|des|les|voor|van))? cookies( (et des|en|y) (services|diensten|servicios))?$/is,
|
|
892
969
|
"settings",
|
|
@@ -1242,41 +1319,518 @@
|
|
|
1242
1319
|
"\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"
|
|
1243
1320
|
];
|
|
1244
1321
|
|
|
1245
|
-
// lib/heuristic-
|
|
1322
|
+
// lib/heuristic-negatives.ts
|
|
1323
|
+
var COOKIE_CHOICE = [
|
|
1324
|
+
"\\b(?:accept|reject|decline|refuse|deny|allow|manage|customi[sz]e)\\b[^\\n]{0,25}\\bcookies?\\b",
|
|
1325
|
+
"\\b(?:reject|decline|deny|refuse) all\\b",
|
|
1326
|
+
"\\b(?:essential|necessary|required) (?:cookies )?only\\b|\\bonly (?:essential|necessary|required)\\b",
|
|
1327
|
+
"\\bcookies? (?:notice|settings|preferences|banner)\\b",
|
|
1328
|
+
"\\b(?:alle )?(?:cookies )?ablehnen\\b",
|
|
1329
|
+
"\\b(?:alles |alle cookies )?(?:weigeren|weiger|afwijzen)\\b",
|
|
1330
|
+
"\\b(?:tout )?refuser\\b",
|
|
1331
|
+
"\\brechazar(?: todas?)?\\b",
|
|
1332
|
+
"\\brifiuta(?: tutti)?\\b",
|
|
1333
|
+
// purposes and vendors as a button or heading line: some consent dialogs ask "under 18?"
|
|
1334
|
+
"^[^\\n]{0,40}\\b(?:purposes|finalit\xE9s|prop\xF3sitos|zwecke|doeleinden|finalit\xE0|vendors|fournisseurs|proveedores|leveranciers|fornitori)(?!\\w)[^\\n]{0,10}$",
|
|
1335
|
+
"\\b(?:legitimate (?:business )?interest|int\xE9r\xEAt l\xE9gitime|inter\xE9s leg\xEDtimo|berechtigtes interesse|gerechtvaardigd belang|legittimo interesse)\\b",
|
|
1336
|
+
"\\b(?:we|nous|wir|wij|noi|nosotros) (?:and|et|und|en|e|y) (?:our|nos|unsere|onze|i nostri|nuestros) (?:\\d+ )?(?:partners|partenaires|partner|socios)\\b"
|
|
1337
|
+
].join("|");
|
|
1338
|
+
var BARE_ACCEPT = [
|
|
1339
|
+
"\\b(?:accept|allow) all\\b",
|
|
1340
|
+
"\\b(?:alle )?(?:cookies )?(?:akzeptieren|erlauben|zulassen)\\b",
|
|
1341
|
+
"\\b(?:alles |alle cookies )?(?:accepteren|accepteer|toestaan)\\b",
|
|
1342
|
+
"\\b(?:tout )?accepter\\b",
|
|
1343
|
+
"\\baceptar(?: todas?)?\\b",
|
|
1344
|
+
"\\baccetta(?: tutti)?\\b"
|
|
1345
|
+
].join("|");
|
|
1346
|
+
var COOKIE_CHOICE_RE = new RegExp(COOKIE_CHOICE, "im");
|
|
1347
|
+
var CONSENT_CHOICE = new RegExp(`${COOKIE_CHOICE}|${BARE_ACCEPT}`, "im");
|
|
1348
|
+
var AGE_WORDING = new RegExp(
|
|
1349
|
+
[
|
|
1350
|
+
"\\b(?:over|above|at least|older than|minimum(?: age of)?)\\s*(?:18|21|eighteen)\\b",
|
|
1351
|
+
// "18+" only with age words after it: a bare "18+" also appears in cookie banners on adult sites
|
|
1352
|
+
"\\b(?:18|21)\\+?\\s*(?:years?(?: of age| old)?|yo|or older|or over)\\b",
|
|
1353
|
+
"\\b(?:you|users?|visitors?) must be (?:over |above |at least )?(?:18|21)\\b",
|
|
1354
|
+
"\\b(?:i'?m|i am) (?:over |at least )?(?:18|21)\\b",
|
|
1355
|
+
"\\bage (?:verification|confirmation|check|gate|restriction)\\b",
|
|
1356
|
+
"\\b(?:adults? only|adult[\\s-](?:oriented|content|material|website)|legal age|age of majority|not a minor|minors)\\b",
|
|
1357
|
+
"\\b(?:18|21) jahre\\b",
|
|
1358
|
+
"\\balters(?:beschr\xE4nkung|best\xE4tigung|verifikation|pr\xFCfung|kontrolle)",
|
|
1359
|
+
"\\b(?:vollj\xE4hrig|f\xFCr erwachsene|minderj\xE4hrige)\\b",
|
|
1360
|
+
"\\b(?:18|21) jaar\\b",
|
|
1361
|
+
"\\b(?:volwassenen|meerderjarig|minderjarigen|leeftijdsverificatie)\\b",
|
|
1362
|
+
"\\b(?:18|21) ans\\b",
|
|
1363
|
+
// no \\b before an accented letter: without the u flag it is not a word character
|
|
1364
|
+
"\\b(?:pour adultes|v\xE9rification de l.\xE2ge|mineurs)\\b|\xE2ge l\xE9gal\\b",
|
|
1365
|
+
"\\b(?:18|21) a\xF1os\\b",
|
|
1366
|
+
"\\b(?:mayor(?:es)? de edad|menores de edad|para adultos|verificaci\xF3n de edad)\\b",
|
|
1367
|
+
"\\b(?:18|21) anni\\b",
|
|
1368
|
+
"\\b(?:maggiorenne|minorenni|per adulti)\\b|\\bverifica dell.et\xE0(?!\\w)"
|
|
1369
|
+
].join("|"),
|
|
1370
|
+
"i"
|
|
1371
|
+
);
|
|
1372
|
+
var DISMISS_LINE = /^\s*(?:(?:yes,? )?(?:i )?(?:ok(?:ay)?|accept|agree|allow|decline|deny|reject|refuse|understand|acknowledge(?: the use of cookies)?|got it|understood)(?: all)?(?:,? (?:and|&) (?:continue|close))?(?: non-essential)?|close|dismiss|akzeptieren|zustimmen|verstanden|einverstanden|ablehnen|accepteren|akkoord|weigeren|accepter|j.accepte|d.accord|refuser|fermer|aceptar|acepto|rechazar|entendido|accetto|accetta|rifiuta|ho capito|chiudi)\s*[!.]?\s*$/im;
|
|
1373
|
+
var DISMISS_END = /[.!?]\s+(?:ok(?:ay)?|got it|i agree|accept)\s*!?\s*$|\[\s*[x×]\s*\]|^\s*[x×✕]\s*$/im;
|
|
1374
|
+
var NOTICE_CONTROL = new RegExp(`${CONSENT_CHOICE.source}|${DISMISS_LINE.source}|${DISMISS_END.source}`, "im");
|
|
1375
|
+
var LEAVE_LINE = /^\s*(?:(?:no,? )?(?:i )?(?:want to )?(?:leave|exit|verlassen|quitter|sortir|salir|abandonar|esci|uscire|verlaten)\b[^\n]{0,30}|no,? take me away|(?:seite|hier) verlassen|(?:i am|i'm|ich bin|ik ben|je suis|soy|sono) (?:under|unter|onder|jonger dan|menor de(?: edad)?|minorenne|mineur)\b[^\n]{0,10})\s*[!.]?\s*$/im;
|
|
1376
|
+
var NOTICE_OWN_CONTROL = new RegExp(
|
|
1377
|
+
[
|
|
1378
|
+
"\\bcookies? verwalten\\b|\\bcookie-?(?:einstellungen|pr\xE4ferenzen)\\b|\\beinstellungen verwalten\\b",
|
|
1379
|
+
"\\bconfigura(?:r|ci\xF3n de)(?: las)? cookies\\b|\\bgestionar(?: las)? cookies\\b|\\bpersonalizar(?: las)? cookies\\b",
|
|
1380
|
+
"\\bparam[\xE9e]trer(?: les)? cookies\\b|\\bparam[\xE8e]tres(?: des)? cookies\\b|\\bg[\xE9e]rer(?: les)? cookies\\b|\\bpersonnaliser(?: les)? cookies\\b",
|
|
1381
|
+
"\\bgestisci(?: i)? cookie|\\bimpostazioni(?: dei| sui)? cookie|\\bpersonalizza(?: i)? cookie",
|
|
1382
|
+
"\\bcookie-?instellingen\\b|\\bcookies? beheren\\b|\\bvoorkeuren (?:beheren|aanpassen)\\b",
|
|
1383
|
+
"^\\s*(?:customi[sz]e|personnaliser|param\xE9trer|personalizar|configurar|personalizza|anpassen|aanpassen|meer opties|more options|weitere optionen|plus d.options|m\xE1s opciones|altre opzioni|manage (?:options|preferences|choices))\\s*$",
|
|
1384
|
+
"^\\s*close (?:this|the) (?:popup|banner|notice|message)\\s*$"
|
|
1385
|
+
].join("|"),
|
|
1386
|
+
"im"
|
|
1387
|
+
);
|
|
1388
|
+
var ageGateUnless = (control) => (text) => !LEAVE_LINE.test(text) && (control.test(text) || NOTICE_OWN_CONTROL.test(text));
|
|
1389
|
+
var CONSENT_WORDS = /cookie|consent|track|partner|personali[sz]|advertis|analytic|privacy (?:options|choices|settings|rights)|do not sell|opt[- ]out/i;
|
|
1390
|
+
var LEGAL_AGREEMENT = /\b(?:end[- ]user licen[cs]e agreement|licen[cs]e agreement|limitation of liability|governing law|indemnif\w*|hereunder|disclaimers? of warrant\w*|warrant(?:y|ies) of merchantability)\b/i;
|
|
1391
|
+
var DETECT_CONTEXT_NEGATIVES = [
|
|
1392
|
+
// popups with their own age confirmation are age gates, even when they mention cookies; a bare accept doesn't count
|
|
1393
|
+
// as a cookie choice here, since it may confirm the age
|
|
1394
|
+
{ name: "age-gate-popup", pattern: AGE_WORDING, unless: ageGateUnless(COOKIE_CHOICE_RE), whole: true, input: "popup" },
|
|
1395
|
+
// a license or terms agreement may mention cookies, and its decline button must not be clicked as a cookie reject
|
|
1396
|
+
{ name: "legal-agreement", pattern: LEGAL_AGREEMENT, whole: true, input: "popup" },
|
|
1397
|
+
// page text next to an age gate, unless a consent control is there too
|
|
1398
|
+
{ name: "age-gate", pattern: AGE_WORDING, unless: ageGateUnless(NOTICE_CONTROL), lines: [4, 5], input: "page" },
|
|
1399
|
+
// terms of use need cookie or consent wording; a privacy-policy-only notice needs that or a button
|
|
1400
|
+
{
|
|
1401
|
+
name: "terms-without-consent",
|
|
1402
|
+
pattern: /\bterms\b|\bconditions\b/i,
|
|
1403
|
+
unless: CONSENT_WORDS,
|
|
1404
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
name: "privacy-without-control",
|
|
1408
|
+
unless: new RegExp(`${CONSENT_WORDS.source}|${DISMISS_LINE.source}`, "im"),
|
|
1409
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1410
|
+
},
|
|
1411
|
+
// a cookie policy link among short footer link lines
|
|
1412
|
+
{
|
|
1413
|
+
name: "footer-link",
|
|
1414
|
+
pattern: /^[^.!?:\n]{0,60}\n[\s]*\n?[^.!?:\s][^.!?:\n]{0,59}(?:\n|$)/,
|
|
1415
|
+
unless: NOTICE_CONTROL,
|
|
1416
|
+
lines: [0, 2],
|
|
1417
|
+
input: "page",
|
|
1418
|
+
appliesTo: [USE_OF_COOKIES, VERWENDUNG_VON_COOKIES, UTILISATION_DES_COOKIES, GEBRUIK_VAN_COOKIES]
|
|
1419
|
+
},
|
|
1420
|
+
// "accept all" in prose; case-sensitive since button labels run together in innerText
|
|
1421
|
+
{
|
|
1422
|
+
name: "accept-all-prose",
|
|
1423
|
+
pattern: /\baccept all [a-z]|\baccept All[a-z]/,
|
|
1424
|
+
unless: /accept all (?:cookies|and|&)/i,
|
|
1425
|
+
window: 15,
|
|
1426
|
+
appliesTo: [ACCEPT_ALL]
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
name: "acceptez-terms",
|
|
1430
|
+
pattern: /conditions (?:générales )?d.utilisation|\bcgu\b/i,
|
|
1431
|
+
unless: /cookie|témoin|traceur|partenaire/i,
|
|
1432
|
+
appliesTo: [ACCEPTEZ_UTILISATION]
|
|
1433
|
+
},
|
|
1434
|
+
// the same sentence is also a footer line with only a "learn more" link
|
|
1435
|
+
{ name: "de-cookie-verb-needs-control", unless: NOTICE_CONTROL, lines: [1, 6], input: "page", appliesTo: [DE_COOKIE_VERB] }
|
|
1436
|
+
];
|
|
1437
|
+
|
|
1438
|
+
// lib/heuristic-literals.ts
|
|
1439
|
+
var DETECT_PATTERN_LITERALS = [
|
|
1440
|
+
["accept cookies"],
|
|
1441
|
+
["accept all"],
|
|
1442
|
+
["reject all"],
|
|
1443
|
+
["only necessary cookies"],
|
|
1444
|
+
[],
|
|
1445
|
+
[],
|
|
1446
|
+
[" cookies"],
|
|
1447
|
+
["we are using cookies"],
|
|
1448
|
+
["use of cookies"],
|
|
1449
|
+
["website uses cookies to enhance your browsing experience"],
|
|
1450
|
+
["cookies"],
|
|
1451
|
+
[" technologies"],
|
|
1452
|
+
["such as cookies"],
|
|
1453
|
+
["read more about"],
|
|
1454
|
+
["consent to"],
|
|
1455
|
+
["we and our partners"],
|
|
1456
|
+
["information"],
|
|
1457
|
+
["store and/or access information"],
|
|
1458
|
+
["personalised ads and content, ad and content measurement"],
|
|
1459
|
+
[" and/or access"],
|
|
1460
|
+
["and our partners ask for your consent"],
|
|
1461
|
+
["we and "],
|
|
1462
|
+
["partners", "partnern", "partner", "partenaires", "socios", "vendors", "fornitori"],
|
|
1463
|
+
["partner"],
|
|
1464
|
+
["technolog"],
|
|
1465
|
+
["cookies"],
|
|
1466
|
+
["cookies"],
|
|
1467
|
+
["optional", "additional", "non-essential"],
|
|
1468
|
+
["storing of cookies", "placed cookies"],
|
|
1469
|
+
[" on your device", "access and store "],
|
|
1470
|
+
["we use "],
|
|
1471
|
+
["out of "],
|
|
1472
|
+
["out of the sale"],
|
|
1473
|
+
["this website or its third"],
|
|
1474
|
+
["information"],
|
|
1475
|
+
["rights with regard to the sale"],
|
|
1476
|
+
["we use technologies "],
|
|
1477
|
+
["continue reading with advertising", " tracking"],
|
|
1478
|
+
["consent and continue"],
|
|
1479
|
+
["store or retrieve information on your browser", "stock\xE9es dans votre navigateur ou r\xE9cup\xE9r\xE9es"],
|
|
1480
|
+
["utilisons"],
|
|
1481
|
+
["cookies"],
|
|
1482
|
+
["consentement"],
|
|
1483
|
+
["partenaires"],
|
|
1484
|
+
["publicit\xE9s"],
|
|
1485
|
+
["utilise"],
|
|
1486
|
+
["utilisent"],
|
|
1487
|
+
["stocker"],
|
|
1488
|
+
["consentement"],
|
|
1489
|
+
["consentement"],
|
|
1490
|
+
["accepter"],
|
|
1491
|
+
["utilisation"],
|
|
1492
|
+
["technologies"],
|
|
1493
|
+
["utilisation"],
|
|
1494
|
+
["continuer sans accepter"],
|
|
1495
|
+
["tout refuser"],
|
|
1496
|
+
[" tous les cookies"],
|
|
1497
|
+
["je refuse"],
|
|
1498
|
+
["refuser et continuer"],
|
|
1499
|
+
["refuser les cookies"],
|
|
1500
|
+
["seulement n\xE9cessaires"],
|
|
1501
|
+
["je d\xE9sactive les finalit\xE9s non essentielles"],
|
|
1502
|
+
["cookies essentiels uniquement"],
|
|
1503
|
+
["n\xE9cessaires uniquement"],
|
|
1504
|
+
["stocker", "stockons"],
|
|
1505
|
+
["nos partenaires demandent votre consentement"],
|
|
1506
|
+
["consentez \xE0 l", " cookies"],
|
|
1507
|
+
["les cookies nous permettent", "nos partenaires et nous"],
|
|
1508
|
+
["accepter "],
|
|
1509
|
+
["verwenden"],
|
|
1510
|
+
["partner"],
|
|
1511
|
+
["zugriff auf informationen auf"],
|
|
1512
|
+
["werbeleistung"],
|
|
1513
|
+
["cookies"],
|
|
1514
|
+
["verwendung"],
|
|
1515
|
+
["cookies"],
|
|
1516
|
+
["verwendet"],
|
|
1517
|
+
["auswahl"],
|
|
1518
|
+
["technologien"],
|
|
1519
|
+
["verwenden"],
|
|
1520
|
+
["ablehnen"],
|
|
1521
|
+
["zus\xE4tzliche", "essenzielle", "funktionale", "notwendige", "erforderliche"],
|
|
1522
|
+
["einwilligung", "zustimmung", "cookies"],
|
|
1523
|
+
["ablehnen"],
|
|
1524
|
+
["nur funktionale cookies akzeptieren"],
|
|
1525
|
+
["optionale ablehnen"],
|
|
1526
|
+
["zustimmung verweigern"],
|
|
1527
|
+
["speichern und/oder "],
|
|
1528
|
+
["unsere partner bitten um ihre zustimmung"],
|
|
1529
|
+
[" cookies"],
|
|
1530
|
+
["cookies "],
|
|
1531
|
+
[" zum einsatz", "einsatz von cookies"],
|
|
1532
|
+
["einverstanden", "einverstanden"],
|
|
1533
|
+
["akzeptieren", "zulassen", "erlauben", "zustimmen"],
|
|
1534
|
+
["zustimmen und weiter", " ohne zu "],
|
|
1535
|
+
["einwilligung", "zustimmung", "zustimmung", "einwilligung"],
|
|
1536
|
+
["tracking-technologien"],
|
|
1537
|
+
["verwendung "],
|
|
1538
|
+
["mit werbetracking weiterlesen", "weiter mit werbung", "con tracking e annunci"],
|
|
1539
|
+
["gebruik"],
|
|
1540
|
+
["gebruiken"],
|
|
1541
|
+
["vergelijkbare"],
|
|
1542
|
+
["afwijzen", "weigeren", "verwerpen"],
|
|
1543
|
+
["noodzakelijk"],
|
|
1544
|
+
["cookies weigeren"],
|
|
1545
|
+
["weiger"],
|
|
1546
|
+
["doorgaan zonder "],
|
|
1547
|
+
["optionele", "functionele", "functioneel", "noodzakelijke", "essenti\xEBle"],
|
|
1548
|
+
["wijs alles af"],
|
|
1549
|
+
[],
|
|
1550
|
+
["onze partners vragen om "],
|
|
1551
|
+
["wij en onze "],
|
|
1552
|
+
[" cookies"],
|
|
1553
|
+
["accepteer "],
|
|
1554
|
+
["analytische", "functionele", "essenti\xEBle", "noodzakelijke"],
|
|
1555
|
+
[" contin"],
|
|
1556
|
+
["cookie"],
|
|
1557
|
+
[" uso de cookies"],
|
|
1558
|
+
["usa cookies de google"],
|
|
1559
|
+
[" uso de cookies"],
|
|
1560
|
+
["al utilizar nuestro sitio web"],
|
|
1561
|
+
["almacenar la informaci\xF3n en un dispositivo y"],
|
|
1562
|
+
[" utiliza"],
|
|
1563
|
+
["cookies propias y de"],
|
|
1564
|
+
["son necesarias"],
|
|
1565
|
+
[" cookie"],
|
|
1566
|
+
["navegando"],
|
|
1567
|
+
["nosotros y nuestros"],
|
|
1568
|
+
["recopilamos y almacenamos datos de usted y de su dispositivo"],
|
|
1569
|
+
["utilizamos tecnolog"],
|
|
1570
|
+
["almacenar", "almacenamos"],
|
|
1571
|
+
["nuestros socios solicitan su consentimiento"],
|
|
1572
|
+
["tanto nosotros como", "nosotros y"],
|
|
1573
|
+
["aceptar", "rechazar", "continuar sin aceptar", "solo las necesarias"],
|
|
1574
|
+
["uso de "],
|
|
1575
|
+
["cookies "],
|
|
1576
|
+
["las cookies nos "],
|
|
1577
|
+
["instalamos", "empleamos"],
|
|
1578
|
+
["cookies", "necesitamos usar cookies"],
|
|
1579
|
+
[" cookie"],
|
|
1580
|
+
["u\u017Cywa\u0107", "u\u017Cywamy"],
|
|
1581
|
+
["cele przetwarzania twoich danych przez zaufanych partner\xF3w iab"],
|
|
1582
|
+
["dzi\u0119ki "],
|
|
1583
|
+
[" plik\xF3w cookie"],
|
|
1584
|
+
["korzystamy z technologii, takich jak pliki cookie"],
|
|
1585
|
+
["korzystamy"],
|
|
1586
|
+
["niekt\xF3re pliki cookies"],
|
|
1587
|
+
["pliki cookies i pokrewne im technologie umo\u017Cliwiaj\u0105 poprawne dzia\u0142anie strony i pomagaj\u0105 nam dostosowa\u0107 ofert\u0119 do twoich potrzeb"],
|
|
1588
|
+
["przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich"],
|
|
1589
|
+
["przechowywanie plik\xF3w cookie na swoim urz\u0105dzeniu"],
|
|
1590
|
+
["przechowywa\u0107 i uzyskiwa\u0107 dost\u0119p do informacji na twoich urz\u0105dzeniach"],
|
|
1591
|
+
["przetwarzamy"],
|
|
1592
|
+
[" u\u017Cywa "],
|
|
1593
|
+
["ta strona korzysta z ciasteczek"],
|
|
1594
|
+
["uzyskujemy dost\u0119p i przechowujemy informacje na urz\u0105dzeniu"],
|
|
1595
|
+
["u\u017Cywa plik"],
|
|
1596
|
+
["u\u017Cywamy plik\xF3w"],
|
|
1597
|
+
["wykorzystuj\u0105 "],
|
|
1598
|
+
["za pomoc\u0105 plik\xF3w cookies"],
|
|
1599
|
+
["zgod\u0105 my i nasi partnerzy mo\u017Cemy wykorzystywa\u0107 precyzyjne dane geolokalizacyjne i identyfikacj\u0119"],
|
|
1600
|
+
["cookies pr\xF2pies i de tercers"],
|
|
1601
|
+
["utilitzem galetes"],
|
|
1602
|
+
["\xFAnicament utilitza galetes pr\xF2pies amb finalitat t\xE8cnica"],
|
|
1603
|
+
["este lloc web utilitza nom\xE9s cookies t\xE8cniques necess\xE0ries per al seu funcionament"],
|
|
1604
|
+
["de personalitzaci\xF3 i an\xE0lisi"],
|
|
1605
|
+
["utilitzem cookies i altres tecnologies"],
|
|
1606
|
+
["cookies", "galetes"],
|
|
1607
|
+
["cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1608
|
+
["cookie propioak eta hirugarrenen cookieak erabiltzen ditugu"],
|
|
1609
|
+
["cookie propioak eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1610
|
+
["ak erabiltzen ditu"],
|
|
1611
|
+
["cookieak erabiltzen ditu"],
|
|
1612
|
+
[" bazkideek cookieak eta identifikadoreak erabiltzen ditugu"],
|
|
1613
|
+
["norberaren eta hirugarrenen cookie"],
|
|
1614
|
+
["web orri honek cookieak erabiltzen ditu"],
|
|
1615
|
+
["webgune honek cookie propioak eta hirugarrenen cookie-fitxategiak erabiltzen ditu"],
|
|
1616
|
+
["empregamos cookies propias"],
|
|
1617
|
+
["este portal emprega cookies propias ou de terceiros con fins anal\xEDticos"],
|
|
1618
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1619
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1620
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1621
|
+
["\u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438"],
|
|
1622
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1623
|
+
[],
|
|
1624
|
+
["usiamo", "utilizziamo"],
|
|
1625
|
+
["cookie"],
|
|
1626
|
+
["noi e i nostri"],
|
|
1627
|
+
[" cookie"],
|
|
1628
|
+
[" cookie"],
|
|
1629
|
+
["tecnici", "di profilazione", "di terze parti", "analitici", "statistici", "di marketing"],
|
|
1630
|
+
["acconsent", "accett"],
|
|
1631
|
+
[" navigazione"],
|
|
1632
|
+
["accetta", "accetto", "accettare", "rifiuta", "rifiuto", "rifiutare"],
|
|
1633
|
+
[" senza accettare"],
|
|
1634
|
+
["rifiuta e abbonati"],
|
|
1635
|
+
["consenso "],
|
|
1636
|
+
[" nostri "],
|
|
1637
|
+
["terze parti selezionate"],
|
|
1638
|
+
["archiviare", "archiviamo", "memorizzare", "memorizziamo"],
|
|
1639
|
+
["anv\xE4nder"],
|
|
1640
|
+
["cookie", "\u30AF\u30C3\u30AD\u30FC"],
|
|
1641
|
+
["bruger cookies"],
|
|
1642
|
+
["informasjonskapsler", "cookies"]
|
|
1643
|
+
];
|
|
1644
|
+
|
|
1645
|
+
// lib/heuristic-prefilter.ts
|
|
1646
|
+
function literalIndex(all) {
|
|
1647
|
+
const distinct = [...new Set(all)].sort((a, b) => b.length - a.length);
|
|
1648
|
+
if (distinct.length === 0) {
|
|
1649
|
+
return { present: () => /* @__PURE__ */ new Set() };
|
|
1650
|
+
}
|
|
1651
|
+
const escape = (l) => l.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
1652
|
+
const any = new RegExp(`(?=(${distinct.map(escape).join("|")}))`, "g");
|
|
1653
|
+
const implies = /* @__PURE__ */ new Map();
|
|
1654
|
+
const impliedBy = (m) => {
|
|
1655
|
+
let list = implies.get(m);
|
|
1656
|
+
if (!list) {
|
|
1657
|
+
list = distinct.filter((l) => m.startsWith(l));
|
|
1658
|
+
implies.set(m, list);
|
|
1659
|
+
}
|
|
1660
|
+
return list;
|
|
1661
|
+
};
|
|
1662
|
+
return {
|
|
1663
|
+
present(lower) {
|
|
1664
|
+
const found = /* @__PURE__ */ new Set();
|
|
1665
|
+
for (const m of lower.matchAll(any)) {
|
|
1666
|
+
if (!found.has(m[1])) {
|
|
1667
|
+
impliedBy(m[1]).forEach((l) => found.add(l));
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
return found;
|
|
1671
|
+
}
|
|
1672
|
+
};
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
// lib/heuristic-detect.ts
|
|
1246
1676
|
var TEXT_LIMIT = 1e5;
|
|
1247
|
-
|
|
1248
|
-
|
|
1677
|
+
var DEFAULT_WINDOW = 150;
|
|
1678
|
+
var builtinLiterals;
|
|
1679
|
+
function literalsOf(pattern) {
|
|
1680
|
+
if (!builtinLiterals) {
|
|
1681
|
+
const fresh = DETECT_PATTERN_LITERALS.length === DETECT_PATTERNS.length;
|
|
1682
|
+
builtinLiterals = new Map(fresh ? DETECT_PATTERNS.map((p, i) => [patternOf(p), DETECT_PATTERN_LITERALS[i]]) : []);
|
|
1683
|
+
}
|
|
1684
|
+
return builtinLiterals.get(pattern) ?? [];
|
|
1685
|
+
}
|
|
1686
|
+
var index;
|
|
1687
|
+
var literalsIn = (lower) => (index ??= literalIndex(DETECT_PATTERN_LITERALS.flat())).present(lower);
|
|
1688
|
+
var truncate = (text) => (text || "").slice(0, TEXT_LIMIT);
|
|
1689
|
+
var forInput = (scoped, input) => !scoped.input || scoped.input === input;
|
|
1690
|
+
var stateless = (re) => new RegExp(re.source, re.flags.replace(/[gy]/g, ""));
|
|
1691
|
+
function toPredicate(test) {
|
|
1692
|
+
if (typeof test === "function") {
|
|
1693
|
+
return test;
|
|
1694
|
+
}
|
|
1695
|
+
const re = stateless(test);
|
|
1696
|
+
return (text) => re.test(text);
|
|
1697
|
+
}
|
|
1698
|
+
var compiledPatterns = /* @__PURE__ */ new WeakMap();
|
|
1699
|
+
var compiledNegatives = /* @__PURE__ */ new WeakMap();
|
|
1700
|
+
function compilePatterns(detectPatterns) {
|
|
1701
|
+
let compiled = compiledPatterns.get(detectPatterns);
|
|
1702
|
+
if (!compiled) {
|
|
1703
|
+
compiled = detectPatterns.map((p) => {
|
|
1704
|
+
const pattern = patternOf(p);
|
|
1705
|
+
const input = p instanceof RegExp ? void 0 : p.input;
|
|
1706
|
+
const global = pattern.flags.includes("g") ? pattern : new RegExp(pattern.source, `${pattern.flags}g`);
|
|
1707
|
+
return { id: pattern.toString(), pattern, global, input, literals: literalsOf(pattern) };
|
|
1708
|
+
});
|
|
1709
|
+
compiledPatterns.set(detectPatterns, compiled);
|
|
1710
|
+
}
|
|
1711
|
+
return compiled;
|
|
1712
|
+
}
|
|
1713
|
+
function compileNegatives(negatives) {
|
|
1714
|
+
let compiled = compiledNegatives.get(negatives);
|
|
1715
|
+
if (!compiled) {
|
|
1716
|
+
compiled = negatives.map((n) => {
|
|
1717
|
+
const pattern = n.pattern ? stateless(n.pattern) : null;
|
|
1718
|
+
const unless = n.unless ? toPredicate(n.unless) : null;
|
|
1719
|
+
return {
|
|
1720
|
+
...n,
|
|
1721
|
+
hits: (context) => (!pattern || pattern.test(context)) && !(unless && unless(context)),
|
|
1722
|
+
applies: n.appliesTo ? new Set(n.appliesTo.map(String)) : null
|
|
1723
|
+
};
|
|
1724
|
+
});
|
|
1725
|
+
compiledNegatives.set(negatives, compiled);
|
|
1726
|
+
}
|
|
1727
|
+
return compiled;
|
|
1728
|
+
}
|
|
1729
|
+
function negativeContext(text, start, end, negative) {
|
|
1730
|
+
if (negative.whole) {
|
|
1731
|
+
return text;
|
|
1732
|
+
}
|
|
1733
|
+
if (negative.lines === void 0) {
|
|
1734
|
+
const w = negative.window ?? DEFAULT_WINDOW;
|
|
1735
|
+
return text.slice(Math.max(0, start - w), end + w);
|
|
1736
|
+
}
|
|
1737
|
+
const lineEnd = (i) => {
|
|
1738
|
+
const next = text.indexOf("\n", i);
|
|
1739
|
+
return next === -1 ? text.length : next;
|
|
1740
|
+
};
|
|
1741
|
+
const [before, after] = Array.isArray(negative.lines) ? negative.lines : [negative.lines, negative.lines];
|
|
1742
|
+
let from = start > 0 ? text.lastIndexOf("\n", start - 1) + 1 : 0;
|
|
1743
|
+
let to = lineEnd(end);
|
|
1744
|
+
for (let i = 0; i < before; i++) {
|
|
1745
|
+
from = from >= 2 ? text.lastIndexOf("\n", from - 2) + 1 : 0;
|
|
1746
|
+
}
|
|
1747
|
+
for (let i = 0; i < after; i++) {
|
|
1748
|
+
to = to < text.length ? lineEnd(to + 1) : to;
|
|
1749
|
+
}
|
|
1750
|
+
return text.slice(from, to);
|
|
1751
|
+
}
|
|
1752
|
+
function checkHeuristicPatterns(allText, input, options = {}) {
|
|
1753
|
+
return matchHeuristicPatterns(allText, input, options, false);
|
|
1754
|
+
}
|
|
1755
|
+
function hasHeuristicPatterns(allText, input, options = {}) {
|
|
1756
|
+
return matchHeuristicPatterns(allText, input, options, true).patterns.length > 0;
|
|
1757
|
+
}
|
|
1758
|
+
function matchHeuristicPatterns(allText, input, { patterns: detectPatterns = DETECT_PATTERNS, negatives = DETECT_CONTEXT_NEGATIVES }, firstOnly) {
|
|
1759
|
+
if (input !== void 0 && input !== "popup" && input !== "page") {
|
|
1760
|
+
const got = Array.isArray(input) ? "a pattern list (pass it as the `patterns` option)" : JSON.stringify(input);
|
|
1761
|
+
throw new TypeError(`heuristic input must be 'popup', 'page' or undefined, got ${got}`);
|
|
1762
|
+
}
|
|
1763
|
+
allText = truncate(allText);
|
|
1249
1764
|
const patterns = [];
|
|
1250
1765
|
const snippets2 = [];
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1766
|
+
const suppressed = [];
|
|
1767
|
+
const applicable = compileNegatives(negatives).filter((n) => forInput(n, input));
|
|
1768
|
+
let present;
|
|
1769
|
+
const wholeHits = /* @__PURE__ */ new Map();
|
|
1770
|
+
const hitsAt = (n, start, end) => {
|
|
1771
|
+
if (!n.whole) {
|
|
1772
|
+
return n.hits(negativeContext(allText, start, end, n));
|
|
1773
|
+
}
|
|
1774
|
+
let hit = wholeHits.get(n);
|
|
1775
|
+
if (hit === void 0) {
|
|
1776
|
+
hit = n.hits(allText);
|
|
1777
|
+
wholeHits.set(n, hit);
|
|
1778
|
+
}
|
|
1779
|
+
return hit;
|
|
1780
|
+
};
|
|
1781
|
+
for (const d of compilePatterns(detectPatterns)) {
|
|
1782
|
+
if (!forInput(d, input)) {
|
|
1783
|
+
continue;
|
|
1784
|
+
}
|
|
1785
|
+
if (d.literals.length) {
|
|
1786
|
+
const inText = present ??= literalsIn(allText.toLowerCase());
|
|
1787
|
+
if (!d.literals.some((l) => inText.has(l))) {
|
|
1788
|
+
continue;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
const own = applicable.filter((n) => !n.applies || n.applies.has(d.id));
|
|
1792
|
+
const matched = [];
|
|
1793
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
1794
|
+
let found = false;
|
|
1795
|
+
let kept = own.length === 0;
|
|
1796
|
+
for (const m of allText.matchAll(d.global)) {
|
|
1797
|
+
found = true;
|
|
1798
|
+
if (!kept) {
|
|
1799
|
+
const start = m.index ?? 0;
|
|
1800
|
+
const hit = own.find((n) => hitsAt(n, start, start + m[0].length));
|
|
1801
|
+
if (hit) {
|
|
1802
|
+
dropped.add(hit.name);
|
|
1803
|
+
} else {
|
|
1804
|
+
kept = true;
|
|
1258
1805
|
}
|
|
1259
1806
|
}
|
|
1807
|
+
if (kept && firstOnly) {
|
|
1808
|
+
break;
|
|
1809
|
+
}
|
|
1810
|
+
matched.push(m[0].substring(0, 200));
|
|
1260
1811
|
}
|
|
1812
|
+
if (!found) {
|
|
1813
|
+
continue;
|
|
1814
|
+
}
|
|
1815
|
+
if (!kept) {
|
|
1816
|
+
dropped.forEach((negative) => suppressed.push({ pattern: d.id, negative }));
|
|
1817
|
+
continue;
|
|
1818
|
+
}
|
|
1819
|
+
patterns.push(d.id);
|
|
1820
|
+
if (firstOnly) {
|
|
1821
|
+
break;
|
|
1822
|
+
}
|
|
1823
|
+
snippets2.push(...matched);
|
|
1261
1824
|
}
|
|
1262
|
-
return { patterns, snippets: snippets2 };
|
|
1263
|
-
}
|
|
1264
|
-
function hasHeuristicPatterns(allText, detectPatterns = DETECT_PATTERNS) {
|
|
1265
|
-
const text = allText.slice(0, TEXT_LIMIT);
|
|
1266
|
-
return detectPatterns.some((p) => text.search(p) !== -1);
|
|
1825
|
+
return { patterns, snippets: snippets2, suppressed };
|
|
1267
1826
|
}
|
|
1827
|
+
|
|
1828
|
+
// lib/heuristic-classify.ts
|
|
1268
1829
|
function classifyButtons(buttons) {
|
|
1269
1830
|
for (const button of buttons) {
|
|
1270
1831
|
button.regexClassification = classifyButtonTextRegex(button.text);
|
|
1271
1832
|
}
|
|
1272
1833
|
}
|
|
1273
|
-
function isExcludedPopup(popupText, excludePatterns = DETECT_NEVER_MATCH_PATTERNS) {
|
|
1274
|
-
if (!popupText) {
|
|
1275
|
-
return false;
|
|
1276
|
-
}
|
|
1277
|
-
const truncated = popupText.slice(0, TEXT_LIMIT);
|
|
1278
|
-
return excludePatterns.some((p) => p.test(truncated));
|
|
1279
|
-
}
|
|
1280
1834
|
function classifyPopup(buttons) {
|
|
1281
1835
|
const { reject, settings, accept, acknowledge } = buttons.reduce(
|
|
1282
1836
|
(acc, button) => {
|
|
@@ -1339,6 +1893,8 @@
|
|
|
1339
1893
|
// lib/heuristics.ts
|
|
1340
1894
|
var BUTTON_LIKE_ELEMENT_SELECTOR = 'button, input[type="button"], input[type="submit"], a, [role="button"], [class*="button"]';
|
|
1341
1895
|
var POPUP_SEARCH_MAX_TIME = 100;
|
|
1896
|
+
var FRAGMENT_NEGATIVES = DETECT_CONTEXT_NEGATIVES.filter((n) => !n.whole);
|
|
1897
|
+
var hasFragmentPatterns = (text) => hasHeuristicPatterns(text, "popup", { negatives: FRAGMENT_NEGATIVES });
|
|
1342
1898
|
var ACCEPTED_LEVELS = {
|
|
1343
1899
|
off: [],
|
|
1344
1900
|
reject: ["reject"],
|
|
@@ -1374,7 +1930,7 @@
|
|
|
1374
1930
|
let result = consentPopups.get(popup);
|
|
1375
1931
|
if (result === void 0) {
|
|
1376
1932
|
const popupText = popup.text.trim();
|
|
1377
|
-
result = !!popupText &&
|
|
1933
|
+
result = !!popupText && hasHeuristicPatterns(popupText, "popup");
|
|
1378
1934
|
consentPopups.set(popup, result);
|
|
1379
1935
|
}
|
|
1380
1936
|
return result;
|
|
@@ -1511,7 +2067,7 @@
|
|
|
1511
2067
|
}
|
|
1512
2068
|
function toPopupRoot(el, shadowHosts) {
|
|
1513
2069
|
const text = getElementText(el);
|
|
1514
|
-
if (!text || !
|
|
2070
|
+
if (!text || !hasFragmentPatterns(text)) {
|
|
1515
2071
|
return null;
|
|
1516
2072
|
}
|
|
1517
2073
|
const popup = toPopupData(el, shadowHosts, text);
|
|
@@ -1532,7 +2088,7 @@
|
|
|
1532
2088
|
return null;
|
|
1533
2089
|
}
|
|
1534
2090
|
function expandPopupFragment(popup, shadowHosts) {
|
|
1535
|
-
if (
|
|
2091
|
+
if (hasFragmentPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
|
|
1536
2092
|
return popup;
|
|
1537
2093
|
}
|
|
1538
2094
|
const parent = getComposedParent(popup.element);
|
|
@@ -2120,6 +2676,7 @@
|
|
|
2120
2676
|
var popupContent = "#truste-consent-content";
|
|
2121
2677
|
var bannerOverlay = "#trustarc-banner-overlay";
|
|
2122
2678
|
var bannerContainer = "#truste-consent-track";
|
|
2679
|
+
var prefCenterDeclineAll = [".truste_popframe.trustarc_newcm_container", 'button[data-button-key="decline_all"]'];
|
|
2123
2680
|
var TrustArcTop = class extends AutoConsentCMPBase {
|
|
2124
2681
|
constructor(autoconsentInstance) {
|
|
2125
2682
|
super(autoconsentInstance);
|
|
@@ -2131,12 +2688,13 @@
|
|
|
2131
2688
|
};
|
|
2132
2689
|
this._shortcutButton = null;
|
|
2133
2690
|
this._optInDone = false;
|
|
2691
|
+
this._optOutDone = false;
|
|
2134
2692
|
}
|
|
2135
2693
|
get hasSelfTest() {
|
|
2136
2694
|
return true;
|
|
2137
2695
|
}
|
|
2138
2696
|
get isIntermediate() {
|
|
2139
|
-
if (this._optInDone) {
|
|
2697
|
+
if (this._optInDone || this._optOutDone) {
|
|
2140
2698
|
return false;
|
|
2141
2699
|
}
|
|
2142
2700
|
return !this._shortcutButton;
|
|
@@ -2161,6 +2719,10 @@
|
|
|
2161
2719
|
}
|
|
2162
2720
|
hideElements(getStyleElement(), `.truste_popframe, .truste_overlay, .truste_box_overlay, ${bannerContainer}`);
|
|
2163
2721
|
await this.click(cookieSettingsButton);
|
|
2722
|
+
if (await this.waitForElement(prefCenterDeclineAll, 3e3)) {
|
|
2723
|
+
this._optOutDone = true;
|
|
2724
|
+
await this.click(prefCenterDeclineAll);
|
|
2725
|
+
}
|
|
2164
2726
|
setTimeout(() => {
|
|
2165
2727
|
getStyleElement().remove();
|
|
2166
2728
|
}, 1e4);
|
|
@@ -2839,6 +3401,14 @@
|
|
|
2839
3401
|
async optOut() {
|
|
2840
3402
|
const rejectAllSelector = "xpath///button[contains(., 'Afvis alle') or contains(., 'Reject all') or contains(., 'Odbaci sve') or contains(., 'Rechazar todo') or contains(., 'Atmesti visus') or contains(., 'Odm\xEDtnout v\u0161e') or contains(., '\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7 \u03CC\u03BB\u03C9\u03BD') or contains(., 'Rejeitar tudo') or contains(., 'T\xFCm\xFCn\xFC reddet') or contains(., '\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0432\u0441\u0435') or contains(., 'Noraid\u012Bt visu') or contains(., 'Avvisa alla') or contains(., 'Odrzu\u0107 wszystkie') or contains(., 'Alles afwijzen') or contains(., '\u041E\u0442\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435 \u043D\u0430 \u0432\u0441\u0438\u0447\u043A\u0438') or contains(., 'Rifiuta tutto') or contains(., 'Zavrni vse') or contains(., 'Az \xF6sszes elutas\xEDt\xE1sa') or contains(., 'Respinge\u021Bi tot') or contains(., 'Alles ablehnen') or contains(., 'Tout rejeter') or contains(., 'Odmietnu\u0165 v\u0161etko') or contains(., 'L\xFCkka k\xF5ik tagasi') or contains(., 'Hylk\xE4\xE4 kaikki')]";
|
|
2841
3403
|
if (await this.waitForElement(rejectAllSelector, 500)) {
|
|
3404
|
+
const rejectButton = this.elementSelector(rejectAllSelector)[0];
|
|
3405
|
+
if (rejectButton.disabled) {
|
|
3406
|
+
const cardBody = rejectButton.closest("div[class*=CardHeader]")?.parentElement?.querySelector("div[class*=CardBody]");
|
|
3407
|
+
if (cardBody) {
|
|
3408
|
+
cardBody.scrollTop = cardBody.scrollHeight;
|
|
3409
|
+
}
|
|
3410
|
+
await waitFor(() => !rejectButton.disabled, 10, 200);
|
|
3411
|
+
}
|
|
2842
3412
|
return await this.click(rejectAllSelector);
|
|
2843
3413
|
}
|
|
2844
3414
|
const vrmCloseButton = this.getVrmCloseButton();
|
|
@@ -3455,7 +4025,7 @@
|
|
|
3455
4025
|
detectHeuristics() {
|
|
3456
4026
|
if (this.config.enableHeuristicDetection) {
|
|
3457
4027
|
this.config.performanceLoggingEnabled && performance.mark("detectHeuristicsStart");
|
|
3458
|
-
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "");
|
|
4028
|
+
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "", "page");
|
|
3459
4029
|
if (patterns.length > 0 && (patterns.length !== this.state.heuristicPatterns.length || this.state.heuristicPatterns.some((p, i) => p !== patterns[i]))) {
|
|
3460
4030
|
this.config.logs.lifecycle && console.log("Heuristic patterns found", patterns, snippets2);
|
|
3461
4031
|
this.updateState({ heuristicPatterns: patterns, heuristicSnippets: snippets2 });
|