PageSourceSearch

https://doazit.fr/extension/webpublic/design/webpublic/javascript/tarteaucitron/tarteaucitron.js

js doazit.fr collected 2026-10-03 02:46:28 UTC 90,445 bytes, 1,823 lines download raw bytes

1/*jslint browser: true, evil: true */
2
3var scripts = document.getElementsByTagName('script'),
4    path = scripts[scripts.length - 1].src.split('?')[0],
5    tarteaucitronForceCDN = (tarteaucitronForceCDN === undefined) ? '' : tarteaucitronForceCDN,
6    cdn = (tarteaucitronForceCDN === '') ? path.split('/').slice(0, -1).join('/') + '/' : tarteaucitronForceCDN,
7    alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch,
8    tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage,
9    tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire,
10    tarteaucitronCustomText = (tarteaucitronCustomText === undefined) ? '' : tarteaucitronCustomText,
11    // tarteaucitronExpireInDay: true for day(s) value - false for hour(s) value
12    tarteaucitronExpireInDay = (tarteaucitronExpireInDay === undefined || typeof tarteaucitronExpireInDay !== "boolean") ? true : tarteaucitronExpireInDay,
13    timeExpire = 31536000000,
14    tarteaucitronProLoadServices,
15    tarteaucitronNoAdBlocker = false;
16
17
18
19var tarteaucitron = {
20    "version": 20201110,
21    "cdn": cdn,
22    "user": {},
23    "lang": {},
24    "services": {},
25    "added": [],
26    "idprocessed": [],
27    "state": [],
28    "launch": [],
29    "parameters": {},
30    "isAjax": false,
31    "reloadThePage": false,
32    "events": {
33        "init": function () {},
34        "load": function () {},
35    },
36    "init": function (params) {
37        "use strict";
38        var origOpen;
39
40        tarteaucitron.parameters = params;
41        if (alreadyLaunch === 0) {
42            alreadyLaunch = 1;
43            if (window.addEventListener) {
44                window.addEventListener("load", function () {
45                    tarteaucitron.initEvents.loadEvent(false);
46                }, false);
47                window.addEventListener("scroll", function () {
48                    tarteaucitron.initEvents.scrollEvent();
49                }, false);
50
51                window.addEventListener("keydown", function (evt) {
52                    tarteaucitron.initEvents.keydownEvent(false, evt);
53                }, false);
54                window.addEventListener("hashchange", function () {
55                    tarteaucitron.initEvents.hashchangeEvent();
56                }, false);
57                window.addEventListener("resize", function () {
58                    tarteaucitron.initEvents.resizeEvent();
59                }, false);
60            } else {
61                window.attachEvent("onload", function () {
62                    tarteaucitron.initEvents.loadEvent(true);
63                });
vendor: 5,716 bytes, lines 63-196
63
64                window.attachEvent("onscroll", function () {
65                    tarteaucitron.initEvents.scrollEvent();
66                });
67                window.attachEvent("onkeydown", function (evt) {
68                    tarteaucitron.initEvents.keydownEvent(true, evt);
69
70                });
71                window.attachEvent("onhashchange", function () {
72                    tarteaucitron.initEvents.hashchangeEvent();
73                });
74                window.attachEvent("onresize", function () {
75                    tarteaucitron.initEvents.resizeEvent();
76                });
77            }
78
79            if (typeof XMLHttpRequest !== 'undefined') {
80                origOpen = XMLHttpRequest.prototype.open;
81                XMLHttpRequest.prototype.open = function () {
82
83                    if (window.addEventListener) {
84                        this.addEventListener("load", function () {
85                            if (typeof tarteaucitronProLoadServices === 'function') {
86                                tarteaucitronProLoadServices();
87                            }
88                        }, false);
89                    } else if (typeof this.attachEvent !== 'undefined') {
90                        this.attachEvent("onload", function () {
91                            if (typeof tarteaucitronProLoadServices === 'function') {
92                                tarteaucitronProLoadServices();
93                            }
94                        });
95                    } else {
96                        if (typeof tarteaucitronProLoadServices === 'function') {
97                            setTimeout(tarteaucitronProLoadServices, 1000);
98                        }
99                    }
100
101                    try {
102                        origOpen.apply(this, arguments);
103                    } catch (err) {}
104                };
105            }
106        }
107
108        if(tarteaucitron.events.init) {
109            tarteaucitron.events.init();
110        }
111    },
112    "initEvents": {
113        "loadEvent": function (isOldBrowser) {
114            tarteaucitron.load();
115            tarteaucitron.fallback(['tarteaucitronOpenPanel'], function (elem) {
116                if (isOldBrowser) {
117                    elem.attachEvent("onclick", function (event) {
118                        tarteaucitron.userInterface.openPanel();
119                        event.preventDefault();
120                    });
121                } else {
122                    elem.addEventListener("click", function (event) {
123                        tarteaucitron.userInterface.openPanel();
124                        event.preventDefault();
125                    }, false);
126                }
127            }, true);
128        },
129        "keydownEvent": function (isOldBrowser, evt) {
130            if (evt.keyCode === 27) {
131                tarteaucitron.userInterface.closePanel();
132            }
133
134            if (isOldBrowser) {
135                if ( evt.keyCode === 9 && focusableEls.indexOf(evt.target) >= 0) {
136                    if ( evt.shiftKey ) /* shift + tab */ {
137                        if (document.activeElement === firstFocusableEl) {
138                            lastFocusableEl.focus();
139                            evt.preventDefault();
140                        }
141                    } else /* tab */ {
142                        if (document.activeElement === lastFocusableEl) {
143                            firstFocusableEl.focus();
144                            evt.preventDefault();
145                        }
146                    }
147                }
148            }
149        },
150        "hashchangeEvent": function () {
151            if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
152                tarteaucitron.userInterface.openPanel();
153            }
154        },
155        "resizeEvent": function () {
156            var tacElem = document.getElementById('tarteaucitron');
157            var tacCookieContainer = document.getElementById('tarteaucitronCookiesListContainer');
158
159            if (tacElem && tacElem.style.display === 'block') {
160                tarteaucitron.userInterface.jsSizing('main');
161            }
162
163            if (tacCookieContainer && tacCookieContainer.style.display === 'block') {
164                tarteaucitron.userInterface.jsSizing('cookie');
165            }
166        },
167        "scrollEvent": function () {
168            var scrollPos = window.pageYOffset || document.documentElement.scrollTop;
169            var heightPosition;
170            var tacPercentage = document.getElementById('tarteaucitronPercentage');
171            var tacAlertBig = document.getElementById('tarteaucitronAlertBig');
172
173            if (tacAlertBig && !tarteaucitron.highPrivacy) {
174                if (tacAlertBig.style.display === 'block') {
175                    heightPosition = tacAlertBig.offsetHeight + 'px';
176
177                    if (scrollPos > (screen.height * 2)) {
178                        tarteaucitron.userInterface.respondAll(true);
179                    } else if (scrollPos > (screen.height / 2)) {
180                        document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<strong>' + tarteaucitron.lang.alertBigScroll + '</strong> ' + tarteaucitron.lang.alertBig;
181                    }
182
183                    if (tacPercentage) {
184                        if (tarteaucitron.orientation === 'top') {
185                            tacPercentage.style.top = heightPosition;
186                        } else {
187                            tacPercentage.style.bottom = heightPosition;
188                        }
189                        tacPercentage.style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
190                    }
191                }
192            }
193        },
194    },
195    "load": function () {
196        "use strict";
197        var cdn = tarteaucitron.cdn,
198            language = tarteaucitron.getLanguage(),
199            pathToLang = cdn + 'lang/tarteaucitron.' + language + '.js?v=' + tarteaucitron.version,
200            pathToServices = cdn + 'tarteaucitron.services.js?v=' + tarteaucitron.version,
201            linkElement = document.createElement('link'),
202            defaults = {
203                "adblocker": false,
204                "hashtag": '#tarteaucitron',
205                "cookieName": 'tarteaucitron',
206                "highPrivacy": true,
207                "orientation": "middle",
208                "bodyPosition": "bottom",
209                "removeCredit": false,
210                "showAlertSmall": false,
211                "showIcon": true,
212                "iconPosition": "BottomRight",
213                "cookieslist": false,
214                "handleBrowserDNTRequest": false,
215                "DenyAllCta": true,
216                "AcceptAllCta" : true,
217                "moreInfoLink": true,
218                "privacyUrl": "",
219                "useExternalCss": false,
220                "useExternalJs": false,
221                "mandatory": true,
222                "closePopup": false
223            },
224            params = tarteaucitron.parameters;
225
226        // Don't show the middle bar if we are on the privacy policy or more page
227        if (((tarteaucitron.parameters.readmoreLink !== undefined && window.location.href == tarteaucitron.parameters.readmoreLink) || window.location.href == tarteaucitron.parameters.privacyUrl) && tarteaucitron.parameters.orientation == "middle") {
228            tarteaucitron.parameters.orientation = "bottom";
229        }
230
231        // Step -1
232        if (typeof tarteaucitronCustomPremium !== 'undefined') {
233            tarteaucitronCustomPremium();
234        }
235
236        // Step 0: get params
237        if (params !== undefined) {
238
239            for (var k in defaults) {
240                if(!tarteaucitron.parameters.hasOwnProperty(k)) {
241                    tarteaucitron.parameters[k] = defaults[k];
242                }
243            }
244        }
245
246        // global
247        tarteaucitron.orientation = tarteaucitron.parameters.orientation;
248        tarteaucitron.hashtag = tarteaucitron.parameters.hashtag;
249        tarteaucitron.highPrivacy = tarteaucitron.parameters.highPrivacy;
250        tarteaucitron.handleBrowserDNTRequest = tarteaucitron.parameters.handleBrowserDNTRequest;
251
252        // Step 1: load css
253        if ( !tarteaucitron.parameters.useExternalCss ) {
254            linkElement.rel = 'stylesheet';
255            linkElement.type = 'text/css';
256            linkElement.href = cdn + 'css/tarteaucitron.css?v=' + tarteaucitron.version;
257            document.getElementsByTagName('head')[0].appendChild(linkElement);
258        }
259        // Step 2: load language and services
260        tarteaucitron.addInternalScript(pathToLang, '', function () {
261
262          if(tarteaucitronCustomText !== ''){
263            tarteaucitron.lang = tarteaucitron.AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText);
264          }
265            tarteaucitron.addInternalScript(pathToServices, '', function () {
266
267
268                // css for new middle bar
269                if (tarteaucitron.orientation === 'middle') {
270                    var customThemeMiddle = document.createElement('style'),
271                        cssRuleMiddle = 'div#tarteaucitronRoot.tarteaucitronBeforeVisible:before {content: \'\';position: fixed;width: 100%;height: 100%;background: white;top: 0;left: 0;z-index: 999;opacity: 0.5;}div#tarteaucitronAlertBig:before {content: \'' + tarteaucitron.lang.middleBarHead + '\';font-size: 35px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {width: 60%;min-width: 285px;height: auto;margin: auto;left: 50%;top: 50%;transform: translate(-50%, -50%);box-shadow: 0 0 9000px #000;border-radius: 20px;padding: 35px 25px;}span#tarteaucitronDisclaimerAlert {padding: 0 30px;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 10px 0 30px;display: block;text-align: center;font-size: 21px;}@media screen and (max-width: 900px) {div#tarteaucitronAlertBig button {margin: 0 auto 10px!important;display: block!important;}}';
272
273                    customThemeMiddle.type = 'text/css';
274                    if (customThemeMiddle.styleSheet) {
275                        customThemeMiddle.styleSheet.cssText = cssRuleMiddle;
276                    } else {
277                        customThemeMiddle.appendChild(document.createTextNode(cssRuleMiddle));
278                    }
279                    document.getElementsByTagName('head')[0].appendChild(customThemeMiddle);
280                }
281                var body = document.body,
282                    div = document.createElement('div'),
283                    html = '',
284                    index,
285                    orientation = 'Top',
286                    cat = ['ads', 'analytic', 'api', 'comment', 'social', 'support', 'video', 'other'],
287                    i;
288
289                cat = cat.sort(function (a, b) {
290                    if (tarteaucitron.lang[a].title > tarteaucitron.lang[b].title) { return 1; }
291                    if (tarteaucitron.lang[a].title < tarteaucitron.lang[b].title) { return -1; }
292                    return 0;
293                });
294
295                // Step 3: prepare the html
296                html += '<div id="tarteaucitronPremium"></div>';
297                html += '<button type="button" id="tarteaucitronBack" aria-label="' + tarteaucitron.lang.close + '"></button>';
298                html += '<div id="tarteaucitron" role="dialog" aria-labelledby="dialogTitle">';
299                html += '   <button type="button" id="tarteaucitronClosePanel">';
300                html += '       ' + tarteaucitron.lang.close;
301                html += '   </button>';
302                html += '   <div id="tarteaucitronServices">';
303                html += '      <div class="tarteaucitronLine tarteaucitronMainLine" id="tarteaucitronMainLineOffset">';
304                html += '         <span class="tarteaucitronH1" role="heading" aria-level="1" id="dialogTitle">'+ tarteaucitron.lang.title + '</span>';
305                html += '         <div id="tarteaucitronInfo">';
306                html += '         ' + tarteaucitron.lang.disclaimer;
307                if (tarteaucitron.parameters.privacyUrl !== "") {
308                    html += '   <br/><br/>';
309                    html += '   <button type="button" id="tarteaucitronPrivacyUrlDialog">';
310                    html += '       ' + tarteaucitron.lang.privacyUrl;
311                    html += '   </button>';
312                }
313                html += '         </div>';
314                html += '         <div class="tarteaucitronName">';
315                html += '            <span class="tarteaucitronH2" role="heading" aria-level="2">' + tarteaucitron.lang.all + '</span>';
316                html += '         </div>';
317                html += '         <div class="tarteaucitronAsk" id="tarteaucitronScrollbarAdjust">';
318                html += '            <button type="button" id="tarteaucitronAllAllowed" class="tarteaucitronAllow">';
319                html += '               <span class="tarteaucitronCheck"></span> ' + tarteaucitron.lang.allowAll;
320                html += '            </button> ';
321                html += '            <button type="button" id="tarteaucitronAllDenied" class="tarteaucitronDeny">';
322                html += '               <span class="tarteaucitronCross"></span> ' + tarteaucitron.lang.denyAll;
323                html += '            </button>';
324                html += '         </div>';
325                html += '      </div>';
326                html += '      <div class="tarteaucitronBorder">';
327                html += '         <div class="clear"></div><ul>';
328
329
330                if (tarteaucitron.parameters.mandatory == true) {
331                   html += '<li id="tarteaucitronServicesTitle_mandatory">';
332                   html += '<div class="tarteaucitronTitle">';
333                   html += '   <button type="button" tabindex="-1">&nbsp; ' + tarteaucitron.lang.mandatoryTitle + '</button>';
334                   html += '</div>';
335                   html += '<ul id="tarteaucitronServices_mandatory">';
336                   html += '<li class="tarteaucitronLine">';
337                   html += '   <div class="tarteaucitronName">';
338                   html += '       <span class="tarteaucitronH3" role="heading" aria-level="3">' + tarteaucitron.lang.mandatoryText + '</span>';
339                   html += '       <span class="tarteaucitronListCookies"></span><br/>';
340                   html += '   </div>';
341                   html += '   <div class="tarteaucitronAsk">';
342                   html += '       <button type="button" class="tarteaucitronAllow" tabindex="-1">';
343                   html += '           <span class="tarteaucitronCheck"></span> ' + tarteaucitron.lang.allow;
344                   html += '       </button> ';
345                   html += '       <button type="button" class="tarteaucitronDeny" style="visibility:hidden" tabindex="-1">';
346                   html += '           <span class="tarteaucitronCross"></span> ' + tarteaucitron.lang.deny;
347                   html += '       </button> ';
348                   html += '   </div>';
349                   html += '</li>';
350                   html += '</ul></li>';
351                }
352
353                for (i = 0; i < cat.length; i += 1) {
354                    html += '         <li id="tarteaucitronServicesTitle_' + cat[i] + '" class="tarteaucitronHidden">';
355                    html += '            <div class="tarteaucitronTitle">';
356                    html += '               <button type="button" class="catToggleBtn" data-cat="tarteaucitronDetails' + cat[i] + '"><span class="tarteaucitronPlus"></span> ' + tarteaucitron.lang[cat[i]].title + '</button>';
357                    html += '            </div>';
358                    html += '            <div id="tarteaucitronDetails' + cat[i] + '" class="tarteaucitronDetails tarteaucitronInfoBox">';
359                    html += '               ' + tarteaucitron.lang[cat[i]].details;
360                    html += '            </div>';
361                    html += '         <ul id="tarteaucitronServices_' + cat[i] + '"></ul></li>';
362                }
363                html += '             <li id="tarteaucitronNoServicesTitle" class="tarteaucitronLine">' + tarteaucitron.lang.noServices + '</li>';
364                html += '         </ul>';
365                html += '         <div class="tarteaucitronHidden spacer-20" id="tarteaucitronScrollbarChild"></div>';
366                if (tarteaucitron.parameters.removeCredit === false) {
367                    html += '     <a class="tarteaucitronSelfLink" href="https://tarteaucitron.io/" rel="nofollow noreferrer noopener" target="_blank" title="tarteaucitron ' + tarteaucitron.lang.newWindow + '"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAAAeCAYAAAAWwoEYAAADl0lEQVRoge1Y0W3bQAx9CjKARlC+9GVUmqDJBHEmiDyB6wkcTxBngtgTxJ0gzgQW4C/9aYOmE6g4lTQo+k6y3Rb94QOERNQd+cjj8XiGwWAwGAwGg8FgMBgMBoPB8F8RNRXe+whEKe7c36ZCAeCRxC9Rig2PUd8kPgAsoxSfQ3YAzAA8D/HwYYCb05kBKKO0teFkmbC1jlKsAnq/Abjn+QBqAIsoRS30ttwG/HNz1wH/XIxWTicLdvtW7xTAGEAMtP685CNsBTe2d/BLydfXAG57SEnMAST0zgYZSUCPk02bCvkJduIzuJzDLfPolbY+tLKmar+/8+IRePy4qdpE03qHuH8fipFb4N2+XdA3AJ/0vaQxt7s9FvkIS2XvtqnwM0rxpOQfbnE5G2LhTCmUO2fHIngOmcv+KG3HafDchB6ntwjYqenR2PqC7sOZ3E7FXHB0vqxoFyUyLh7OEH7LOGouvhhN3eIBeKXv0n5MsufdHqXcwYR5U2EbpV35lSspVPJmQj4TcgRK7jTg5IzmPUhhwM5a2WHUFCx+NgiDucmgh7idikLovHFlL0pxQ9xzX+IIP9Y6FrJsqhjlQpZRAkFVDCjZfcCHt6bqJDmuh5ylCWx0RVnk3oumaknqTH5sqrY0fBWyULaHUIgAgxb46MxV3DbieAhxOxUxjSuljig9lMQ/Bcfoi9BTEv9aLORSndVxYOH525sUDC6u2gWxcNzBNRxPanyh3ktKinOgy3WoxPbtUM0t6RkbQnzBnFPgi9GCOEubY9UffIryz9iKRe8s/FUfEWosJJGxagp85bpUO3VywQ46lOtAWfNxKwa4JXQ+628+bpxYGXXMzp5rXH401VEyXwIdowXFaKWSMFHvMTVmGnc+P3oXV2QOiBCfgex8QtcQCbcQE/H+eoHzrkFo1KM7zVO4jVVj5s6lRiWF7zyXyfRMc97J3tzj87mYqZ7E2YjzUct9GUi4tjHLR8dVkBLjQcuHFleWvQfRNEhFR7uX7pkctOwvZXsft7sAtyldEUIN2UTeLxnEfxKYswzdi88BdbZ8hifUoSMftQvP+muRwN6+Q3DeqqRExP9QmTtcheiHh0Ot1x2i2km1bP9pbufw5zZdyWsOrh7vQae5OZWbsMv30pi7cd/CKj3coPEVaCP4Zhx4eQWhOZ1Y9MTXGyP8/iGjEyfa1T4fO/4Lea9vBoPBYDAYDAaDwWAwGAwGwz8GgF8siXCCbrSRhgAAAABJRU5ErkJggg==" alt="tarteaucitron.io" /></a>';
368                }
369                html += '       </div>';
370                html += '   </div>';
371                html += '</div>';
372
373                if (tarteaucitron.parameters.orientation === 'bottom') {
374                    orientation = 'Bottom';
375                }
376
377                if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) {
378                    html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
379                    //html += '<div class="tarteaucitronAlertBigWrapper">';
380                    html += '   <span id="tarteaucitronDisclaimerAlert">';
381                    html += '       ' + tarteaucitron.lang.alertBigPrivacy;
382                    html += '   </span>';
383                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
384                    html += '   <button type="button" id="tarteaucitronPersonalize">';
385                    html += '       ' + tarteaucitron.lang.personalize;
386                    html += '   </button>';
387
388                    if (tarteaucitron.parameters.privacyUrl !== "") {
389                        html += '   <button type="button" id="tarteaucitronPrivacyUrl">';
390                        html += '       ' + tarteaucitron.lang.privacyUrl;
391                        html += '   </button>';
392                    }
393
394                    //html += '   </span>';
395                    //html += '</div>';
396                    html += '</div>';
397                } else {
398                    html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
399                    //html += '<div class="tarteaucitronAlertBigWrapper">';
400                    html += '   <span id="tarteaucitronDisclaimerAlert">';
401
402                    if (tarteaucitron.parameters.highPrivacy) {
403                        html += '       ' + tarteaucitron.lang.alertBigPrivacy;
404                    } else {
405                        html += '       ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig;
406                    }
407
408                    html += '   </span>';
409                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
410                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronAllow" id="tarteaucitronPersonalize2">';
vendor: 2,017 bytes, lines 411-441
411                    html += '       <span class="tarteaucitronCheck"></span> ' + tarteaucitron.lang.acceptAll;
412                    html += '   </button>';
413
414
415                    if (tarteaucitron.parameters.DenyAllCta) {
416                                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2">';
417                                    html += '       <span class="tarteaucitronCross"></span> ' + tarteaucitron.lang.denyAll;
418                                    html += '   </button>';
419                                    //html += '   <br/><br/>';
420                    }
421
422                    html += '   <button type="button" id="tarteaucitronCloseAlert">';
423                    html += '       ' + tarteaucitron.lang.personalize;
424                    html += '   </button>';
425
426                    if (tarteaucitron.parameters.privacyUrl !== "") {
427                        html += '   <button type="button" id="tarteaucitronPrivacyUrl">';
428                        html += '       ' + tarteaucitron.lang.privacyUrl;
429                        html += '   </button>';
430                    }
431
432                    //html += '   </span>';
433                    //html += '</div>';
434                    html += '</div>';
435                    html += '<div id="tarteaucitronPercentage"></div>';
436                }
437
438                if (tarteaucitron.parameters.showIcon === true) {
439                    html += '<div id="tarteaucitronIcon" class="tarteaucitronIcon' + tarteaucitron.parameters.iconPosition + '">';
440                    html += '   <button type="button" id="tarteaucitronManager">';
441                    html += '       <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAGA0lEQVRoge1a207bWBRdBtJwLYZhKDMVmlSK1LxNkPo+ZH6g8B6p5AuALwC+APoFoVLeoT8whPeRSt+CZKmZVu3AiIsRlEtCktGyjy8xzuXYhvahS0JJHJ/4rLP3XnuffcAPfGdQ7mM6jRLSAF4BxqsbewB2lRS2o35mpEQaJcwCyANIdLi1DGBNSWEzqmdHRqRRwjqAJclhtExOSUEP+/xIiDRKhhUWfL7ShTtBuJnqcw+/z4Ql0xNmMEwSSz4ku
441NIzSgpjSsqYJP/GeE185wYJroedRyiLNEpGLLzzrHSuk+83SgbxvOcyyRaDziWsRVZkSRDinpzPbwVGWIucuohsKynMS47fAQyls/BMSRmKJo3AFhG5wm2N1wF+Zs3zebbFfR0RxrXcJHQlgH+LMW616pR/WiIMEXfW3mtzXyeEGWsjKot8c4TOI98L+iKaR5PS6IUk88RLAO9F8UjrbYoYMOosNavpfmODIiwRXRR/G3ohaWVo1RU/c30jV8ab2mV8qVGzHWBOLyTLZiWs5Rolg/C3ySOi0tXP/k4aEwOwSBKPJs7Rp16ABJTe+p1xVX0It/owqqdDEMRoqd3RFxqDPh20Ig6VEPVC0i5RSCD+6wl6HlW7GksSlUMV11/GrUs5NasFLusDE9ELSVphXemtJwaT/8JyIRvxNNCfBmIiNdR04LII3DSrbe0yjqvyJF/ppptqVlt+MCLCEh/oOkPPP6N38Mb5cnQBGFsEqmXg5j3QMwoMzwGnr4HYbybBq13gZAOom/FO63zdf2qQArCsZrUN2TlJy69eSDKYV+6Q4MpP75ivHzPA53ngaBW4eGuSOt0A/lsGPmXMz0+3TFJcTfFbPfFbfnwlhON+iQhlWmA82CQ4ocQ7c6KcfL3DHuls0yT6Sx4YnLXJDCQOIRRv5yGIJBgP8Sdisj2qubpc5UGJmo+W49ifVmzL8HcpGhQPvZCUKiCliIhEN0tr2OCqHuSA8gwQ/92MkU7gxEmeVqGrTTgpxPXbUrtGWYus0I9thRIraagRQUIDf7Qn4yZhKRiFQIyhfMfUr3yblokVWSJ6k8xSnc7eNN/RjowfCYiFoDUFer1S3gW6JiJ8Nt30EMbEhU+vzSIztuRYjRLsR8IHLjlf7HZ+MrWWEXxNmbvapt4jGSqZRYSkGUetSNTPzHsui5YMQ2ajJUNks6mw4wT54Ok2ShnzzIPCUGshzawCRKy5FqvrTZe0RWzQGvw79m67XZjKmxJrLsICjtZa55gxXy+6F4sYsEtxTqhXdRTLC8ulSDaWoCLsolfN+8YUhOsJV709H7Cudr0LlVEtzqBcN+shEyThdR941OnAbF8pirKJqXyupTRTtQSReiVmXW1j7oBErB0d9xM2WEd5J9ZKYtuR4WKwwBSoORbpGrJ5ZI9lt71irJmGX1px0JYE26uNErawr2zfIcP4OHEKXm66PA3wjpCNEfpJunI4muifPjKvsFCkGjExTq63yxMJsZNMYF/J4HmDC5A3Yq36jy0ClePHVhwuu/b1HSFlEfHD5ZtD1bEK44Qu1mWys6tbWmZyPWckzlPTGiRw/XHCuk+q4Rek+mVrVL/UppwrdDEGNV2kpyuhccgc5Oxm9vWnn+19vJrVpLor0kTUrGacMplb1CfOFyTD4o9uNrHqr2Z+ZMSp1c2XcVSORnh9Q81q3k599ETgkNnjg0nGzi10K7rX+bZpHbrblPcY5A4Zxk2xcjzCvTpd9027Aa0QtouyyrKFRR6D/04DwkFGvHPXM3Qda/Jb4nPgI7hQLVM1q5HIBt2MzQNa57Z1DiiLAGa5Mi+O4Sz3Mpp6laPHO6InII3ITnX1QtI+EOX+m9ZxleOZ/j9PiuKoLi3aqXPuEoSye/Vhkm+LalbLtHhMS0R6zu7aZ3vP2jOjL7QVv4McxhcDnZIelAQibGIbULOapf3PuE1Vs9qeaOTdkVKr00gCQiw4NlBzDvf1Lxx+uP5r3Dgv5KQZRzWn+GRwz8jmDS8itUg7iB6vLuJCF5Uty4A9mVKkFR6MiJDachST/oHvHgD+B4SoUIitpF05AAAAAElFTkSuQmCC" alt="Cookies">';
442                    html += '   </button>';
443                    html += '</div>';
444                }
445
446                if (tarteaucitron.parameters.showAlertSmall === true) {
447                    html += '<div id="tarteaucitronAlertSmall" class="tarteaucitronAlertSmall' + orientation + '">';
448                    html += '   <button type="button" id="tarteaucitronManager">';
449                    html += '       ' + tarteaucitron.lang.alertSmall;
450                    html += '       <span id="tarteaucitronDot">';
451                    html += '           <span id="tarteaucitronDotGreen"></span>';
452                    html += '           <span id="tarteaucitronDotYellow"></span>';
453                    html += '           <span id="tarteaucitronDotRed"></span>';
454                    html += '       </span>';
455                    if (tarteaucitron.parameters.cookieslist === true) {
456                        html += '   </button><!-- @whitespace';
457                        html += '   --><button type="button" id="tarteaucitronCookiesNumber">0</button>';
458                        html += '   <div id="tarteaucitronCookiesListContainer">';
459                        html += '       <button type="button" id="tarteaucitronClosePanelCookie">';
460                        html += '           ' + tarteaucitron.lang.close;
461                        html += '       </button>';
462                        html += '       <div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">';
463                        html += '            <span class="tarteaucitronH2" role="heading" aria-level="2" id="tarteaucitronCookiesNumberBis">0 cookie</span>';
464                        html += '       </div>';
465                        html += '       <div id="tarteaucitronCookiesList"></div>';
466                        html += '    </div>';
467                    } else {
468                        html += '   </div>';
469                    }
470                    html += '</div>';
471                }
472
473                tarteaucitron.addInternalScript(tarteaucitron.cdn + 'advertising.js?v=' + tarteaucitron.version, '', function () {
474                    if (tarteaucitronNoAdBlocker === true || tarteaucitron.parameters.adblocker === false) {
475
476                        // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened
477                        /*var wrapper = document.createElement('div');
478                        wrapper.id = "contentWrapper";
479
480                        while (document.body.firstChild)
481                        {
482                            wrapper.appendChild(document.body.firstChild);
483                        }
484
485                        // Append the wrapper to the body
486                        document.body.appendChild(wrapper);*/
487
488                        div.id = 'tarteaucitronRoot';
489                        if (tarteaucitron.parameters.bodyPosition === 'top') {
490                            // Prepend tarteaucitron: #tarteaucitronRoot first-child of the body for better accessibility
491                            var bodyFirstChild = body.firstChild;
492                            body.insertBefore(div, bodyFirstChild);
493                        }
494                        else {
495                            // Append tarteaucitron: #tarteaucitronRoot last-child of the body
496                            body.appendChild(div, body);
497                        }
498                        div.innerHTML = html;
499
500                        //ie compatibility
501                        var tacRootAvailableEvent;
502                        if(typeof(Event) === 'function') {
503                            tacRootAvailableEvent = new Event("tac.root_available");
504                        }else{
505                            tacRootAvailableEvent = document.createEvent('Event');
506                            tacRootAvailableEvent.initEvent("tac.root_available", true, true);
507                        }
508                        //end ie compatibility
509
510                        window.dispatchEvent(tacRootAvailableEvent);
511
512                        if (tarteaucitron.job !== undefined) {
513                            tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job);
514                            for (index = 0; index < tarteaucitron.job.length; index += 1) {
515                                tarteaucitron.addService(tarteaucitron.job[index]);
516                            }
517                        } else {
518                            tarteaucitron.job = []
519                        }
520
521                        tarteaucitron.isAjax = true;
522
523                        tarteaucitron.job.push = function (id) {
524
525                            // ie <9 hack
526                            if (typeof tarteaucitron.job.indexOf === 'undefined') {
527                                tarteaucitron.job.indexOf = function (obj, start) {
528                                    var i,
529                                        j = this.length;
530                                    for (i = (start || 0); i < j; i += 1) {
531                                        if (this[i] === obj) { return i; }
532                                    }
533                                    return -1;
534                                };
535                            }
536
537                            if (tarteaucitron.job.indexOf(id) === -1) {
538                                Array.prototype.push.call(this, id);
539                            }
540                            tarteaucitron.launch[id] = false;
541                            tarteaucitron.addService(id);
542                        };
543
544                        if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
545                            tarteaucitron.userInterface.openPanel();
546                        }
547
548                        tarteaucitron.cookie.number();
549                        setInterval(tarteaucitron.cookie.number, 60000);
550                    }
551                }, tarteaucitron.parameters.adblocker);
552
553                if (tarteaucitron.parameters.adblocker === true) {
554                    setTimeout(function () {
555                        if (tarteaucitronNoAdBlocker === false) {
556                            html = '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + ' display-block" role="alert" aria-live="polite">';
557                            html += '   <p id="tarteaucitronDisclaimerAlert">';
558                            html += '       ' + tarteaucitron.lang.adblock + '<br/>';
559                            html += '       <strong>' + tarteaucitron.lang.adblock_call + '</strong>';
560                            html += '   </p>';
561                            html += '   <button type="button" class="tarteaucitronCTAButton" id="tarteaucitronCTAButton">';
562                            html += '       ' + tarteaucitron.lang.reload;
563                            html += '   </button>';
564                            html += '</div>';
565                            html += '<div id="tarteaucitronPremium"></div>';
566
567                            div.id = 'tarteaucitronRoot';
568                            if (tarteaucitron.parameters.bodyPosition === 'top') {
569                                // Prepend tarteaucitron: #tarteaucitronRoot first-child of the body for better accessibility
570                                var bodyFirstChild = body.firstChild;
571                                body.insertBefore(div, bodyFirstChild);
572                            }
573                            else {
574                                // Append tarteaucitron: #tarteaucitronRoot last-child of the body
575                                body.appendChild(div, body);
576                            }
577                            div.innerHTML = html;
578                        }
579                    }, 1500);
580                }
581                if(tarteaucitron.parameters.closePopup === true){
582                    let element = document.getElementById('tarteaucitronAlertBig');
583                    let span = document.createElement('span')
584                    span.textContent = 'X';
585                    span.style.cssText = 'position:absolute; color: #FFFF; font-size:2rem; cursor: pointer; top: 10px; right: 26px';
586                    span.setAttribute('id', "clossCross")
587                    element.insertBefore(span, element.firstElementChild)
588                    document.getElementById("clossCross").onclick = () =>{
589                        tarteaucitron.userInterface.closeAlert();
590                    }
591                }
592
593
594
595                // add a little timeout to be sure everything is accessible
596                setTimeout(function () {
597                    
598                    // Setup events
599                    tarteaucitron.addClickEventToId("tarteaucitronPersonalize", function () {
600                        tarteaucitron.userInterface.openPanel();
601                    });
602                    tarteaucitron.addClickEventToId("tarteaucitronPersonalize2", function () {
603                        tarteaucitron.userInterface.respondAll(true);
604                    });
605                    tarteaucitron.addClickEventToId("tarteaucitronManager", function () {
606                        tarteaucitron.userInterface.openPanel();
607                    });
608                    tarteaucitron.addClickEventToId("tarteaucitronBack", function () {
609                        tarteaucitron.userInterface.closePanel();
610                    });
611                    tarteaucitron.addClickEventToId("tarteaucitronClosePanel", function () {
612                        tarteaucitron.userInterface.closePanel();
613                    });
614                    tarteaucitron.addClickEventToId("tarteaucitronClosePanelCookie", function () {
615                        tarteaucitron.userInterface.closePanel();
616                    });
617                    tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrl", function () {
618                        document.location = tarteaucitron.parameters.privacyUrl;
619                    });
620                    tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrlDialog", function () {
621                        document.location = tarteaucitron.parameters.privacyUrl;
622                    });
623                    tarteaucitron.addClickEventToId("tarteaucitronCookiesNumber", function () {
624                        tarteaucitron.userInterface.toggleCookiesList();
625                    });
626                    tarteaucitron.addClickEventToId("tarteaucitronAllAllowed", function () {
627                        tarteaucitron.userInterface.respondAll(true);
628                    });
629                    tarteaucitron.addClickEventToId("tarteaucitronAllDenied", function () {
630                        tarteaucitron.userInterface.respondAll(false);
631                    });
632                    tarteaucitron.addClickEventToId("tarteaucitronAllDenied2", function () {
633                        tarteaucitron.userInterface.respondAll(false);
634                        if (tarteaucitron.reloadThePage === true) {
635                            window.location.reload();
636                        }
637                    });
638                    tarteaucitron.addClickEventToId("tarteaucitronCloseAlert", function () {
639                        tarteaucitron.userInterface.openPanel();
640                    });
641                    tarteaucitron.addClickEventToId("tarteaucitronCTAButton", function () {
642                        location.reload();
643                    });
644                    var toggleBtns = document.getElementsByClassName("catToggleBtn"), i;
645                    for (i = 0; i < toggleBtns.length; i++) {
646                        toggleBtns[i].dataset.index = i;
647                        tarteaucitron.addClickEventToElement(toggleBtns[i], function () {
648                            tarteaucitron.userInterface.toggle('tarteaucitronDetails' + cat[this.dataset.index], 'tarteaucitronInfoBox');
649                            return false;
650                        });
651                    }
652
653                    var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
654                    for (i = 0; i < allowBtns.length; i++) {
655                        tarteaucitron.addClickEventToElement(allowBtns[i], function () {
656                            tarteaucitron.userInterface.respond(this, true);
657                        });
658                    }
659                    var denyBtns = document.getElementsByClassName("tarteaucitronDeny");
660                    for (i = 0; i < denyBtns.length; i++) {
661                        tarteaucitron.addClickEventToElement(denyBtns[i], function () {
662                            tarteaucitron.userInterface.respond(this, false);
663                        });
664                    }
665                }, 500);
666                
667            });
668        });
669
670        if(tarteaucitron.events.load) {
671            tarteaucitron.events.load();
672        }
673    },
674    "addService": function (serviceId) {
675        "use strict";
676        var html = '',
677            s = tarteaucitron.services,
678            service = s[serviceId],
679            cookie = tarteaucitron.cookie.read(),
680            hostname = document.location.hostname,
681            hostRef = document.referrer.split('/')[2],
682            isNavigating = (hostRef === hostname && window.location.href !== tarteaucitron.parameters.privacyUrl),
683            isAutostart = (!service.needConsent),
684            isWaiting = (cookie.indexOf(service.key + '=wait') >= 0),
685            isDenied = (cookie.indexOf(service.key + '=false') >= 0),
686            isAllowed = ((cookie.indexOf(service.key + '=true') >= 0) || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)),
687            isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0),
688            isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1");
689
690        if (tarteaucitron.added[service.key] !== true) {
691            tarteaucitron.added[service.key] = true;
692
693            html += '<li id="' + service.key + 'Line" class="tarteaucitronLine">';
694            html += '   <div class="tarteaucitronName">';
695            html += '       <span class="tarteaucitronH3" role="heading" aria-level="3">' + service.name + '</span>';
696            html += '       <span id="tacCL' + service.key + '" class="tarteaucitronListCookies"></span><br/>';
697
698            if (tarteaucitron.parameters.moreInfoLink == true) {
699
700                var link = 'https://tarteaucitron.io/service/' + service.key + '/';
701                if (service.readmoreLink !== undefined && service.readmoreLink !== '') {
702                    link = service.readmoreLink;
703                }
704                if (tarteaucitron.parameters.readmoreLink !== undefined && tarteaucitron.parameters.readmoreLink !== '') {
705                    link = tarteaucitron.parameters.readmoreLink;
706                }
707                html += '       <a href="' + link + '" target="_blank" rel="noreferrer noopener nofollow" title="'+ tarteaucitron.lang.cookieDetail + ' ' + service.name + ' ' + tarteaucitron.lang.ourSite + ' ' + tarteaucitron.lang.newWindow +'">';
708                html += '           ' + tarteaucitron.lang.more;
709                html += '       </a>';
710                html += '        - ';
711                html += '       <a href="' + service.uri + '" target="_blank" rel="noreferrer noopener" title="' + service.name + ' ' + tarteaucitron.lang.newWindow + '">';
712                html += '           ' + tarteaucitron.lang.source;
713                html += '       </a>';
714            }
715
716            html += '   </div>';
717            html += '   <div class="tarteaucitronAsk">';
718            html += '       <button type="button" id="' + service.key + 'Allowed" class="tarteaucitronAllow">';
719            html += '           <span class="tarteaucitronCheck"></span> ' + tarteaucitron.lang.allow;
720            html += '       </button> ';
721            html += '       <button type="button" id="' + service.key + 'Denied" class="tarteaucitronDeny">';
722            html += '           <span class="tarteaucitronCross"></span> ' + tarteaucitron.lang.deny;
723            html += '       </button>';
724            html += '   </div>';
725            html += '</li>';
726
727            tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block');
728
729            if (document.getElementById('tarteaucitronServices_' + service.type) !== null) {
730                document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html;
731            }
732
733            tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle', 'display', 'none');
734
735            tarteaucitron.userInterface.order(service.type);
736
737            tarteaucitron.addClickEventToId(service.key + 'Allowed', function () {
738                tarteaucitron.userInterface.respond(this, true);
739            });
740
741            tarteaucitron.addClickEventToId(service.key + 'Denied', function () {
742                tarteaucitron.userInterface.respond(this, false);
743            });
744        }
745
746        tarteaucitron.pro('!' + service.key + '=' + isAllowed);
747
748        // allow by default for non EU
749        if (isResponded === false && tarteaucitron.user.bypass === true) {
750            isAllowed = true;
751            tarteaucitron.cookie.create(service.key, true);
752        }
753
754        if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !tarteaucitron.highPrivacy) || isAllowed) {
755            if (!isAllowed || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)) {
756                tarteaucitron.cookie.create(service.key, true);
757            }
758            if (tarteaucitron.launch[service.key] !== true) {
759                tarteaucitron.launch[service.key] = true;
760                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.js(); }
761                tarteaucitron.sendEvent(service.key + '_loaded');
762            }
763            tarteaucitron.state[service.key] = true;
764            tarteaucitron.userInterface.color(service.key, true);
765        } else if (isDenied) {
766            if (typeof service.fallback === 'function') {
767                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
768            }
769            tarteaucitron.state[service.key] = false;
770            tarteaucitron.userInterface.color(service.key, false);
771        } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) {
772            tarteaucitron.cookie.create(service.key, 'false');
773            if (typeof service.fallback === 'function') {
774                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
775            }
776            tarteaucitron.state[service.key] = false;
777            tarteaucitron.userInterface.color(service.key, false);
778        } else if (!isResponded) {
779            tarteaucitron.cookie.create(service.key, 'wait');
780            if (typeof service.fallback === 'function') {
781                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
782            }
783            tarteaucitron.userInterface.color(service.key, 'wait');
784            tarteaucitron.userInterface.openAlert();
785        }
786
787        tarteaucitron.cookie.checkCount(service.key);
788        tarteaucitron.sendEvent(service.key + '_added')
789    },
790    "sendEvent" : function(event_key) {
791        if(event_key !== undefined) {
792            //ie compatibility
793            var send_event_item;
794            if(typeof(Event) === 'function') {
795                send_event_item = new Event(event_key);
796            }else{
797                send_event_item = document.createEvent('Event');
798                send_event_item.initEvent(event_key, true, true);
799            }
800            //end ie compatibility
801
802            document.dispatchEvent(send_event_item);
803        }
804    },
805    "cleanArray": function cleanArray(arr) {
806        "use strict";
807        var i,
808            len = arr.length,
809            out = [],
810            obj = {},
811            s = tarteaucitron.services;
812
813        for (i = 0; i < len; i += 1) {
814            if (!obj[arr[i]]) {
815                obj[arr[i]] = {};
816                if (tarteaucitron.services[arr[i]] !== undefined) {
817                    out.push(arr[i]);
818                }
819            }
820        }
821
822        out = out.sort(function (a, b) {
823            if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }
824            if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; }
825            return 0;
826        });
827
828        return out;
829    },
830    "userInterface": {
831        "css": function (id, property, value) {
832            "use strict";
833            if (document.getElementById(id) !== null) {
834
835                if (property == "display" && value == "none" && (id == "tarteaucitron" || id == "tarteaucitronBack" || id == "tarteaucitronAlertBig")) {
836                    document.getElementById(id).style["opacity"] = "0";
837
838                    setTimeout(function() {document.getElementById(id).style[property] = value;}, 200);
839                } else {
840
841                    document.getElementById(id).style[property] = value;
842                    
843                    if (property == "display" && value == "block" && (id == "tarteaucitron" || id == "tarteaucitronAlertBig")) {
844                        document.getElementById(id).style["opacity"] = "0";
845                        setTimeout(function() {document.getElementById(id).style["opacity"] = "1";}, 1);
846                    }
847                    
848                    if (property == "display" && value == "block" && id == "tarteaucitronBack") {
849                        document.getElementById(id).style["opacity"] = "0";
850                        setTimeout(function() {document.getElementById(id).style["opacity"] = "0.7";}, 1);
851                    }
852                }
853            }
854        },
855        "addClass": function (id, className) {
856            "use strict";
857            if (document.getElementById(id) !== null) {
858                document.getElementById(id).classList.add(className);
859            }
860        },
861        "removeClass": function (id, className) {
862            "use strict";
863            if (document.getElementById(id) !== null) {
864                document.getElementById(id).classList.remove(className);
865            }
866        },
867        "respondAll": function (status) {
868            "use strict";
869            var s = tarteaucitron.services,
870                service,
871                key,
872                index = 0;
873
874            for (index = 0; index < tarteaucitron.job.length; index += 1) {
875                service = s[tarteaucitron.job[index]];
876                key = service.key;
877                if (tarteaucitron.state[key] !== status) {
878                    if (status === false && tarteaucitron.launch[key] === true) {
879                        tarteaucitron.reloadThePage = true;
880                    }
881                    if (tarteaucitron.launch[key] !== true && status === true) {
882
883                        tarteaucitron.pro('!' + key + '=engage');
884
885                        tarteaucitron.launch[key] = true;
886                        if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
887                        tarteaucitron.sendEvent(key + '_loaded');
888                    }
889                    tarteaucitron.state[key] = status;
890                    tarteaucitron.cookie.create(key, status);
891                    tarteaucitron.userInterface.color(key, status);
892                }
893            }
894        },
895        "respond": function (el, status) {
896            "use strict";
897            if (el.id === '') {
898                return;
899            }
900            var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), '');
901
902            if (key.substring(0, 13) === 'tarteaucitron' || key === '') {return;}
903
904            // return if same state
905            if (tarteaucitron.state[key] === status) {
906                return;
907            }
908
909            if (status === false && tarteaucitron.launch[key] === true) {
910                tarteaucitron.reloadThePage = true;
911            }
912
913            // if not already launched... launch the service
914            if (status === true) {
915                if (tarteaucitron.launch[key] !== true) {
916
917                    tarteaucitron.pro('!' + key + '=engage');
918
919                    tarteaucitron.launch[key] = true;
920                    tarteaucitron.sendEvent(key + '_loaded');
921                    if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
922                }
923            }
924            tarteaucitron.state[key] = status;
925            tarteaucitron.cookie.create(key, status);
926            tarteaucitron.userInterface.color(key, status);
927        },
928        "color": function (key, status) {
929            "use strict";
930            var c = 'tarteaucitron',
931                nbDenied = 0,
932                nbPending = 0,
933                nbAllowed = 0,
934                sum = tarteaucitron.job.length,
935                index;
936
937            if (status === true) {
938                document.getElementById(key + 'Line').classList.add('tarteaucitronIsAllowed');
939                document.getElementById(key + 'Line').classList.remove('tarteaucitronIsDenied');
940            } else if (status === false) {
941                document.getElementById(key + 'Line').classList.remove('tarteaucitronIsAllowed');
942                document.getElementById(key + 'Line').classList.add('tarteaucitronIsDenied');
943            }
944
945            // check if all services are allowed
946            for (index = 0; index < sum; index += 1) {
947                if (tarteaucitron.state[tarteaucitron.job[index]] === false) {
948                    nbDenied += 1;
949                } else if (tarteaucitron.state[tarteaucitron.job[index]] === undefined) {
950                    nbPending += 1;
951                } else if (tarteaucitron.state[tarteaucitron.job[index]] === true) {
952                    nbAllowed += 1;
953                }
954            }
955
956            tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%');
957            tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%');
958            tarteaucitron.userInterface.css(c + 'DotRed', 'width', ((100 / sum) * nbDenied) + '%');
959
960            if (nbDenied === 0 && nbPending === 0) {
961                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
962                tarteaucitron.userInterface.addClass(c + 'AllAllowed', c + 'IsSelected');
963
964                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsAllowed');
965                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
966            } else if (nbAllowed === 0 && nbPending === 0) {
967                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
968                tarteaucitron.userInterface.addClass(c + 'AllDenied', c + 'IsSelected');
969
970                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
971                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsDenied');
972            } else {
973                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
974                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
975
976                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
977                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
978            }
979
980            // close the alert if all service have been reviewed
981            if (nbPending === 0) {
982                tarteaucitron.userInterface.closeAlert();
983            }
984
985            if (tarteaucitron.services[key].cookies.length > 0 && status === false) {
986                tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies);
987            }
988
989            if (status === true) {
990                if (document.getElementById('tacCL' + key) !== null) {
991                    document.getElementById('tacCL' + key).innerHTML = '...';
992                }
993                setTimeout(function () {
994                    tarteaucitron.cookie.checkCount(key);
995                }, 2500);
996            } else {
997                tarteaucitron.cookie.checkCount(key);
998            }
999        },
1000        "openPanel": function () {
1001            "use strict";
1002
1003            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block');
1004            tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1005            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1006
1007            document.getElementById('tarteaucitronClosePanel').focus();
1008            document.getElementsByTagName('body')[0].classList.add('modal-open');
1009            tarteaucitron.userInterface.focusTrap();
1010            tarteaucitron.userInterface.jsSizing('main');
1011
1012            //ie compatibility
1013            var tacOpenPanelEvent;
1014            if(typeof(Event) === 'function') {
1015                tacOpenPanelEvent = new Event("tac.open_panel");
1016            }else{
1017                tacOpenPanelEvent = document.createEvent('Event');
1018                tacOpenPanelEvent.initEvent("tac.open_panel", true, true);
1019            }
1020            //end ie compatibility
1021
1022            window.dispatchEvent(tacOpenPanelEvent);
1023        },
1024        "closePanel": function () {
1025            "use strict";
1026
1027            if (document.location.hash === tarteaucitron.hashtag) {
1028                if (window.history) {
1029                    window.history.replaceState('', document.title, window.location.pathname + window.location.search);
1030                } else {
1031                    document.location.hash = '';
1032                }
1033            }
1034            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1035            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1036
1037            tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1038                elem.style.display = 'none';
1039            }, true);
1040
1041            if (tarteaucitron.reloadThePage === true) {
1042                window.location.reload();
1043            } else {
1044                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1045            }
1046            if (document.getElementById('tarteaucitronCloseAlert') !== null) {
1047                document.getElementById('tarteaucitronCloseAlert').focus();
1048            }
1049            document.getElementsByTagName('body')[0].classList.remove('modal-open');
1050
1051            //ie compatibility
1052            var tacClosePanelEvent;
1053            if(typeof(Event) === 'function') {
1054                tacClosePanelEvent = new Event("tac.close_panel");
1055            }else{
1056                tacClosePanelEvent = document.createEvent('Event');
1057                tacClosePanelEvent.initEvent("tac.close_panel", true, true);
1058            }
1059            //end ie compatibility
1060
1061            window.dispatchEvent(tacClosePanelEvent);
1062        },
1063        "focusTrap": function() {
1064            "use strict";
1065
1066            var focusableEls,
1067                firstFocusableEl,
1068                lastFocusableEl,
1069                filtered;
1070
1071            focusableEls = document.getElementById('tarteaucitron').querySelectorAll('a[href], button');
1072            filtered = [];
1073
1074            // get only visible items
vendor: 5,763 bytes, lines 1075-1211
1075            for (var i = 0, max = focusableEls.length; i < max; i++) {
1076                if (focusableEls[i].offsetHeight > 0) {
1077                   filtered.push(focusableEls[i]);
1078                }
1079            }
1080
1081            firstFocusableEl = filtered[0];
1082            lastFocusableEl = filtered[filtered.length - 1];
1083
1084            //loop focus inside tarteaucitron
1085            document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) {
1086
1087                if ( evt.key === 'Tab' || evt.keyCode === 9 ) {
1088
1089                    if ( evt.shiftKey ) /* shift + tab */ {
1090                        if (document.activeElement === firstFocusableEl) {
1091                            lastFocusableEl.focus();
1092                            evt.preventDefault();
1093                        }
1094                    } else /* tab */ {
1095                        if (document.activeElement === lastFocusableEl) {
1096                            firstFocusableEl.focus();
1097                            evt.preventDefault();
1098                        }
1099                    }
1100                }
1101            })
1102        },
1103        "openAlert": function () {
1104            "use strict";
1105            var c = 'tarteaucitron';
1106            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block');
1107            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none');
1108            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'none');
1109            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'block');
1110            tarteaucitron.userInterface.addClass(c + 'Root',   'tarteaucitronBeforeVisible');
1111
1112            //ie compatibility
1113            var tacOpenAlertEvent;
1114            if(typeof(Event) === 'function') {
1115                tacOpenAlertEvent = new Event("tac.open_alert");
1116            }else{
1117                tacOpenAlertEvent = document.createEvent('Event');
1118                tacOpenAlertEvent.initEvent("tac.open_alert", true, true);
1119            }
1120            //end ie compatibility
1121
1122            window.dispatchEvent(tacOpenAlertEvent);
1123        },
1124        "closeAlert": function () {
1125            "use strict";
1126            var c = 'tarteaucitron';
1127            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none');
1128            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
1129            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'block');
1130            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'none');
1131            tarteaucitron.userInterface.removeClass(c + 'Root',   'tarteaucitronBeforeVisible');
1132            tarteaucitron.userInterface.jsSizing('box');
1133
1134            //ie compatibility
1135            var tacCloseAlertEvent;
1136            if(typeof(Event) === 'function') {
1137                tacCloseAlertEvent = new Event("tac.close_alert");
1138            }else{
1139                tacCloseAlertEvent = document.createEvent('Event');
1140                tacCloseAlertEvent.initEvent("tac.close_alert", true, true);
1141            }
1142            //end ie compatibility
1143
1144            window.dispatchEvent(tacCloseAlertEvent);
1145        },
1146        "toggleCookiesList": function () {
1147            "use strict";
1148            var div = document.getElementById('tarteaucitronCookiesListContainer');
1149
1150            if (div === null) {
1151                return;
1152            }
1153
1154            if (div.style.display !== 'block') {
1155                tarteaucitron.cookie.number();
1156                div.style.display = 'block';
1157                tarteaucitron.userInterface.jsSizing('cookie');
1158                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1159                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1160                tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1161                    elem.style.display = 'none';
1162                }, true);
1163            } else {
1164                div.style.display = 'none';
1165                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1166                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1167            }
1168        },
1169        "toggle": function (id, closeClass) {
1170            "use strict";
1171            var div = document.getElementById(id);
1172
1173            if (div === null) {
1174                return;
1175            }
1176
1177            if (closeClass !== undefined) {
1178                tarteaucitron.fallback([closeClass], function (elem) {
1179                    if (elem.id !== id) {
1180                        elem.style.display = 'none';
1181                    }
1182                }, true);
1183            }
1184
1185            if (div.style.display !== 'block') {
1186                div.style.display = 'block';
1187            } else {
1188                div.style.display = 'none';
1189            }
1190        },
1191        "order": function (id) {
1192            "use strict";
1193            var main = document.getElementById('tarteaucitronServices_' + id),
1194                allDivs,
1195                store = [],
1196                i;
1197
1198            if (main === null) {
1199                return;
1200            }
1201
1202            allDivs = main.childNodes;
1203
1204            if (typeof Array.prototype.map === 'function' && typeof Enumerable === 'undefined') {
1205                Array.prototype.map.call(main.children, Object).sort(function (a, b) {
1206                //var mainChildren = Array.from(main.children);
1207                //mainChildren.sort(function (a, b) {
1208                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
1209                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
1210                    return 0;
1211                }
1211).forEach(function (element) {
1212                    main.appendChild(element);
1213                });
1214            }
1215        },
1216        "jsSizing": function (type) {
1217            "use strict";
1218            var scrollbarMarginRight = 10,
1219                scrollbarWidthParent,
1220                scrollbarWidthChild,
1221                servicesHeight,
1222                e = window,
1223                a = 'inner',
1224                windowInnerHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
1225                mainTop,
1226                mainHeight,
1227                closeButtonHeight,
1228                headerHeight,
1229                cookiesListHeight,
1230                cookiesCloseHeight,
1231                cookiesTitleHeight,
1232                paddingBox,
1233                alertSmallHeight,
1234                cookiesNumberHeight;
1235
1236            if (type === 'box') {
1237                if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) {
1238
1239                    // reset
1240                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', '0px 10px');
1241
1242                    // calculate
1243                    alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight;
1244                    cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight;
1245                    paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2;
1246
1247                    // apply
1248                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px');
1249                }
1250            } else if (type === 'main') {
1251
1252                // get the real window width for media query
1253                if (window.innerWidth === undefined) {
1254                    a = 'client';
1255                    e = document.documentElement || document.body;
1256                }
1257
1258                // height of the services list container
1259                if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) {
1260
1261                    // reset
1262                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto');
1263
1264                    // calculate
1265                    mainHeight = document.getElementById('tarteaucitron').offsetHeight;
1266                    closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight;
1267
1268                    // apply
1269                    servicesHeight = (mainHeight - closeButtonHeight + 2);
1270                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px');
1271                    tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto');
1272                }
1273
1274                // align the main allow/deny button depending on scrollbar width
1275                if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
1276
1277                    // media query
1278                    if (e[a + 'Width'] <= 479) {
1279                        //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px');
1280                    } else if (e[a + 'Width'] <= 767) {
1281                        scrollbarMarginRight = 12;
1282                    }
1283
1284                    scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth;
1285                    scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth;
1286                    //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px');
1287                }
1288
1289                // center the main panel
1290                if (document.getElementById('tarteaucitron') !== null) {
1291
1292                    // media query
1293                    if (e[a + 'Width'] <= 767) {
1294                        mainTop = 0;
1295                    } else {
1296                        mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
1297                    }
1298
1299                    if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
1300                        if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
1301                            mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
1302                        }
1303                    }
1304
1305                    // correct
1306                    if (mainTop < 0) {
1307                        mainTop = 0;
1308                    }
1309
1310                    // apply
1311                    tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
1312                }
1313
1314
1315            } else if (type === 'cookie') {
1316
1317                // put cookies list at bottom
1318                if (document.getElementById('tarteaucitronAlertSmall') !== null) {
1319                    tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px');
1320                }
1321
1322                // height of cookies list
1323                if (document.getElementById('tarteaucitronCookiesListContainer') !== null) {
1324
1325                    // reset
1326                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', 'auto');
1327
1328                    // calculate
1329                    cookiesListHeight = document.getElementById('tarteaucitronCookiesListContainer').offsetHeight;
1330                    cookiesCloseHeight = document.getElementById('tarteaucitronClosePanelCookie').offsetHeight;
1331                    cookiesTitleHeight = document.getElementById('tarteaucitronCookiesTitle').offsetHeight;
1332
1333                    // apply
1334                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', (cookie
vendor: 9,703 bytes, lines 1334-1533
1334sListHeight - cookiesCloseHeight - cookiesTitleHeight - 2) + 'px');
1335                }
1336            }
1337        }
1338    },
1339    "cookie": {
1340        "owner": {},
1341        "create": function (key, status) {
1342            "use strict";
1343
1344            if (tarteaucitronForceExpire !== '') {
1345                // The number of day(s)/hour(s) can't be higher than 1 year
1346                if ((tarteaucitronExpireInDay && tarteaucitronForceExpire < 365) || (!tarteaucitronExpireInDay && tarteaucitronForceExpire < 8760)) {
1347                    if (tarteaucitronExpireInDay) {
1348                        // Multiplication to tranform the number of days to milliseconds
1349                        timeExpire = tarteaucitronForceExpire * 86400000;
1350                    } else {
1351                        // Multiplication to tranform the number of hours to milliseconds
1352                        timeExpire = tarteaucitronForceExpire * 3600000;
1353                    }
1354                }
1355            }
1356
1357            var d = new Date(),
1358                time = d.getTime(),
1359                expireTime = time + timeExpire, // 365 days
1360                regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
1361                cookie = tarteaucitron.cookie.read().replace(regex, ""),
1362                value = tarteaucitron.parameters.cookieName + '=' + cookie + '!' + key + '=' + status,
1363                domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? '; domain=' + tarteaucitron.parameters.cookieDomain : '',
1364                secure = location.protocol === 'https:' ? '; Secure' : '';
1365
1366            d.setTime(expireTime);
1367            document.cookie = value + '; expires=' + d.toGMTString() + '; path=/' + domain + secure + '; samesite=lax';
1368        },
1369        "read": function () {
1370            "use strict";
1371            var nameEQ = tarteaucitron.parameters.cookieName + "=",
1372                ca = document.cookie.split(';'),
1373                i,
1374                c;
1375
1376            for (i = 0; i < ca.length; i += 1) {
1377                c = ca[i];
1378                while (c.charAt(0) === ' ') {
1379                    c = c.substring(1, c.length);
1380                }
1381                if (c.indexOf(nameEQ) === 0) {
1382                    return c.substring(nameEQ.length, c.length);
1383                }
1384            }
1385            return '';
1386        },
1387        "purge": function (arr) {
1388            "use strict";
1389            var i;
1390
1391            for (i = 0; i < arr.length; i += 1) {
1392                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
1393                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
1394                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
1395            }
1396        },
1397        "checkCount": function (key) {
1398            "use strict";
1399            var arr = tarteaucitron.services[key].cookies,
1400                nb = arr.length,
1401                nbCurrent = 0,
1402                html = '',
1403                i,
1404                status = document.cookie.indexOf(key + '=true');
1405
1406            if (status >= 0 && nb === 0) {
1407                html += tarteaucitron.lang.useNoCookie;
1408            } else if (status >= 0) {
1409                for (i = 0; i < nb; i += 1) {
1410                    if (document.cookie.indexOf(arr[i] + '=') !== -1) {
1411                        nbCurrent += 1;
1412                        if (tarteaucitron.cookie.owner[arr[i]] === undefined) {
1413                            tarteaucitron.cookie.owner[arr[i]] = [];
1414                        }
1415                        if (tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]], tarteaucitron.services[key].name) === false) {
1416                            tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name);
1417                        }
1418                    }
1419                }
1420
1421                if (nbCurrent > 0) {
1422                    html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' cookie';
1423                    if (nbCurrent > 1) {
1424                        html += 's';
1425                    }
1426                    html += '.';
1427                } else {
1428                    html += tarteaucitron.lang.useNoCookie;
1429                }
1430            } else if (nb === 0) {
1431                html = tarteaucitron.lang.noCookie;
1432            } else {
1433                html += tarteaucitron.lang.useCookie + ' ' + nb + ' cookie';
1434                if (nb > 1) {
1435                    html += 's';
1436                }
1437                html += '.';
1438            }
1439
1440            if (document.getElementById('tacCL' + key) !== null) {
1441                document.getElementById('tacCL' + key).innerHTML = html;
1442            }
1443        },
1444        "crossIndexOf": function (arr, match) {
1445            "use strict";
1446            var i;
1447            for (i = 0; i < arr.length; i += 1) {
1448                if (arr[i] === match) {
1449                    return true;
1450                }
1451            }
1452            return false;
1453        },
1454        "number": function () {
1455            "use strict";
1456            var cookies = document.cookie.split(';'),
1457                nb = (document.cookie !== '') ? cookies.length : 0,
1458                html = '',
1459                i,
1460                name,
1461                namea,
1462                nameb,
1463                c,
1464                d,
1465                s = (nb > 1) ? 's' : '',
1466                savedname,
1467                regex = /^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,
1468                regexedDomain = (tarteaucitron.cdn.match(regex) !== null) ? tarteaucitron.cdn.match(regex)[1] : tarteaucitron.cdn,
1469                host = (tarteaucitron.domain !== undefined) ? tarteaucitron.domain : regexedDomain;
1470
1471            cookies = cookies.sort(function (a, b) {
1472                namea = a.split('=', 1).toString().replace(/ /g, '');
1473                nameb = b.split('=', 1).toString().replace(/ /g, '');
1474                c = (tarteaucitron.cookie.owner[namea] !== undefined) ? tarteaucitron.cookie.owner[namea] : '0';
1475                d = (tarteaucitron.cookie.owner[nameb] !== undefined) ? tarteaucitron.cookie.owner[nameb] : '0';
1476                if (c + a > d + b) { return 1; }
1477                if (c + a < d + b) { return -1; }
1478                return 0;
1479            });
1480
1481            if (document.cookie !== '') {
1482                for (i = 0; i < nb; i += 1) {
1483                    name = cookies[i].split('=', 1).toString().replace(/ /g, '');
1484                    if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) {
1485                        savedname = tarteaucitron.cookie.owner[name].join(' // ');
1486                        html += '<div class="tarteaucitronHidden">';
1487                        html += '     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';
1488                        html += '        ' + tarteaucitron.cookie.owner[name].join(' // ');
1489                        html += '    </span>';
1490                        html += '</div><ul class="cookie-list">';
1491                    } else if (tarteaucitron.cookie.owner[name] === undefined && host !== savedname) {
1492                        savedname = host;
1493                        html += '<div class="tarteaucitronHidden">';
1494                        html += '     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';
1495                        html += '        ' + host;
1496                        html += '    </span>';
1497                        html += '</div><ul class="cookie-list">';
1498                    }
1499                    html += '<li class="tarteaucitronCookiesListMain">';
1500                    html += '    <div class="tarteaucitronCookiesListLeft"><button type="button" class="purgeBtn" data-cookie="' + tarteaucitron.fixSelfXSS(cookies[i].split('=', 1)) + '"><strong>&times;</strong></button> <strong>' + tarteaucitron.fixSelfXSS(name) + '</strong>';
1501                    html += '    </div>';
1502                    html += '    <div class="tarteaucitronCookiesListRight">' + tarteaucitron.fixSelfXSS(cookies[i].split('=').slice(1).join('=')) + '</div>';
1503                    html += '</li>';
1504                }
1505                html += '</ul>';
1506            } else {
1507                html += '<div class="tarteaucitronCookiesListMain">';
1508                html += '    <div class="tarteaucitronCookiesListLeft"><strong>-</strong></div>';
1509                html += '    <div class="tarteaucitronCookiesListRight"></div>';
1510                html += '</div>';
1511            }
1512
1513            html += '<div class="tarteaucitronHidden spacer-20"></div>';
1514
1515            if (document.getElementById('tarteaucitronCookiesList') !== null) {
1516                document.getElementById('tarteaucitronCookiesList').innerHTML = html;
1517            }
1518
1519            if (document.getElementById('tarteaucitronCookiesNumber') !== null) {
1520                document.getElementById('tarteaucitronCookiesNumber').innerHTML = nb;
1521            }
1522
1523            if (document.getElementById('tarteaucitronCookiesNumberBis') !== null) {
1524                document.getElementById('tarteaucitronCookiesNumberBis').innerHTML = nb + ' cookie' + s;
1525            }
1526
1527            var purgeBtns = document.getElementsByClassName("purgeBtn");
1528            for (i = 0; i < purgeBtns.length; i++) {
1529                tarteaucitron.addClickEventToElement(purgeBtns[i], function () {
1530                    tarteaucitron.cookie.purge([this.dataset.cookie]);
1531                    tarteaucitron.cookie.number();
1532                    tarteaucitron.userInterface.jsSizing('cookie');
1533                    return false;
1534                });
1535            }
1536
1537            for (i = 0; i < tarteaucitron.job.length; i += 1) {
1538                tarteaucitron.cookie.checkCount(tarteaucitron.job[i]);
1539            }
1540        }
1541    },
1542    "fixSelfXSS": function(html) {
1543        fixed = html.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
1544        return fixed;
1545    },
1546    "getLanguage": function () {
1547        "use strict";
1548
1549        var availableLanguages = 'bg,ca,cn,cs,da,de,el,en,es,fi,fr,hu,it,ja,lv,nl,no,oc,pl,pt,ro,ru,se,sk,sv,tr,vi,zh',
1550            defaultLanguage = 'en';
1551
1552        if (tarteaucitronForceLanguage !== '') {
1553            if (availableLanguages.indexOf(tarteaucitronForceLanguage) !== -1) {
1554                return tarteaucitronForceLanguage;
1555            }
1556        }
1557
1558        if (!navigator) { return 'en'; }
1559
1560        var lang = navigator.language || navigator.browserLanguage ||
1561                navigator.systemLanguage || navigator.userLang || null,
1562            userLanguage = lang ? lang.substr(0, 2) : null;
1563
1564        if (availableLanguages.indexOf(userLanguage) === -1) {
1565            return defaultLanguage;
1566        }
1567        return userLanguage;
1568    },
1569    "getLocale": function () {
1570        "use strict";
1571        if (!navigator) { return 'en_US'; }
1572
1573        var lang = navigator.language || navigator.browserLanguage ||
1574                navigator.systemLanguage || navigator.userLang || null,
1575            userLanguage = lang ? lang.substr(0, 2) : null;
1576
1577        if (userLanguage === 'fr') {
1578            return 'fr_FR';
1579        } else if (userLanguage === 'en') {
1580            return 'en_US';
1581        } else if (userLanguage === 'de') {
1582            return 'de_DE';
1583        } else if (userLanguage === 'es') {
1584            return 'es_ES';
1585        } else if (userLanguage === 'it') {
1586            return 'it_IT';
1587        } else if (userLanguage === 'pt') {
1588            return 'pt_PT';
1589        } else if (userLanguage === 'nl') {
1590            return 'nl_NL';
1591        } else if (userLanguage === 'el') {
1592            return 'el_EL';
1593        } else {
1594            return 'en_US';
1595        }
1596    },
1597    "addScript": function (url, id, callback, execute, attrName, attrVal, internal) {
1598        "use strict";
1599        var script,
1600            done = false;
1601
1602        if (execute === false) {
1603            if (typeof callback === 'function') {
1604                callback();
1605            }
1606        } else {
1607            script = document.createElement('script');
1608            script.type = 'text/javascript';
1609            script.id = (id !== undefined) ? id : '';
1610            script.async = true;
1611            script.src = url;
1612
1613            if (attrName !== undefined && attrVal !== undefined) {
1614                script.setAttribute(attrName, attrVal);
1615            }
1616
1617            if (typeof callback === 'function') {
1618                if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
1619                    script.onreadystatechange = script.onload = function () {
1620                        var state = script.readyState;
1621                        if (!done && (!state || /loaded|complete/.test(state))) {
1622                            done = true;
1623                            callback();
1624                        }
1625                    };
1626                } else {
1627                    callback();
1628                }
1629            }
1630
1631            if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
1632                document.getElementsByTagName('head')[0].appendChild(script);
1633            }
1634        }
1635    },
1636    "addInternalScript": function (url, id, callback, execute, attrName, attrVal) {
1637        tarteaucitron.addScript(url, id, callback, execute, attrName, attrVal, true);
1638    },
1639    "makeAsync": {
1640        "antiGhost": 0,
1641        "buffer": '',
1642        "init": function (url, id) {
1643            "use strict";
1644            var savedWrite = document.write,
1645                savedWriteln = document.writeln;
1646
1647            document.write = function (content) {
1648                tarteaucitron.makeAsync.buffer += content;
1649            };
1650            document.writeln = function (content) {
1651                tarteaucitron.makeAsync.buffer += content.concat("\n");
1652            };
1653
1654            setTimeout(function () {
1655                document.write = savedWrite;
1656                document.writeln = savedWriteln;
1657            }, 20000);
1658
1659            tarteaucitron.makeAsync.getAndParse(url, id);
1660        },
1661        "getAndParse": function (url, id) {
1662            "use strict";
1663            if (tarteaucitron.makeAsync.antiGhost > 9) {
1664                tarteaucitron.makeAsync.antiGhost = 0;
1665                return;
1666            }
1667            tarteaucitron.makeAsync.antiGhost += 1;
1668            tarteaucitron.addInternalScript(url, '', function () {
1669                if (document.getElementById(id) !== null) {
1670                    document.getElementById(id).innerHTML += "<span class='display-none'>&nbsp;</span>" + tarteaucitron.makeAsync.buffer;
1671                    tarteaucitron.makeAsync.buffer = '';
1672                    tarteaucitron.makeAsync.execJS(id);
1673                }
1674            });
1675        },
1676        "execJS": function (id) {
1677            /* not strict because third party scripts may have errors */
1678            var i,
1679                scripts,
1680                childId,
1681                type;
1682
1683            if (document.getElementById(id) === null) {
1684                return;
1685            }
1686
1687            scripts = document.getElementById(id).getElementsByTagName('script');
1688            for (i = 0; i < scripts.length; i += 1) {
1689                type = (scripts[i].getAttribute('type') !== null) ? scripts[i].getAttribute('type') : '';
1690                if (type === '') {
1691                    type = (scripts[i].getAttribute('language') !== null) ? scripts[i].getAttribute('language') : '';
1692                }
1693                if (scripts[i].getAttribute('src') !== null && scripts[i].getAttribute('src') !== '') {
1694                    childId = id + Math.floor(Math.random() * 99999999999);
1695                    document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
1696                    tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'), childId);
1697                } else if (type.indexOf('javascript') !== -1 || type === '') {
1698                    eval(scripts[i].innerHTML);
1699                }
1700            }
1701        }
1702    },
1703    "fallback": function (matchClass, content, noInner) {
1704        "use strict";
1705        var elems = document.getElementsByTagName('*'),
1706            i,
1707            index = 0;
1708
1709        for (i in elems) {
1710            if (elems[i] !== undefined) {
1711                for (index = 0; index < matchClass.length; index += 1) {
1712                    if ((' ' + elems[i].className + ' ')
1713                            .indexOf(' ' + matchClass[index] + ' ') > -1) {
1714                        if (typeof content === 'function') {
1715                            if (noInner === true) {
1716                                content(elems[i]);
1717                            } else {
1718                                elems[i].innerHTML = content(elems[i]);
1719                            }
1720                        } else {
1721                            elems[i].innerHTML = content;
1722                        }
1723                    }
1724                }
1725            }
1726        }
1727    },
1728    "engage": function (id) {
1729        "use strict";
1730        var html = '',
1731            r = Math.floor(Math.random() * 100000),
1732            engage = tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback;
1733
1734        if (tarteaucitron.lang['engage-' + id] !== undefined) {
1735            engage = tarteaucitron.lang['engage-' + id];
1736        }
1737
1738        html += '<div class="tac_activate tac_activate_' + id + '">';
1739        html += '   <div class="tac_float">';
1740        html += '      ' + engage;
1741        html += '      <button type="button" class="tarteaucitronAllow" id="Eng' + r + 'ed' + id + '">';
1742        html += '          <span class="tarteaucitronCheck"></span> ' + tarteaucitron.lang.allow;
1743        html += '       </button>';
1744        html += '   </div>';
1745        html += '</div>';
1746
1747        return html;
1748    },
1749    "extend": function (a, b) {
1750        "use strict";
1751        var prop;
1752        for (prop in b) {
1753            if (b.hasOwnProperty(prop)) {
1754                a[prop] = b[prop];
1755            }
1756        }
1757    },
1758    "proTemp": '',
1759    "proTimer": function () {
1760        "use strict";
1761        setTimeout(tarteaucitron.proPing, 500);
1762    },
1763    "pro": function (list) {
1764        "use strict";
1765        tarteaucitron.proTemp += list;
1766        clearTimeout(tarteaucitron.proTimer);
1767        tarteaucitron.proTimer = setTimeout(tarteaucitron.proPing, 500);
1768    },
1769    "proPing": function () {
1770        "use strict";
1771        if (tarteaucitron.uuid !== '' && tarteaucitron.uuid !== undefined && tarteaucitron.proTemp !== '') {
1772            var div = document.getElementById('tarteaucitronPremium'),
1773                timestamp = new Date().getTime(),
1774                url = 'https://tarteaucitron.io/log/?';
1775
1776            if (div === null) {
1777                return;
1778            }
1779
1780            url += 'account=' + tarteaucitron.uuid + '&';
1781            url += 'domain=' + tarteaucitron.domain + '&';
1782            url += 'status=' + encodeURIComponent(tarteaucitron.proTemp) + '&';
1783            url += '_time=' + timestamp;
1784
1785            div.innerHTML = '<img src="' + url + '" class="display-none" alt="" />';
1786
1787            tarteaucitron.proTemp = '';
1788        }
1789
1790        tarteaucitron.cookie.number();
1791    },
1792    "AddOrUpdate" : function(source, custom){
1793        /**
1794         Utility function to Add or update the fields of obj1 with the ones in obj2
1795         */
1796        for(key in custom){
1797            if(custom[key] instanceof Object){
1798                source[key] = tarteaucitron.AddOrUpdate(source[key], custom[key]);
1799            }else{
1800                source[key] = custom[key];
1801            }
1802        }
1803        return source;
1804    },
1805    "getElemWidth": function(elem) {
1806        return elem.getAttribute('width') || elem.clientWidth;
1807    },
1808    "getElemHeight": function(elem) {
1809        return elem.getAttribute('height') || elem.clientHeight;
1810    },
1811    "addClickEventToId": function (elemId, func) {
1812        tarteaucitron.addClickEventToElement(document.getElementById(elemId), func);
1813    },
1814    "addClickEventToElement": function (e, func) {
1815        if (e) {
1816            if (e.addEventListener) {
1817                e.addEventListener("click", func);
1818            } else {
1819                e.attachEvent("onclick", func);
1820            }
1821        }
1822    }
1823};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.