@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
package/dist/autoconsent.esm.js
CHANGED
|
@@ -310,6 +310,13 @@ var snippets = {
|
|
|
310
310
|
EVAL_ADULTFRIENDFINDER_TEST: () => !!localStorage.getItem("cookieConsent"),
|
|
311
311
|
EVAL_AYLO_COOKIE_MANAGER_READY: () => !!(window.wl_cookie_consent_manager || window._Cookie_Consent_Manager_brand),
|
|
312
312
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
313
|
+
// the close handler listens for mouseup, which element.click() does not dispatch
|
|
314
|
+
EVAL_BING_NOTICE_CLOSE: () => {
|
|
315
|
+
const close = document.querySelector("#bnp_ttc_close");
|
|
316
|
+
close.dispatchEvent(new MouseEvent("mouseup", { bubbles: true, cancelable: true, view: window }));
|
|
317
|
+
close.click();
|
|
318
|
+
return true;
|
|
319
|
+
},
|
|
313
320
|
EVAL_BIGCOMMERCE_CONSENT_MANAGER_DETECT: () => !!(window.consentManager && window.consentManager.version),
|
|
314
321
|
EVAL_BORLABS_0: () => !JSON.parse(
|
|
315
322
|
decodeURIComponent(
|
|
@@ -439,6 +446,8 @@ var snippets = {
|
|
|
439
446
|
EVAL_TEALIUM_2: () => utag.gdpr.setConsentValue(true) || true,
|
|
440
447
|
EVAL_TEALIUM_3: () => utag.gdpr.getConsentState() !== 1,
|
|
441
448
|
EVAL_TEALIUM_DONOTSELL_CHECK: () => utag.gdpr.dns?.getDnsState() !== 1,
|
|
449
|
+
// 0 means no stored decision; otherwise the user reopened the prompt themselves
|
|
450
|
+
EVAL_TEALIUM_NO_DECISION: () => utag.gdpr.getConsentState() === 0,
|
|
442
451
|
EVAL_TESTCMP_STEP: () => !!document.querySelector("#reject-all"),
|
|
443
452
|
EVAL_TESTCMP_0: () => window.results.results[0] === "button_clicked",
|
|
444
453
|
EVAL_TESTCMP_COSMETIC_0: () => window.results.results[0] === "banner_hidden",
|
|
@@ -461,18 +470,27 @@ function getFunctionBody(snippetFunc) {
|
|
|
461
470
|
}
|
|
462
471
|
|
|
463
472
|
// lib/heuristic-patterns.ts
|
|
473
|
+
var patternOf = (p) => p instanceof RegExp ? p : p.pattern;
|
|
474
|
+
var BY_CONTINUING_PRIVACY = /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi;
|
|
475
|
+
var ACCEPT_ALL = /accept all/gi;
|
|
476
|
+
var USE_OF_COOKIES = /use of cookies/gi;
|
|
477
|
+
var UTILISATION_DES_COOKIES = /utilisation.{0,100}des.{0,100}cookies/gi;
|
|
478
|
+
var ACCEPTEZ_UTILISATION = /acceptez.{0,100}l.{0,100}utilisation/gi;
|
|
479
|
+
var VERWENDUNG_VON_COOKIES = /verwendung.{0,100}von.{0,100}cookies/gi;
|
|
480
|
+
var DE_COOKIE_VERB = /\b(?:nutzen|nutzt|verwenden|verwendet|setzen|setzt|benutzen|benutzt|speichert|platzieren)\b(?: \S+){0,4} cookies\b/gi;
|
|
481
|
+
var GEBRUIK_VAN_COOKIES = /gebruik.{0,100}van.{0,100}cookies/gi;
|
|
464
482
|
var DETECT_PATTERNS = [
|
|
465
483
|
/accept cookies/gi,
|
|
466
|
-
|
|
484
|
+
ACCEPT_ALL,
|
|
467
485
|
/reject all/gi,
|
|
468
486
|
/only necessary cookies/gi,
|
|
469
487
|
// "only necessary" is probably too broad
|
|
470
488
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
471
|
-
|
|
489
|
+
BY_CONTINUING_PRIVACY,
|
|
472
490
|
// up to two qualifiers are common: "optional", "essential", "analytics", "google analytics", "third party", ...
|
|
473
491
|
/we (?:use|serve)(?: \w+){0,2} cookies/gi,
|
|
474
492
|
/we are using cookies/gi,
|
|
475
|
-
|
|
493
|
+
USE_OF_COOKIES,
|
|
476
494
|
/website uses cookies to enhance your browsing experience/gi,
|
|
477
495
|
/(?:this|our) (?:web)?site.{0,100}cookies/gi,
|
|
478
496
|
/cookies (?:and|or) .{0,100} technologies/gi,
|
|
@@ -483,6 +501,33 @@ var DETECT_PATTERNS = [
|
|
|
483
501
|
/we.{0,100}store.{0,100}information.{0,100}such as.{0,100}cookies/gi,
|
|
484
502
|
/store and\/or access information.{0,100}on a device/gi,
|
|
485
503
|
/personalised ads and content, ad and content measurement/gi,
|
|
504
|
+
// TCF wording: "store and/or access information", "and our partners ask for your consent", "we and our N partners"
|
|
505
|
+
/\b(?:store|stores|storing) and\/or access(?:ing)? information\b/gi,
|
|
506
|
+
/\band our partners ask for your consent\b/gi,
|
|
507
|
+
/\bwe and (?:our|up to) (?:\d+ )?(?:partners|vendors)\b/gi,
|
|
508
|
+
// a partner count, in each language: "our 186 partners", "unseren 107 Partnern", "nuestros 1064 socios"
|
|
509
|
+
/\b(?:our|unseren|onze|nos|nuestros|i nostri) \d{2,4} (?:partners|partnern|partner|partenaires|socios|vendors|fornitori)\b/gi,
|
|
510
|
+
/\b\d{2,4} iab[- ]partner/gi,
|
|
511
|
+
// "technologies like cookies", in each language
|
|
512
|
+
/\btechnolog(?:ies|ien|ieën|ías|ie) (?:like|such as|wie|zoals|como(?: las)?|telles que(?: les)?|come(?: i)?) cookies?\b/gi,
|
|
513
|
+
/\buses (?:\S+ ){0,2}cookies\b/gi,
|
|
514
|
+
/\b(?:like|want) to (?:use|set) (?:\S+ ){0,2}cookies\b/gi,
|
|
515
|
+
/\b(?:optional|additional|non-essential) cookies\b/gi,
|
|
516
|
+
/\bstoring of cookies\b|\bplaced cookies\b/gi,
|
|
517
|
+
/\b(?:store|stores) and access (?:data|information) on your device\b|\baccess and store (?:data|information) on your device\b/gi,
|
|
518
|
+
/\bwe use (?:\S+ ){1,4}cookies\b/gi,
|
|
519
|
+
// US privacy notices: opt-out sentences, not the footer link labels
|
|
520
|
+
/\byou (?:can|may) opt[- ]out of (?:the |this )?(?:sale|sharing|use|selling)\b/gi,
|
|
521
|
+
/\b(?:if you wish to|to) opt[- ]out of the sale\b/gi,
|
|
522
|
+
/\bthis website or its third[- ]party tools (?:process|use)\b/gi,
|
|
523
|
+
/["“]?(?:share|sell)["”]? or ["“]?(?:sell|share)["”]? (?:your )?(?:personal )?information\b/gi,
|
|
524
|
+
/\bresidents have (?:certain )?rights with regard to the sale\b/gi,
|
|
525
|
+
/\bwe use technologies (?:on this website )?(?:that may )?(?:to )?collect\b/gi,
|
|
526
|
+
// pay-or-consent walls
|
|
527
|
+
/\bcontinue reading with advertising\b|\b(?:with|mit) (?:advertising|werbung) (?:and|und) tracking\b/gi,
|
|
528
|
+
/\bconsent and continue\b/gi,
|
|
529
|
+
// preference centres are often in the page but hidden, so popup text only
|
|
530
|
+
{ pattern: /\bstore or retrieve information on your browser\b|\bstockées dans votre navigateur ou récupérées\b/gi, input: "popup" },
|
|
486
531
|
// it might be tempting to add the patterns below, but they cause too many false positives. Don't do it :)
|
|
487
532
|
// /cookies? settings/i,
|
|
488
533
|
// /cookies? preferences/i,
|
|
@@ -498,26 +543,32 @@ var DETECT_PATTERNS = [
|
|
|
498
543
|
/consentement.{0,100}à.{0,100}tout.{0,100}moment/gi,
|
|
499
544
|
/votre.{0,100}consentement/gi,
|
|
500
545
|
/accepter.{0,100}tout/gi,
|
|
501
|
-
|
|
546
|
+
UTILISATION_DES_COOKIES,
|
|
502
547
|
/cookies.{0,100}ou.{0,100}technologies/gi,
|
|
503
|
-
|
|
548
|
+
ACCEPTEZ_UTILISATION,
|
|
504
549
|
/continuer sans accepter/gi,
|
|
505
550
|
/tout refuser/gi,
|
|
506
551
|
/(?:refuser|rejeter) tous les cookies/gi,
|
|
507
|
-
|
|
552
|
+
// not "je refuse d'…" in a headline
|
|
553
|
+
/je refuse(?! d['’e])/gi,
|
|
508
554
|
/refuser et continuer/gi,
|
|
509
555
|
/refuser les cookies/gi,
|
|
510
556
|
/seulement nécessaires/gi,
|
|
511
557
|
/je désactive les finalités non essentielles/gi,
|
|
512
558
|
/cookies essentiels uniquement/gi,
|
|
513
559
|
/nécessaires uniquement/gi,
|
|
560
|
+
/\b(?:stocker|stockons) et\/ou (?:accéder|accédons)\b/gi,
|
|
561
|
+
/\bnos partenaires demandent votre consentement\b/gi,
|
|
562
|
+
/\bconsentez à l.utilisation (?:de |des )?cookies\b|\bdépôt (?:de|des) cookies\b/gi,
|
|
563
|
+
/\bles cookies nous permettent\b|\bnos partenaires et nous(?:-mêmes)?\b/gi,
|
|
564
|
+
/\baccepter (?:&|et) fermer\b/gi,
|
|
514
565
|
// DE
|
|
515
566
|
/wir.{0,100}verwenden.{0,100}cookies/gi,
|
|
516
567
|
/wir.{0,100}und.{0,100}unsere.{0,100}partner/gi,
|
|
517
|
-
/zugriff
|
|
568
|
+
/zugriff auf informationen auf/gi,
|
|
518
569
|
/inhalte.{0,100}messung.{0,100}von.{0,100}werbeleistung.{0,100}und/gi,
|
|
519
570
|
/cookies.{0,100}und.{0,100}andere/gi,
|
|
520
|
-
|
|
571
|
+
VERWENDUNG_VON_COOKIES,
|
|
521
572
|
/wir.{0,100}nutzen.{0,100}cookies/gi,
|
|
522
573
|
/verwendet.{0,100}cookies/gi,
|
|
523
574
|
/sie.{0,100}können.{0,100}ihre.{0,100}auswahl/gi,
|
|
@@ -530,8 +581,20 @@ var DETECT_PATTERNS = [
|
|
|
530
581
|
/nur funktionale cookies akzeptieren/gi,
|
|
531
582
|
/optionale ablehnen/gi,
|
|
532
583
|
/zustimmung verweigern/gi,
|
|
584
|
+
/\bspeichern und\/oder (?:zugreifen|abrufen)\b/gi,
|
|
585
|
+
/\bunsere partner bitten um ihre zustimmung\b/gi,
|
|
586
|
+
DE_COOKIE_VERB,
|
|
587
|
+
/\b(?:werden|wird) (?:\S+ ){0,3}cookies (?:verwendet|eingesetzt|gesetzt|genutzt)\b/gi,
|
|
588
|
+
/\bcookies? zum einsatz\b|\beinsatz von cookies\b/gi,
|
|
589
|
+
/\beinverstanden\b.{0,60}\bcookies\b|\bcookies\b.{0,80}\beinverstanden\b/gi,
|
|
590
|
+
/\b(?:alle|alles) (?:cookies |optionalen \S+ )?(?:akzeptieren|zulassen|erlauben|zustimmen)\b/gi,
|
|
591
|
+
/\bzustimmen und weiter\b|\bweiter,? ohne zu (?:akzeptieren|zustimmen)\b/gi,
|
|
592
|
+
/\b(?:einwilligung|zustimmung) (?:zu|zur|in die) (?:\S+ )?cookies\b|\bcookie-(?:zustimmung|einwilligung)\b/gi,
|
|
593
|
+
/\btracking-technologien\b/gi,
|
|
594
|
+
/\bakzeptier\w* (?:du |sie )?(?:die )?verwendung (?:\S+ )?cookies\b/gi,
|
|
595
|
+
/\bmit werbetracking weiterlesen\b|\bweiter mit werbung\b|\bcon tracking e annunci\b/gi,
|
|
533
596
|
// NL
|
|
534
|
-
|
|
597
|
+
GEBRUIK_VAN_COOKIES,
|
|
535
598
|
/(?:we|wij).{0,100}gebruiken.{0,100}cookies.{0,100}om/gi,
|
|
536
599
|
/cookies.{0,100}en.{0,100}vergelijkbare/gi,
|
|
537
600
|
/(?:alles|cookies).{0,100}(?:afwijzen|weigeren|verwerpen)/gi,
|
|
@@ -541,6 +604,13 @@ var DETECT_PATTERNS = [
|
|
|
541
604
|
/doorgaan zonder (?:te accepteren|akkoord te gaan)/gi,
|
|
542
605
|
/alleen.{0,100}(?:optionele|functionele|functioneel|noodzakelijke|essentiële).{0,100}cookies/gi,
|
|
543
606
|
/wijs alles af/gi,
|
|
607
|
+
/\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,
|
|
608
|
+
/\bonze partners vragen om (?:jouw|uw|je) toestemming\b/gi,
|
|
609
|
+
/\bwij en onze (?:\d+ )?partners\b/gi,
|
|
610
|
+
/\b(?:gebruiken|gebruikt|plaatsen|plaatst)\b(?: \S+){0,3} cookies\b/gi,
|
|
611
|
+
/\baccepteer (?:alles|alle cookies)\b/gi,
|
|
612
|
+
// Dutch words only: "tracking cookies" and "marketing cookies" are also English prose and footer links
|
|
613
|
+
/\b(?:analytische|functionele|essentiële|noodzakelijke) cookies\b/gi,
|
|
544
614
|
// Spanish (ES)
|
|
545
615
|
/(si|al) contin[úu]a[sr]?( navegando)?.{0,100} cookie/gi,
|
|
546
616
|
/(usamos|utilizar?|utilizamos)( (tanto|las))?.{0,20}cookie/gi,
|
|
@@ -557,6 +627,15 @@ var DETECT_PATTERNS = [
|
|
|
557
627
|
/nosotros y nuestros( \d+)? (socios|proveedores).{0,180} cookies/gi,
|
|
558
628
|
/recopilamos y almacenamos datos de usted y de su dispositivo/gi,
|
|
559
629
|
/utilizamos tecnolog[ií]as como las cookies/gi,
|
|
630
|
+
/\b(?:almacenar|almacenamos) y\/o (?:acceder|accedemos)\b/gi,
|
|
631
|
+
/\bnuestros socios solicitan su consentimiento\b/gi,
|
|
632
|
+
/\b(?:tanto nosotros como|nosotros y) nuestros (?:\d+ )?socios\b/gi,
|
|
633
|
+
/\b(?:aceptar|rechazar) todas\b|\bcontinuar sin aceptar\b|\bsolo las necesarias\b/gi,
|
|
634
|
+
/\bacept\w* (?:\S+ ){0,3}uso de (?:las )?cookies\b/gi,
|
|
635
|
+
/\bcookies (?:técnicas|analíticas|propias|de terceros|opcionales|necesarias)\b/gi,
|
|
636
|
+
/\blas cookies nos (?:ayudan|permiten)\b/gi,
|
|
637
|
+
/\b(?:instalamos|empleamos)\b(?: \S+){0,4} cookies\b/gi,
|
|
638
|
+
/\bacept(?:a|ar|as)? (?:el uso de |las )?(?:\S+ )?cookies\b|\bnecesitamos usar cookies\b/gi,
|
|
560
639
|
// Polish (PL)
|
|
561
640
|
// examples:
|
|
562
641
|
// wykorzystuje pliki cookie (uses cookies)
|
|
@@ -585,10 +664,11 @@ var DETECT_PATTERNS = [
|
|
|
585
664
|
// Catalan (CA)
|
|
586
665
|
/cookies pròpies i de tercers/gi,
|
|
587
666
|
/utilitzem galetes/gi,
|
|
588
|
-
|
|
667
|
+
/únicament utilitza galetes pròpies amb finalitat tècnica\b/gi,
|
|
589
668
|
/este lloc web utilitza només cookies tècniques necessàries per al seu funcionament/gi,
|
|
590
669
|
/utilitza cookies tècniques,\s*de personalització i anàlisi/gi,
|
|
591
670
|
/utilitzem cookies i altres tecnologies/gi,
|
|
671
|
+
/\b(?:utilitz\w*|fa servir|fem servir|usem)\b(?: \S+){0,3} (?:cookies|galetes)\b/gi,
|
|
592
672
|
// Basque (EU)
|
|
593
673
|
/cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu/gi,
|
|
594
674
|
/cookie propioak eta hirugarrenen cookieak erabiltzen ditugu/gi,
|
|
@@ -618,7 +698,18 @@ var DETECT_PATTERNS = [
|
|
|
618
698
|
/(?:usiamo|utilizziamo).{0,20}cookie/gi,
|
|
619
699
|
/sito.{0,50}(?:usa|utilizza).{0,20}cookie/gi,
|
|
620
700
|
/noi e i nostri.{0,20}partner.{0,100}cookie/gi,
|
|
621
|
-
|
|
701
|
+
/\b(?:utilizziamo|usiamo|impieghiamo|installiamo)\b(?: \S+){0,3} cookies?\b/gi,
|
|
702
|
+
/\b(?:utilizza|utilizzano|usa|usano|impiega|installa|fa uso di)\b(?: \S+){0,3} cookies?\b/gi,
|
|
703
|
+
/\bcookies? (?:tecnici|di profilazione|di terze parti|analitici|statistici|di marketing)\b/gi,
|
|
704
|
+
/\b(?:acconsent|accett)\w*\b.{0,40}\b(?:uso|utilizzo|installazione)\b.{0,15}\bcookies?\b/gi,
|
|
705
|
+
/\b(?:continuando|proseguendo)(?: la| nella)? navigazione\b.{0,80}\b(?:accett|acconsent)\w*/gi,
|
|
706
|
+
/\b(?:accetta|accetto|accettare|rifiuta|rifiuto|rifiutare)(?: tutti| tutto)\b/gi,
|
|
707
|
+
/\b(?:continua|prosegui|chiudi) senza accettare\b/gi,
|
|
708
|
+
/\brifiuta e abbonati\b/gi,
|
|
709
|
+
/\bconsenso (?:all.(?:uso|utilizzo) (?:dei |di )?)?cookies?\b/gi,
|
|
710
|
+
/\b(?:insieme ai|con i) nostri (?:\d+ )?partner\b/gi,
|
|
711
|
+
/\bterze parti selezionate\b/gi,
|
|
712
|
+
/\b(?:archiviare|archiviamo|memorizzare|memorizziamo) e\/o (?:accedere|accediamo)\b/gi,
|
|
622
713
|
// Swedish (SV)
|
|
623
714
|
// e.g. "vi använder cookies", "vi använder spårningstekniker såsom cookies", "webbplatsen använder kakor"
|
|
624
715
|
/(?:vi|webbplatsen|webbplats|sajten|sidan)\s+använder.{0,60}(?:cookies|kakor)/gi,
|
|
@@ -873,26 +964,12 @@ var BUTTON_NEVER_MATCH_PATTERNS = [
|
|
|
873
964
|
// Russian (RU): paywall/subscription wording, e.g. "отказаться от подписки", "оплатить"
|
|
874
965
|
/подписатьс|подписк|оплатит|оплачива/is
|
|
875
966
|
];
|
|
876
|
-
var DETECT_NEVER_MATCH_PATTERNS = [
|
|
877
|
-
// e.g. "age verification", "age confirmation", "age check", "age gate", "age restriction"
|
|
878
|
-
/age\s+(?:verification|confirmation|check|gate|restriction)/i,
|
|
879
|
-
// e.g. "over 18 years", "at least 21 years", "older than 21", "18+"
|
|
880
|
-
/(?:over|above|at\s*least|minimum|older\s+than)\s*(?:18|21)\s*(?:years|yo|y\.?o\.?|\+)?/i,
|
|
881
|
-
// e.g. "18 years of age", "18+ years old", "21 years or older"
|
|
882
|
-
/(?:18|21)\s*(?:\+|years?)\s*(?:of\s*age|or\s*older|or\s*above)/i,
|
|
883
|
-
// e.g. "I am 18+", "I am over 18", "I'm 21 or older"
|
|
884
|
-
/(?:i'?m|i\s*am)\s*(?:over|above|at\s*least)?\s*(?:18|21)(?:\+|\s*(?:or\s*older|years))?/i,
|
|
885
|
-
// e.g. "you must be 18", "users must be at least 21", "visitors must be over 18"
|
|
886
|
-
/(?:you|users?|visitors?)\s+must\s+be\s+(?:over|above|at\s*least)?\s*(?:18|21)/i,
|
|
887
|
-
// e.g. "adult oriented material", "adult content", "adult-only website"
|
|
888
|
-
/adult[\s-]+(?:oriented|only|content|material|websites?)/i
|
|
889
|
-
];
|
|
890
967
|
var SETTINGS_PATTERNS = [
|
|
891
968
|
// Multilingual "open customization" patterns: a customization verb next to a
|
|
892
969
|
// cookie/preference/settings/options/details/purposes noun (both word orders).
|
|
893
970
|
// The negative lookahead avoids policy links and save/confirm/accept phrases (those are accept/acknowledge/other).
|
|
894
|
-
/^(?!.*\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)
|
|
895
|
-
/^(?!.*\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)
|
|
971
|
+
/^(?!.*\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,
|
|
972
|
+
/^(?!.*\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,
|
|
896
973
|
// settings noun + cookies, e.g. "paramètres des cookies", "ajustes de cookies", "instellingen voor cookies en diensten"
|
|
897
974
|
/^(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,
|
|
898
975
|
"settings",
|
|
@@ -1248,41 +1325,518 @@ var ACKNOWLEDGE_PATTERNS = [
|
|
|
1248
1325
|
"\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"
|
|
1249
1326
|
];
|
|
1250
1327
|
|
|
1251
|
-
// lib/heuristic-
|
|
1328
|
+
// lib/heuristic-negatives.ts
|
|
1329
|
+
var COOKIE_CHOICE = [
|
|
1330
|
+
"\\b(?:accept|reject|decline|refuse|deny|allow|manage|customi[sz]e)\\b[^\\n]{0,25}\\bcookies?\\b",
|
|
1331
|
+
"\\b(?:reject|decline|deny|refuse) all\\b",
|
|
1332
|
+
"\\b(?:essential|necessary|required) (?:cookies )?only\\b|\\bonly (?:essential|necessary|required)\\b",
|
|
1333
|
+
"\\bcookies? (?:notice|settings|preferences|banner)\\b",
|
|
1334
|
+
"\\b(?:alle )?(?:cookies )?ablehnen\\b",
|
|
1335
|
+
"\\b(?:alles |alle cookies )?(?:weigeren|weiger|afwijzen)\\b",
|
|
1336
|
+
"\\b(?:tout )?refuser\\b",
|
|
1337
|
+
"\\brechazar(?: todas?)?\\b",
|
|
1338
|
+
"\\brifiuta(?: tutti)?\\b",
|
|
1339
|
+
// purposes and vendors as a button or heading line: some consent dialogs ask "under 18?"
|
|
1340
|
+
"^[^\\n]{0,40}\\b(?:purposes|finalit\xE9s|prop\xF3sitos|zwecke|doeleinden|finalit\xE0|vendors|fournisseurs|proveedores|leveranciers|fornitori)(?!\\w)[^\\n]{0,10}$",
|
|
1341
|
+
"\\b(?:legitimate (?:business )?interest|int\xE9r\xEAt l\xE9gitime|inter\xE9s leg\xEDtimo|berechtigtes interesse|gerechtvaardigd belang|legittimo interesse)\\b",
|
|
1342
|
+
"\\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"
|
|
1343
|
+
].join("|");
|
|
1344
|
+
var BARE_ACCEPT = [
|
|
1345
|
+
"\\b(?:accept|allow) all\\b",
|
|
1346
|
+
"\\b(?:alle )?(?:cookies )?(?:akzeptieren|erlauben|zulassen)\\b",
|
|
1347
|
+
"\\b(?:alles |alle cookies )?(?:accepteren|accepteer|toestaan)\\b",
|
|
1348
|
+
"\\b(?:tout )?accepter\\b",
|
|
1349
|
+
"\\baceptar(?: todas?)?\\b",
|
|
1350
|
+
"\\baccetta(?: tutti)?\\b"
|
|
1351
|
+
].join("|");
|
|
1352
|
+
var COOKIE_CHOICE_RE = new RegExp(COOKIE_CHOICE, "im");
|
|
1353
|
+
var CONSENT_CHOICE = new RegExp(`${COOKIE_CHOICE}|${BARE_ACCEPT}`, "im");
|
|
1354
|
+
var AGE_WORDING = new RegExp(
|
|
1355
|
+
[
|
|
1356
|
+
"\\b(?:over|above|at least|older than|minimum(?: age of)?)\\s*(?:18|21|eighteen)\\b",
|
|
1357
|
+
// "18+" only with age words after it: a bare "18+" also appears in cookie banners on adult sites
|
|
1358
|
+
"\\b(?:18|21)\\+?\\s*(?:years?(?: of age| old)?|yo|or older|or over)\\b",
|
|
1359
|
+
"\\b(?:you|users?|visitors?) must be (?:over |above |at least )?(?:18|21)\\b",
|
|
1360
|
+
"\\b(?:i'?m|i am) (?:over |at least )?(?:18|21)\\b",
|
|
1361
|
+
"\\bage (?:verification|confirmation|check|gate|restriction)\\b",
|
|
1362
|
+
"\\b(?:adults? only|adult[\\s-](?:oriented|content|material|website)|legal age|age of majority|not a minor|minors)\\b",
|
|
1363
|
+
"\\b(?:18|21) jahre\\b",
|
|
1364
|
+
"\\balters(?:beschr\xE4nkung|best\xE4tigung|verifikation|pr\xFCfung|kontrolle)",
|
|
1365
|
+
"\\b(?:vollj\xE4hrig|f\xFCr erwachsene|minderj\xE4hrige)\\b",
|
|
1366
|
+
"\\b(?:18|21) jaar\\b",
|
|
1367
|
+
"\\b(?:volwassenen|meerderjarig|minderjarigen|leeftijdsverificatie)\\b",
|
|
1368
|
+
"\\b(?:18|21) ans\\b",
|
|
1369
|
+
// no \\b before an accented letter: without the u flag it is not a word character
|
|
1370
|
+
"\\b(?:pour adultes|v\xE9rification de l.\xE2ge|mineurs)\\b|\xE2ge l\xE9gal\\b",
|
|
1371
|
+
"\\b(?:18|21) a\xF1os\\b",
|
|
1372
|
+
"\\b(?:mayor(?:es)? de edad|menores de edad|para adultos|verificaci\xF3n de edad)\\b",
|
|
1373
|
+
"\\b(?:18|21) anni\\b",
|
|
1374
|
+
"\\b(?:maggiorenne|minorenni|per adulti)\\b|\\bverifica dell.et\xE0(?!\\w)"
|
|
1375
|
+
].join("|"),
|
|
1376
|
+
"i"
|
|
1377
|
+
);
|
|
1378
|
+
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;
|
|
1379
|
+
var DISMISS_END = /[.!?]\s+(?:ok(?:ay)?|got it|i agree|accept)\s*!?\s*$|\[\s*[x×]\s*\]|^\s*[x×✕]\s*$/im;
|
|
1380
|
+
var NOTICE_CONTROL = new RegExp(`${CONSENT_CHOICE.source}|${DISMISS_LINE.source}|${DISMISS_END.source}`, "im");
|
|
1381
|
+
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;
|
|
1382
|
+
var NOTICE_OWN_CONTROL = new RegExp(
|
|
1383
|
+
[
|
|
1384
|
+
"\\bcookies? verwalten\\b|\\bcookie-?(?:einstellungen|pr\xE4ferenzen)\\b|\\beinstellungen verwalten\\b",
|
|
1385
|
+
"\\bconfigura(?:r|ci\xF3n de)(?: las)? cookies\\b|\\bgestionar(?: las)? cookies\\b|\\bpersonalizar(?: las)? cookies\\b",
|
|
1386
|
+
"\\bparam[\xE9e]trer(?: les)? cookies\\b|\\bparam[\xE8e]tres(?: des)? cookies\\b|\\bg[\xE9e]rer(?: les)? cookies\\b|\\bpersonnaliser(?: les)? cookies\\b",
|
|
1387
|
+
"\\bgestisci(?: i)? cookie|\\bimpostazioni(?: dei| sui)? cookie|\\bpersonalizza(?: i)? cookie",
|
|
1388
|
+
"\\bcookie-?instellingen\\b|\\bcookies? beheren\\b|\\bvoorkeuren (?:beheren|aanpassen)\\b",
|
|
1389
|
+
"^\\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*$",
|
|
1390
|
+
"^\\s*close (?:this|the) (?:popup|banner|notice|message)\\s*$"
|
|
1391
|
+
].join("|"),
|
|
1392
|
+
"im"
|
|
1393
|
+
);
|
|
1394
|
+
var ageGateUnless = (control) => (text) => !LEAVE_LINE.test(text) && (control.test(text) || NOTICE_OWN_CONTROL.test(text));
|
|
1395
|
+
var CONSENT_WORDS = /cookie|consent|track|partner|personali[sz]|advertis|analytic|privacy (?:options|choices|settings|rights)|do not sell|opt[- ]out/i;
|
|
1396
|
+
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;
|
|
1397
|
+
var DETECT_CONTEXT_NEGATIVES = [
|
|
1398
|
+
// popups with their own age confirmation are age gates, even when they mention cookies; a bare accept doesn't count
|
|
1399
|
+
// as a cookie choice here, since it may confirm the age
|
|
1400
|
+
{ name: "age-gate-popup", pattern: AGE_WORDING, unless: ageGateUnless(COOKIE_CHOICE_RE), whole: true, input: "popup" },
|
|
1401
|
+
// a license or terms agreement may mention cookies, and its decline button must not be clicked as a cookie reject
|
|
1402
|
+
{ name: "legal-agreement", pattern: LEGAL_AGREEMENT, whole: true, input: "popup" },
|
|
1403
|
+
// page text next to an age gate, unless a consent control is there too
|
|
1404
|
+
{ name: "age-gate", pattern: AGE_WORDING, unless: ageGateUnless(NOTICE_CONTROL), lines: [4, 5], input: "page" },
|
|
1405
|
+
// terms of use need cookie or consent wording; a privacy-policy-only notice needs that or a button
|
|
1406
|
+
{
|
|
1407
|
+
name: "terms-without-consent",
|
|
1408
|
+
pattern: /\bterms\b|\bconditions\b/i,
|
|
1409
|
+
unless: CONSENT_WORDS,
|
|
1410
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
name: "privacy-without-control",
|
|
1414
|
+
unless: new RegExp(`${CONSENT_WORDS.source}|${DISMISS_LINE.source}`, "im"),
|
|
1415
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1416
|
+
},
|
|
1417
|
+
// a cookie policy link among short footer link lines
|
|
1418
|
+
{
|
|
1419
|
+
name: "footer-link",
|
|
1420
|
+
pattern: /^[^.!?:\n]{0,60}\n[\s]*\n?[^.!?:\s][^.!?:\n]{0,59}(?:\n|$)/,
|
|
1421
|
+
unless: NOTICE_CONTROL,
|
|
1422
|
+
lines: [0, 2],
|
|
1423
|
+
input: "page",
|
|
1424
|
+
appliesTo: [USE_OF_COOKIES, VERWENDUNG_VON_COOKIES, UTILISATION_DES_COOKIES, GEBRUIK_VAN_COOKIES]
|
|
1425
|
+
},
|
|
1426
|
+
// "accept all" in prose; case-sensitive since button labels run together in innerText
|
|
1427
|
+
{
|
|
1428
|
+
name: "accept-all-prose",
|
|
1429
|
+
pattern: /\baccept all [a-z]|\baccept All[a-z]/,
|
|
1430
|
+
unless: /accept all (?:cookies|and|&)/i,
|
|
1431
|
+
window: 15,
|
|
1432
|
+
appliesTo: [ACCEPT_ALL]
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
name: "acceptez-terms",
|
|
1436
|
+
pattern: /conditions (?:générales )?d.utilisation|\bcgu\b/i,
|
|
1437
|
+
unless: /cookie|témoin|traceur|partenaire/i,
|
|
1438
|
+
appliesTo: [ACCEPTEZ_UTILISATION]
|
|
1439
|
+
},
|
|
1440
|
+
// the same sentence is also a footer line with only a "learn more" link
|
|
1441
|
+
{ name: "de-cookie-verb-needs-control", unless: NOTICE_CONTROL, lines: [1, 6], input: "page", appliesTo: [DE_COOKIE_VERB] }
|
|
1442
|
+
];
|
|
1443
|
+
|
|
1444
|
+
// lib/heuristic-literals.ts
|
|
1445
|
+
var DETECT_PATTERN_LITERALS = [
|
|
1446
|
+
["accept cookies"],
|
|
1447
|
+
["accept all"],
|
|
1448
|
+
["reject all"],
|
|
1449
|
+
["only necessary cookies"],
|
|
1450
|
+
[],
|
|
1451
|
+
[],
|
|
1452
|
+
[" cookies"],
|
|
1453
|
+
["we are using cookies"],
|
|
1454
|
+
["use of cookies"],
|
|
1455
|
+
["website uses cookies to enhance your browsing experience"],
|
|
1456
|
+
["cookies"],
|
|
1457
|
+
[" technologies"],
|
|
1458
|
+
["such as cookies"],
|
|
1459
|
+
["read more about"],
|
|
1460
|
+
["consent to"],
|
|
1461
|
+
["we and our partners"],
|
|
1462
|
+
["information"],
|
|
1463
|
+
["store and/or access information"],
|
|
1464
|
+
["personalised ads and content, ad and content measurement"],
|
|
1465
|
+
[" and/or access"],
|
|
1466
|
+
["and our partners ask for your consent"],
|
|
1467
|
+
["we and "],
|
|
1468
|
+
["partners", "partnern", "partner", "partenaires", "socios", "vendors", "fornitori"],
|
|
1469
|
+
["partner"],
|
|
1470
|
+
["technolog"],
|
|
1471
|
+
["cookies"],
|
|
1472
|
+
["cookies"],
|
|
1473
|
+
["optional", "additional", "non-essential"],
|
|
1474
|
+
["storing of cookies", "placed cookies"],
|
|
1475
|
+
[" on your device", "access and store "],
|
|
1476
|
+
["we use "],
|
|
1477
|
+
["out of "],
|
|
1478
|
+
["out of the sale"],
|
|
1479
|
+
["this website or its third"],
|
|
1480
|
+
["information"],
|
|
1481
|
+
["rights with regard to the sale"],
|
|
1482
|
+
["we use technologies "],
|
|
1483
|
+
["continue reading with advertising", " tracking"],
|
|
1484
|
+
["consent and continue"],
|
|
1485
|
+
["store or retrieve information on your browser", "stock\xE9es dans votre navigateur ou r\xE9cup\xE9r\xE9es"],
|
|
1486
|
+
["utilisons"],
|
|
1487
|
+
["cookies"],
|
|
1488
|
+
["consentement"],
|
|
1489
|
+
["partenaires"],
|
|
1490
|
+
["publicit\xE9s"],
|
|
1491
|
+
["utilise"],
|
|
1492
|
+
["utilisent"],
|
|
1493
|
+
["stocker"],
|
|
1494
|
+
["consentement"],
|
|
1495
|
+
["consentement"],
|
|
1496
|
+
["accepter"],
|
|
1497
|
+
["utilisation"],
|
|
1498
|
+
["technologies"],
|
|
1499
|
+
["utilisation"],
|
|
1500
|
+
["continuer sans accepter"],
|
|
1501
|
+
["tout refuser"],
|
|
1502
|
+
[" tous les cookies"],
|
|
1503
|
+
["je refuse"],
|
|
1504
|
+
["refuser et continuer"],
|
|
1505
|
+
["refuser les cookies"],
|
|
1506
|
+
["seulement n\xE9cessaires"],
|
|
1507
|
+
["je d\xE9sactive les finalit\xE9s non essentielles"],
|
|
1508
|
+
["cookies essentiels uniquement"],
|
|
1509
|
+
["n\xE9cessaires uniquement"],
|
|
1510
|
+
["stocker", "stockons"],
|
|
1511
|
+
["nos partenaires demandent votre consentement"],
|
|
1512
|
+
["consentez \xE0 l", " cookies"],
|
|
1513
|
+
["les cookies nous permettent", "nos partenaires et nous"],
|
|
1514
|
+
["accepter "],
|
|
1515
|
+
["verwenden"],
|
|
1516
|
+
["partner"],
|
|
1517
|
+
["zugriff auf informationen auf"],
|
|
1518
|
+
["werbeleistung"],
|
|
1519
|
+
["cookies"],
|
|
1520
|
+
["verwendung"],
|
|
1521
|
+
["cookies"],
|
|
1522
|
+
["verwendet"],
|
|
1523
|
+
["auswahl"],
|
|
1524
|
+
["technologien"],
|
|
1525
|
+
["verwenden"],
|
|
1526
|
+
["ablehnen"],
|
|
1527
|
+
["zus\xE4tzliche", "essenzielle", "funktionale", "notwendige", "erforderliche"],
|
|
1528
|
+
["einwilligung", "zustimmung", "cookies"],
|
|
1529
|
+
["ablehnen"],
|
|
1530
|
+
["nur funktionale cookies akzeptieren"],
|
|
1531
|
+
["optionale ablehnen"],
|
|
1532
|
+
["zustimmung verweigern"],
|
|
1533
|
+
["speichern und/oder "],
|
|
1534
|
+
["unsere partner bitten um ihre zustimmung"],
|
|
1535
|
+
[" cookies"],
|
|
1536
|
+
["cookies "],
|
|
1537
|
+
[" zum einsatz", "einsatz von cookies"],
|
|
1538
|
+
["einverstanden", "einverstanden"],
|
|
1539
|
+
["akzeptieren", "zulassen", "erlauben", "zustimmen"],
|
|
1540
|
+
["zustimmen und weiter", " ohne zu "],
|
|
1541
|
+
["einwilligung", "zustimmung", "zustimmung", "einwilligung"],
|
|
1542
|
+
["tracking-technologien"],
|
|
1543
|
+
["verwendung "],
|
|
1544
|
+
["mit werbetracking weiterlesen", "weiter mit werbung", "con tracking e annunci"],
|
|
1545
|
+
["gebruik"],
|
|
1546
|
+
["gebruiken"],
|
|
1547
|
+
["vergelijkbare"],
|
|
1548
|
+
["afwijzen", "weigeren", "verwerpen"],
|
|
1549
|
+
["noodzakelijk"],
|
|
1550
|
+
["cookies weigeren"],
|
|
1551
|
+
["weiger"],
|
|
1552
|
+
["doorgaan zonder "],
|
|
1553
|
+
["optionele", "functionele", "functioneel", "noodzakelijke", "essenti\xEBle"],
|
|
1554
|
+
["wijs alles af"],
|
|
1555
|
+
[],
|
|
1556
|
+
["onze partners vragen om "],
|
|
1557
|
+
["wij en onze "],
|
|
1558
|
+
[" cookies"],
|
|
1559
|
+
["accepteer "],
|
|
1560
|
+
["analytische", "functionele", "essenti\xEBle", "noodzakelijke"],
|
|
1561
|
+
[" contin"],
|
|
1562
|
+
["cookie"],
|
|
1563
|
+
[" uso de cookies"],
|
|
1564
|
+
["usa cookies de google"],
|
|
1565
|
+
[" uso de cookies"],
|
|
1566
|
+
["al utilizar nuestro sitio web"],
|
|
1567
|
+
["almacenar la informaci\xF3n en un dispositivo y"],
|
|
1568
|
+
[" utiliza"],
|
|
1569
|
+
["cookies propias y de"],
|
|
1570
|
+
["son necesarias"],
|
|
1571
|
+
[" cookie"],
|
|
1572
|
+
["navegando"],
|
|
1573
|
+
["nosotros y nuestros"],
|
|
1574
|
+
["recopilamos y almacenamos datos de usted y de su dispositivo"],
|
|
1575
|
+
["utilizamos tecnolog"],
|
|
1576
|
+
["almacenar", "almacenamos"],
|
|
1577
|
+
["nuestros socios solicitan su consentimiento"],
|
|
1578
|
+
["tanto nosotros como", "nosotros y"],
|
|
1579
|
+
["aceptar", "rechazar", "continuar sin aceptar", "solo las necesarias"],
|
|
1580
|
+
["uso de "],
|
|
1581
|
+
["cookies "],
|
|
1582
|
+
["las cookies nos "],
|
|
1583
|
+
["instalamos", "empleamos"],
|
|
1584
|
+
["cookies", "necesitamos usar cookies"],
|
|
1585
|
+
[" cookie"],
|
|
1586
|
+
["u\u017Cywa\u0107", "u\u017Cywamy"],
|
|
1587
|
+
["cele przetwarzania twoich danych przez zaufanych partner\xF3w iab"],
|
|
1588
|
+
["dzi\u0119ki "],
|
|
1589
|
+
[" plik\xF3w cookie"],
|
|
1590
|
+
["korzystamy z technologii, takich jak pliki cookie"],
|
|
1591
|
+
["korzystamy"],
|
|
1592
|
+
["niekt\xF3re pliki cookies"],
|
|
1593
|
+
["pliki cookies i pokrewne im technologie umo\u017Cliwiaj\u0105 poprawne dzia\u0142anie strony i pomagaj\u0105 nam dostosowa\u0107 ofert\u0119 do twoich potrzeb"],
|
|
1594
|
+
["przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich"],
|
|
1595
|
+
["przechowywanie plik\xF3w cookie na swoim urz\u0105dzeniu"],
|
|
1596
|
+
["przechowywa\u0107 i uzyskiwa\u0107 dost\u0119p do informacji na twoich urz\u0105dzeniach"],
|
|
1597
|
+
["przetwarzamy"],
|
|
1598
|
+
[" u\u017Cywa "],
|
|
1599
|
+
["ta strona korzysta z ciasteczek"],
|
|
1600
|
+
["uzyskujemy dost\u0119p i przechowujemy informacje na urz\u0105dzeniu"],
|
|
1601
|
+
["u\u017Cywa plik"],
|
|
1602
|
+
["u\u017Cywamy plik\xF3w"],
|
|
1603
|
+
["wykorzystuj\u0105 "],
|
|
1604
|
+
["za pomoc\u0105 plik\xF3w cookies"],
|
|
1605
|
+
["zgod\u0105 my i nasi partnerzy mo\u017Cemy wykorzystywa\u0107 precyzyjne dane geolokalizacyjne i identyfikacj\u0119"],
|
|
1606
|
+
["cookies pr\xF2pies i de tercers"],
|
|
1607
|
+
["utilitzem galetes"],
|
|
1608
|
+
["\xFAnicament utilitza galetes pr\xF2pies amb finalitat t\xE8cnica"],
|
|
1609
|
+
["este lloc web utilitza nom\xE9s cookies t\xE8cniques necess\xE0ries per al seu funcionament"],
|
|
1610
|
+
["de personalitzaci\xF3 i an\xE0lisi"],
|
|
1611
|
+
["utilitzem cookies i altres tecnologies"],
|
|
1612
|
+
["cookies", "galetes"],
|
|
1613
|
+
["cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1614
|
+
["cookie propioak eta hirugarrenen cookieak erabiltzen ditugu"],
|
|
1615
|
+
["cookie propioak eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1616
|
+
["ak erabiltzen ditu"],
|
|
1617
|
+
["cookieak erabiltzen ditu"],
|
|
1618
|
+
[" bazkideek cookieak eta identifikadoreak erabiltzen ditugu"],
|
|
1619
|
+
["norberaren eta hirugarrenen cookie"],
|
|
1620
|
+
["web orri honek cookieak erabiltzen ditu"],
|
|
1621
|
+
["webgune honek cookie propioak eta hirugarrenen cookie-fitxategiak erabiltzen ditu"],
|
|
1622
|
+
["empregamos cookies propias"],
|
|
1623
|
+
["este portal emprega cookies propias ou de terceiros con fins anal\xEDticos"],
|
|
1624
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1625
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1626
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1627
|
+
["\u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438"],
|
|
1628
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1629
|
+
[],
|
|
1630
|
+
["usiamo", "utilizziamo"],
|
|
1631
|
+
["cookie"],
|
|
1632
|
+
["noi e i nostri"],
|
|
1633
|
+
[" cookie"],
|
|
1634
|
+
[" cookie"],
|
|
1635
|
+
["tecnici", "di profilazione", "di terze parti", "analitici", "statistici", "di marketing"],
|
|
1636
|
+
["acconsent", "accett"],
|
|
1637
|
+
[" navigazione"],
|
|
1638
|
+
["accetta", "accetto", "accettare", "rifiuta", "rifiuto", "rifiutare"],
|
|
1639
|
+
[" senza accettare"],
|
|
1640
|
+
["rifiuta e abbonati"],
|
|
1641
|
+
["consenso "],
|
|
1642
|
+
[" nostri "],
|
|
1643
|
+
["terze parti selezionate"],
|
|
1644
|
+
["archiviare", "archiviamo", "memorizzare", "memorizziamo"],
|
|
1645
|
+
["anv\xE4nder"],
|
|
1646
|
+
["cookie", "\u30AF\u30C3\u30AD\u30FC"],
|
|
1647
|
+
["bruger cookies"],
|
|
1648
|
+
["informasjonskapsler", "cookies"]
|
|
1649
|
+
];
|
|
1650
|
+
|
|
1651
|
+
// lib/heuristic-prefilter.ts
|
|
1652
|
+
function literalIndex(all) {
|
|
1653
|
+
const distinct = [...new Set(all)].sort((a, b) => b.length - a.length);
|
|
1654
|
+
if (distinct.length === 0) {
|
|
1655
|
+
return { present: () => /* @__PURE__ */ new Set() };
|
|
1656
|
+
}
|
|
1657
|
+
const escape = (l) => l.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
1658
|
+
const any = new RegExp(`(?=(${distinct.map(escape).join("|")}))`, "g");
|
|
1659
|
+
const implies = /* @__PURE__ */ new Map();
|
|
1660
|
+
const impliedBy = (m) => {
|
|
1661
|
+
let list = implies.get(m);
|
|
1662
|
+
if (!list) {
|
|
1663
|
+
list = distinct.filter((l) => m.startsWith(l));
|
|
1664
|
+
implies.set(m, list);
|
|
1665
|
+
}
|
|
1666
|
+
return list;
|
|
1667
|
+
};
|
|
1668
|
+
return {
|
|
1669
|
+
present(lower) {
|
|
1670
|
+
const found = /* @__PURE__ */ new Set();
|
|
1671
|
+
for (const m of lower.matchAll(any)) {
|
|
1672
|
+
if (!found.has(m[1])) {
|
|
1673
|
+
impliedBy(m[1]).forEach((l) => found.add(l));
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
return found;
|
|
1677
|
+
}
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
// lib/heuristic-detect.ts
|
|
1252
1682
|
var TEXT_LIMIT = 1e5;
|
|
1253
|
-
|
|
1254
|
-
|
|
1683
|
+
var DEFAULT_WINDOW = 150;
|
|
1684
|
+
var builtinLiterals;
|
|
1685
|
+
function literalsOf(pattern) {
|
|
1686
|
+
if (!builtinLiterals) {
|
|
1687
|
+
const fresh = DETECT_PATTERN_LITERALS.length === DETECT_PATTERNS.length;
|
|
1688
|
+
builtinLiterals = new Map(fresh ? DETECT_PATTERNS.map((p, i) => [patternOf(p), DETECT_PATTERN_LITERALS[i]]) : []);
|
|
1689
|
+
}
|
|
1690
|
+
return builtinLiterals.get(pattern) ?? [];
|
|
1691
|
+
}
|
|
1692
|
+
var index;
|
|
1693
|
+
var literalsIn = (lower) => (index ??= literalIndex(DETECT_PATTERN_LITERALS.flat())).present(lower);
|
|
1694
|
+
var truncate = (text) => (text || "").slice(0, TEXT_LIMIT);
|
|
1695
|
+
var forInput = (scoped, input) => !scoped.input || scoped.input === input;
|
|
1696
|
+
var stateless = (re) => new RegExp(re.source, re.flags.replace(/[gy]/g, ""));
|
|
1697
|
+
function toPredicate(test) {
|
|
1698
|
+
if (typeof test === "function") {
|
|
1699
|
+
return test;
|
|
1700
|
+
}
|
|
1701
|
+
const re = stateless(test);
|
|
1702
|
+
return (text) => re.test(text);
|
|
1703
|
+
}
|
|
1704
|
+
var compiledPatterns = /* @__PURE__ */ new WeakMap();
|
|
1705
|
+
var compiledNegatives = /* @__PURE__ */ new WeakMap();
|
|
1706
|
+
function compilePatterns(detectPatterns) {
|
|
1707
|
+
let compiled = compiledPatterns.get(detectPatterns);
|
|
1708
|
+
if (!compiled) {
|
|
1709
|
+
compiled = detectPatterns.map((p) => {
|
|
1710
|
+
const pattern = patternOf(p);
|
|
1711
|
+
const input = p instanceof RegExp ? void 0 : p.input;
|
|
1712
|
+
const global = pattern.flags.includes("g") ? pattern : new RegExp(pattern.source, `${pattern.flags}g`);
|
|
1713
|
+
return { id: pattern.toString(), pattern, global, input, literals: literalsOf(pattern) };
|
|
1714
|
+
});
|
|
1715
|
+
compiledPatterns.set(detectPatterns, compiled);
|
|
1716
|
+
}
|
|
1717
|
+
return compiled;
|
|
1718
|
+
}
|
|
1719
|
+
function compileNegatives(negatives) {
|
|
1720
|
+
let compiled = compiledNegatives.get(negatives);
|
|
1721
|
+
if (!compiled) {
|
|
1722
|
+
compiled = negatives.map((n) => {
|
|
1723
|
+
const pattern = n.pattern ? stateless(n.pattern) : null;
|
|
1724
|
+
const unless = n.unless ? toPredicate(n.unless) : null;
|
|
1725
|
+
return {
|
|
1726
|
+
...n,
|
|
1727
|
+
hits: (context) => (!pattern || pattern.test(context)) && !(unless && unless(context)),
|
|
1728
|
+
applies: n.appliesTo ? new Set(n.appliesTo.map(String)) : null
|
|
1729
|
+
};
|
|
1730
|
+
});
|
|
1731
|
+
compiledNegatives.set(negatives, compiled);
|
|
1732
|
+
}
|
|
1733
|
+
return compiled;
|
|
1734
|
+
}
|
|
1735
|
+
function negativeContext(text, start, end, negative) {
|
|
1736
|
+
if (negative.whole) {
|
|
1737
|
+
return text;
|
|
1738
|
+
}
|
|
1739
|
+
if (negative.lines === void 0) {
|
|
1740
|
+
const w = negative.window ?? DEFAULT_WINDOW;
|
|
1741
|
+
return text.slice(Math.max(0, start - w), end + w);
|
|
1742
|
+
}
|
|
1743
|
+
const lineEnd = (i) => {
|
|
1744
|
+
const next = text.indexOf("\n", i);
|
|
1745
|
+
return next === -1 ? text.length : next;
|
|
1746
|
+
};
|
|
1747
|
+
const [before, after] = Array.isArray(negative.lines) ? negative.lines : [negative.lines, negative.lines];
|
|
1748
|
+
let from = start > 0 ? text.lastIndexOf("\n", start - 1) + 1 : 0;
|
|
1749
|
+
let to = lineEnd(end);
|
|
1750
|
+
for (let i = 0; i < before; i++) {
|
|
1751
|
+
from = from >= 2 ? text.lastIndexOf("\n", from - 2) + 1 : 0;
|
|
1752
|
+
}
|
|
1753
|
+
for (let i = 0; i < after; i++) {
|
|
1754
|
+
to = to < text.length ? lineEnd(to + 1) : to;
|
|
1755
|
+
}
|
|
1756
|
+
return text.slice(from, to);
|
|
1757
|
+
}
|
|
1758
|
+
function checkHeuristicPatterns(allText, input, options = {}) {
|
|
1759
|
+
return matchHeuristicPatterns(allText, input, options, false);
|
|
1760
|
+
}
|
|
1761
|
+
function hasHeuristicPatterns(allText, input, options = {}) {
|
|
1762
|
+
return matchHeuristicPatterns(allText, input, options, true).patterns.length > 0;
|
|
1763
|
+
}
|
|
1764
|
+
function matchHeuristicPatterns(allText, input, { patterns: detectPatterns = DETECT_PATTERNS, negatives = DETECT_CONTEXT_NEGATIVES }, firstOnly) {
|
|
1765
|
+
if (input !== void 0 && input !== "popup" && input !== "page") {
|
|
1766
|
+
const got = Array.isArray(input) ? "a pattern list (pass it as the `patterns` option)" : JSON.stringify(input);
|
|
1767
|
+
throw new TypeError(`heuristic input must be 'popup', 'page' or undefined, got ${got}`);
|
|
1768
|
+
}
|
|
1769
|
+
allText = truncate(allText);
|
|
1255
1770
|
const patterns = [];
|
|
1256
1771
|
const snippets2 = [];
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1772
|
+
const suppressed = [];
|
|
1773
|
+
const applicable = compileNegatives(negatives).filter((n) => forInput(n, input));
|
|
1774
|
+
let present;
|
|
1775
|
+
const wholeHits = /* @__PURE__ */ new Map();
|
|
1776
|
+
const hitsAt = (n, start, end) => {
|
|
1777
|
+
if (!n.whole) {
|
|
1778
|
+
return n.hits(negativeContext(allText, start, end, n));
|
|
1779
|
+
}
|
|
1780
|
+
let hit = wholeHits.get(n);
|
|
1781
|
+
if (hit === void 0) {
|
|
1782
|
+
hit = n.hits(allText);
|
|
1783
|
+
wholeHits.set(n, hit);
|
|
1784
|
+
}
|
|
1785
|
+
return hit;
|
|
1786
|
+
};
|
|
1787
|
+
for (const d of compilePatterns(detectPatterns)) {
|
|
1788
|
+
if (!forInput(d, input)) {
|
|
1789
|
+
continue;
|
|
1790
|
+
}
|
|
1791
|
+
if (d.literals.length) {
|
|
1792
|
+
const inText = present ??= literalsIn(allText.toLowerCase());
|
|
1793
|
+
if (!d.literals.some((l) => inText.has(l))) {
|
|
1794
|
+
continue;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
const own = applicable.filter((n) => !n.applies || n.applies.has(d.id));
|
|
1798
|
+
const matched = [];
|
|
1799
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
1800
|
+
let found = false;
|
|
1801
|
+
let kept = own.length === 0;
|
|
1802
|
+
for (const m of allText.matchAll(d.global)) {
|
|
1803
|
+
found = true;
|
|
1804
|
+
if (!kept) {
|
|
1805
|
+
const start = m.index ?? 0;
|
|
1806
|
+
const hit = own.find((n) => hitsAt(n, start, start + m[0].length));
|
|
1807
|
+
if (hit) {
|
|
1808
|
+
dropped.add(hit.name);
|
|
1809
|
+
} else {
|
|
1810
|
+
kept = true;
|
|
1264
1811
|
}
|
|
1265
1812
|
}
|
|
1813
|
+
if (kept && firstOnly) {
|
|
1814
|
+
break;
|
|
1815
|
+
}
|
|
1816
|
+
matched.push(m[0].substring(0, 200));
|
|
1266
1817
|
}
|
|
1818
|
+
if (!found) {
|
|
1819
|
+
continue;
|
|
1820
|
+
}
|
|
1821
|
+
if (!kept) {
|
|
1822
|
+
dropped.forEach((negative) => suppressed.push({ pattern: d.id, negative }));
|
|
1823
|
+
continue;
|
|
1824
|
+
}
|
|
1825
|
+
patterns.push(d.id);
|
|
1826
|
+
if (firstOnly) {
|
|
1827
|
+
break;
|
|
1828
|
+
}
|
|
1829
|
+
snippets2.push(...matched);
|
|
1267
1830
|
}
|
|
1268
|
-
return { patterns, snippets: snippets2 };
|
|
1269
|
-
}
|
|
1270
|
-
function hasHeuristicPatterns(allText, detectPatterns = DETECT_PATTERNS) {
|
|
1271
|
-
const text = allText.slice(0, TEXT_LIMIT);
|
|
1272
|
-
return detectPatterns.some((p) => text.search(p) !== -1);
|
|
1831
|
+
return { patterns, snippets: snippets2, suppressed };
|
|
1273
1832
|
}
|
|
1833
|
+
|
|
1834
|
+
// lib/heuristic-classify.ts
|
|
1274
1835
|
function classifyButtons(buttons) {
|
|
1275
1836
|
for (const button of buttons) {
|
|
1276
1837
|
button.regexClassification = classifyButtonTextRegex(button.text);
|
|
1277
1838
|
}
|
|
1278
1839
|
}
|
|
1279
|
-
function isExcludedPopup(popupText, excludePatterns = DETECT_NEVER_MATCH_PATTERNS) {
|
|
1280
|
-
if (!popupText) {
|
|
1281
|
-
return false;
|
|
1282
|
-
}
|
|
1283
|
-
const truncated = popupText.slice(0, TEXT_LIMIT);
|
|
1284
|
-
return excludePatterns.some((p) => p.test(truncated));
|
|
1285
|
-
}
|
|
1286
1840
|
function classifyPopup(buttons) {
|
|
1287
1841
|
const { reject, settings, accept, acknowledge } = buttons.reduce(
|
|
1288
1842
|
(acc, button) => {
|
|
@@ -1345,6 +1899,8 @@ function classifyButtonTextRegex(buttonText) {
|
|
|
1345
1899
|
// lib/heuristics.ts
|
|
1346
1900
|
var BUTTON_LIKE_ELEMENT_SELECTOR = 'button, input[type="button"], input[type="submit"], a, [role="button"], [class*="button"]';
|
|
1347
1901
|
var POPUP_SEARCH_MAX_TIME = 100;
|
|
1902
|
+
var FRAGMENT_NEGATIVES = DETECT_CONTEXT_NEGATIVES.filter((n) => !n.whole);
|
|
1903
|
+
var hasFragmentPatterns = (text) => hasHeuristicPatterns(text, "popup", { negatives: FRAGMENT_NEGATIVES });
|
|
1348
1904
|
var ACCEPTED_LEVELS = {
|
|
1349
1905
|
off: [],
|
|
1350
1906
|
reject: ["reject"],
|
|
@@ -1380,7 +1936,7 @@ function isConsentPopup(popup) {
|
|
|
1380
1936
|
let result = consentPopups.get(popup);
|
|
1381
1937
|
if (result === void 0) {
|
|
1382
1938
|
const popupText = popup.text.trim();
|
|
1383
|
-
result = !!popupText &&
|
|
1939
|
+
result = !!popupText && hasHeuristicPatterns(popupText, "popup");
|
|
1384
1940
|
consentPopups.set(popup, result);
|
|
1385
1941
|
}
|
|
1386
1942
|
return result;
|
|
@@ -1517,7 +2073,7 @@ function isOnlyButtonText(text, buttons) {
|
|
|
1517
2073
|
}
|
|
1518
2074
|
function toPopupRoot(el, shadowHosts) {
|
|
1519
2075
|
const text = getElementText(el);
|
|
1520
|
-
if (!text || !
|
|
2076
|
+
if (!text || !hasFragmentPatterns(text)) {
|
|
1521
2077
|
return null;
|
|
1522
2078
|
}
|
|
1523
2079
|
const popup = toPopupData(el, shadowHosts, text);
|
|
@@ -1538,7 +2094,7 @@ function climbToPopup(el, maxDepth, toPopup, shouldStop) {
|
|
|
1538
2094
|
return null;
|
|
1539
2095
|
}
|
|
1540
2096
|
function expandPopupFragment(popup, shadowHosts) {
|
|
1541
|
-
if (
|
|
2097
|
+
if (hasFragmentPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
|
|
1542
2098
|
return popup;
|
|
1543
2099
|
}
|
|
1544
2100
|
const parent = getComposedParent(popup.element);
|
|
@@ -2126,6 +2682,7 @@ var shortcutOptIn = "#truste-consent-button";
|
|
|
2126
2682
|
var popupContent = "#truste-consent-content";
|
|
2127
2683
|
var bannerOverlay = "#trustarc-banner-overlay";
|
|
2128
2684
|
var bannerContainer = "#truste-consent-track";
|
|
2685
|
+
var prefCenterDeclineAll = [".truste_popframe.trustarc_newcm_container", 'button[data-button-key="decline_all"]'];
|
|
2129
2686
|
var TrustArcTop = class extends AutoConsentCMPBase {
|
|
2130
2687
|
constructor(autoconsentInstance) {
|
|
2131
2688
|
super(autoconsentInstance);
|
|
@@ -2137,12 +2694,13 @@ var TrustArcTop = class extends AutoConsentCMPBase {
|
|
|
2137
2694
|
};
|
|
2138
2695
|
this._shortcutButton = null;
|
|
2139
2696
|
this._optInDone = false;
|
|
2697
|
+
this._optOutDone = false;
|
|
2140
2698
|
}
|
|
2141
2699
|
get hasSelfTest() {
|
|
2142
2700
|
return true;
|
|
2143
2701
|
}
|
|
2144
2702
|
get isIntermediate() {
|
|
2145
|
-
if (this._optInDone) {
|
|
2703
|
+
if (this._optInDone || this._optOutDone) {
|
|
2146
2704
|
return false;
|
|
2147
2705
|
}
|
|
2148
2706
|
return !this._shortcutButton;
|
|
@@ -2167,6 +2725,10 @@ var TrustArcTop = class extends AutoConsentCMPBase {
|
|
|
2167
2725
|
}
|
|
2168
2726
|
hideElements(getStyleElement(), `.truste_popframe, .truste_overlay, .truste_box_overlay, ${bannerContainer}`);
|
|
2169
2727
|
await this.click(cookieSettingsButton);
|
|
2728
|
+
if (await this.waitForElement(prefCenterDeclineAll, 3e3)) {
|
|
2729
|
+
this._optOutDone = true;
|
|
2730
|
+
await this.click(prefCenterDeclineAll);
|
|
2731
|
+
}
|
|
2170
2732
|
setTimeout(() => {
|
|
2171
2733
|
getStyleElement().remove();
|
|
2172
2734
|
}, 1e4);
|
|
@@ -2845,6 +3407,14 @@ var Admiral = class extends AutoConsentCMPBase {
|
|
|
2845
3407
|
async optOut() {
|
|
2846
3408
|
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')]";
|
|
2847
3409
|
if (await this.waitForElement(rejectAllSelector, 500)) {
|
|
3410
|
+
const rejectButton = this.elementSelector(rejectAllSelector)[0];
|
|
3411
|
+
if (rejectButton.disabled) {
|
|
3412
|
+
const cardBody = rejectButton.closest("div[class*=CardHeader]")?.parentElement?.querySelector("div[class*=CardBody]");
|
|
3413
|
+
if (cardBody) {
|
|
3414
|
+
cardBody.scrollTop = cardBody.scrollHeight;
|
|
3415
|
+
}
|
|
3416
|
+
await waitFor(() => !rejectButton.disabled, 10, 200);
|
|
3417
|
+
}
|
|
2848
3418
|
return await this.click(rejectAllSelector);
|
|
2849
3419
|
}
|
|
2850
3420
|
const vrmCloseButton = this.getVrmCloseButton();
|
|
@@ -3395,19 +3965,19 @@ function shouldRunRuleInContext(rule, mainFrame, url) {
|
|
|
3395
3965
|
return true;
|
|
3396
3966
|
}
|
|
3397
3967
|
function filterCompactRules(rules, context) {
|
|
3398
|
-
const { v, s, r, index } = rules;
|
|
3968
|
+
const { v, s, r, index: index2 } = rules;
|
|
3399
3969
|
const { url, mainFrame } = context;
|
|
3400
3970
|
const shouldRunInContext = (rule) => shouldRunRuleInContext(rule, mainFrame, url);
|
|
3401
3971
|
if (!mainFrame) {
|
|
3402
3972
|
const ruleset = {
|
|
3403
3973
|
v,
|
|
3404
|
-
s: s.slice(0,
|
|
3405
|
-
r: r.slice(
|
|
3974
|
+
s: s.slice(0, index2.frameStringEnd),
|
|
3975
|
+
r: r.slice(index2.frameRuleRange[0], index2.frameRuleRange[1]).filter(shouldRunInContext)
|
|
3406
3976
|
};
|
|
3407
3977
|
return clearUnusedStrings(ruleset);
|
|
3408
3978
|
}
|
|
3409
|
-
const genericRules = r.slice(
|
|
3410
|
-
const specificRules = r.slice(
|
|
3979
|
+
const genericRules = r.slice(index2.genericRuleRange[0], index2.genericRuleRange[1]);
|
|
3980
|
+
const specificRules = r.slice(index2.specificRuleRange[0], index2.specificRuleRange[1]).filter(shouldRunInContext);
|
|
3411
3981
|
if (specificRules.length > 0) {
|
|
3412
3982
|
const ruleset = {
|
|
3413
3983
|
v,
|
|
@@ -3418,7 +3988,7 @@ function filterCompactRules(rules, context) {
|
|
|
3418
3988
|
}
|
|
3419
3989
|
return {
|
|
3420
3990
|
v,
|
|
3421
|
-
s: s.slice(0,
|
|
3991
|
+
s: s.slice(0, index2.genericStringEnd),
|
|
3422
3992
|
r: genericRules
|
|
3423
3993
|
};
|
|
3424
3994
|
}
|
|
@@ -3694,7 +4264,7 @@ var AutoConsent = class {
|
|
|
3694
4264
|
detectHeuristics() {
|
|
3695
4265
|
if (this.config.enableHeuristicDetection) {
|
|
3696
4266
|
this.config.performanceLoggingEnabled && performance.mark("detectHeuristicsStart");
|
|
3697
|
-
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "");
|
|
4267
|
+
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "", "page");
|
|
3698
4268
|
if (patterns.length > 0 && (patterns.length !== this.state.heuristicPatterns.length || this.state.heuristicPatterns.some((p, i) => p !== patterns[i]))) {
|
|
3699
4269
|
this.config.logs.lifecycle && console.log("Heuristic patterns found", patterns, snippets2);
|
|
3700
4270
|
this.updateState({ heuristicPatterns: patterns, heuristicSnippets: snippets2 });
|