PageSourceSearch

https://ampmetropole.fr/wp-content/mu-plugins/mamp-utils/js/tarteaucitron/tarteaucitron.js?ver=2.24.0

js ampmetropole.fr collected 2026-09-24 09:17:41 UTC 89,607 bytes, 1,811 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">';
vendor: 8,234 bytes, lines 338-441
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">';
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 () {
vendor: 5,627 bytes, lines 639-745
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                html += '       <a href="' + service.uri + '" target="_blank" rel="noreferrer noopener" title="' + service.name + ' ' + tarteaucitron.lang.newWindow + '">';
700                html += '           ' + tarteaucitron.lang.source;
701                html += '       </a>';
702            }
703
704            html += '   </div>';
705            html += '   <div class="tarteaucitronAsk">';
706            html += '       <button type="button" id="' + service.key + 'Allowed" class="tarteaucitronAllow">';
707            html += '           <span class="tarteaucitronCheck"></span> ' + tarteaucitron.lang.allow;
708            html += '       </button> ';
709            html += '       <button type="button" id="' + service.key + 'Denied" class="tarteaucitronDeny">';
710            html += '           <span class="tarteaucitronCross"></span> ' + tarteaucitron.lang.deny;
711            html += '       </button>';
712            html += '   </div>';
713            html += '</li>';
714
715            tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block');
716
717            if (document.getElementById('tarteaucitronServices_' + service.type) !== null) {
718                document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html;
719            }
720
721            tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle', 'display', 'none');
722
723            tarteaucitron.userInterface.order(service.type);
724
725            tarteaucitron.addClickEventToId(service.key + 'Allowed', function () {
726                tarteaucitron.userInterface.respond(this, true);
727            });
728
729            tarteaucitron.addClickEventToId(service.key + 'Denied', function () {
730                tarteaucitron.userInterface.respond(this, false);
731            });
732        }
733
734        tarteaucitron.pro('!' + service.key + '=' + isAllowed);
735
736        // allow by default for non EU
737        if (isResponded === false && tarteaucitron.user.bypass === true) {
738            isAllowed = true;
739            tarteaucitron.cookie.create(service.key, true);
740        }
741
742        if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !tarteaucitron.highPrivacy) || isAllowed) {
743            if (!isAllowed || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)) {
744                tarteaucitron.cookie.create(service.key, true);
745            }
746            if (tarteaucitron.launch[service.key] !== true) {
747                tarteaucitron.launch[service.key] = true;
748                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.js(); }
749                tarteaucitron.sendEvent(service.key + '_loaded');
750            }
751            tarteaucitron.state[service.key] = true;
752            tarteaucitron.userInterface.color(service.key, true);
753        } else if (isDenied) {
754            if (typeof service.fallback === 'function') {
755                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
756            }
757            tarteaucitron.state[service.key] = false;
758            tarteaucitron.userInterface.color(service.key, false);
759        } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) {
760            tarteaucitron.cookie.create(service.key, 'false');
761            if (typeof service.fallback === 'function') {
762                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
763            }
764            tarteaucitron.state[service.key] = false;
765            tarteaucitron.userInterface.color(service.key, false);
766        } else if (!isResponded) {
767            tarteaucitron.cookie.create(service.key, 'wait');
768            if (typeof service.fallback === 'function') {
769                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
770            }
771            tarteaucitron.userInterface.color(service.key, 'wait');
772            tarteaucitron.userInterface.openAlert();
773        }
774
775        tarteaucitron.cookie.checkCount(service.key);
776        tarteaucitron.sendEvent(service.key + '_added')
777    },
778    "sendEvent" : function(event_key) {
779        if(event_key !== undefined) {
780            //ie compatibility
781            var send_event_item;
782            if(typeof(Event) === 'function') {
783                send_event_item = new Event(event_key);
784            }else{
785                send_event_item = document.createEvent('Event');
786                send_event_item.initEvent(event_key, true, true);
787            }
788            //end ie compatibility
789
790            document.dispatchEvent(send_event_item);
791        }
792    },
793    "cleanArray": function cleanArray(arr) {
794        "use strict";
795        var i,
796            len = arr.length,
797            out = [],
798            obj = {},
799            s = tarteaucitron.services;
800
801        for (i = 0; i < len; i += 1) {
802            if (!obj[arr[i]]) {
803                obj[arr[i]] = {};
804                if (tarteaucitron.services[arr[i]] !== undefined) {
805                    out.push(arr[i]);
806                }
807            }
808        }
809
810        out = out.sort(function (a, b) {
811            if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }
812            if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; }
813            return 0;
814        });
815
816        return out;
817    },
818    "userInterface": {
819        "css": function (id, property, value) {
820            "use strict";
821            if (document.getElementById(id) !== null) {
822
823                if (property == "display" && value == "none" && (id == "tarteaucitron" || id == "tarteaucitronBack" || id == "tarteaucitronAlertBig")) {
824                    document.getElementById(id).style["opacity"] = "0";
825
826                    setTimeout(function() {document.getElementById(id).style[property] = value;}, 200);
827                } else {
828
829                    document.getElementById(id).style[property] = value;
830                    
831                    if (property == "display" && value == "block" && (id == "tarteaucitron" || id == "tarteaucitronAlertBig")) {
832                        document.getElementById(id).style["opacity"] = "0";
833                        setTimeout(function() {document.getElementById(id).style["opacity"] = "1";}, 1);
834                    }
835                    
836                    if (property == "display" && value == "block" && id == "tarteaucitronBack") {
837                        document.getElementById(id).style["opacity"] = "0";
838                        setTimeout(function() {document.getElementById(id).style["opacity"] = "0.7";}, 1);
839                    }
840                }
841            }
842        },
843        "addClass": function (id, className) {
844            "use strict";
845            if (document.getElementById(id) !== null) {
846                document.getElementById(id).classList.add(className);
847            }
848        },
849        "removeClass": function (id, className) {
850            "use strict";
851            if (document.getElementById(id) !== null) {
852                document.getElementById(id).classList.remove(className);
853            }
854        },
855        "respondAll": function (status) {
856            "use strict";
857            var s = tarteaucitron.services,
858                service,
859                key,
860                index = 0;
861
862            for (index = 0; index < tarteaucitron.job.length; index += 1) {
863                service = s[tarteaucitron.job[index]];
864                key = service.key;
865                if (tarteaucitron.state[key] !== status) {
866                    if (status === false && tarteaucitron.launch[key] === true) {
867                        tarteaucitron.reloadThePage = true;
868                    }
869                    if (tarteaucitron.launch[key] !== true && status === true) {
870
871                        tarteaucitron.pro('!' + key + '=engage');
872
873                        tarteaucitron.launch[key] = true;
874                        if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
875                        tarteaucitron.sendEvent(key + '_loaded');
876                    }
877                    tarteaucitron.state[key] = status;
878                    tarteaucitron.cookie.create(key, status);
879                    tarteaucitron.userInterface.color(key, status);
880                }
881            }
882        },
883        "respond": function (el, status) {
884            "use strict";
885            if (el.id === '') {
886                return;
887            }
888            var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), '');
889
890            if (key.substring(0, 13) === 'tarteaucitron' || key === '') {return;}
891
892            // return if same state
893            if (tarteaucitron.state[key] === status) {
894                return;
895            }
896
897            if (status === false && tarteaucitron.launch[key] === true) {
898                tarteaucitron.reloadThePage = true;
899            }
900
901            // if not already launched... launch the service
902            if (status === true) {
903                if (tarteaucitron.launch[key] !== true) {
904
905                    tarteaucitron.pro('!' + key + '=engage');
906
907                    tarteaucitron.launch[key] = true;
908                    tarteaucitron.sendEvent(key + '_loaded');
909                    if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
910                }
911            }
912            tarteaucitron.state[key] = status;
913            tarteaucitron.cookie.create(key, status);
914            tarteaucitron.userInterface.color(key, status);
915        },
916        "color": function (key, status) {
917            "use strict";
918            var c = 'tarteaucitron',
919                nbDenied = 0,
920                nbPending = 0,
921                nbAllowed = 0,
922                sum = tarteaucitron.job.length,
923                index;
924
925            if (status === true) {
926                document.getElementById(key + 'Line').classList.add('tarteaucitronIsAllowed');
927                document.getElementById(key + 'Line').classList.remove('tarteaucitronIsDenied');
928            } else if (status === false) {
929                document.getElementById(key + 'Line').classList.remove('tarteaucitronIsAllowed');
930                document.getElementById(key + 'Line').classList.add('tarteaucitronIsDenied');
931            }
932
933            // check if all services are allowed
934            for (index = 0; index < sum; index += 1) {
935                if (tarteaucitron.state[tarteaucitron.job[index]] === false) {
936                    nbDenied += 1;
937                } else if (tarteaucitron.state[tarteaucitron.job[index]] === undefined) {
938                    nbPending += 1;
939                } else if (tarteaucitron.state[tarteaucitron.job[index]] === true) {
940                    nbAllowed += 1;
941                }
942            }
943
944            tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%');
945            tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%');
946            tarteaucitron.userInterface.css(c + 'DotRed', 'width', ((100 / sum) * nbDenied) + '%');
947
948            if (nbDenied === 0 && nbPending === 0) {
949                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
950                tarteaucitron.userInterface.addClass(c + 'AllAllowed', c + 'IsSelected');
951
952                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsAllowed');
953                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
954            } else if (nbAllowed === 0 && nbPending === 0) {
955                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
956                tarteaucitron.userInterface.addClass(c + 'AllDenied', c + 'IsSelected');
957
958                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
959                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsDenied');
960            } else {
961                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
962                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
963
964                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
965                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
966            }
967
968            // close the alert if all service have been reviewed
969            if (nbPending === 0) {
970                tarteaucitron.userInterface.closeAlert();
971            }
972
973            if (tarteaucitron.services[key].cookies.length > 0 && status === false) {
974                tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies);
975            }
976
977            if (status === true) {
978                if (document.getElementById('tacCL' + key) !== null) {
979                    document.getElementById('tacCL' + key).innerHTML = '...';
980                }
981                setTimeout(function () {
982                    tarteaucitron.cookie.checkCount(key);
983                }, 2500);
984            } else {
985                tarteaucitron.cookie.checkCount(key);
986            }
987        },
988        "openPanel": function () {
989            "use strict";
990
991            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block');
992            tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
993            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
994
995            document.getElementById('tarteaucitronClosePanel').focus();
996            document.getElementsByTagName('body')[0].classList.add('modal-open');
997            tarteaucitron.userInterface.focusTrap();
998            tarteaucitron.userInterface.jsSizing('main');
999
1000            //ie compatibility
1001            var tacOpenPanelEvent;
1002            if(typeof(Event) === 'function') {
1003                tacOpenPanelEvent = new Event("tac.open_panel");
1004            }else{
1005                tacOpenPanelEvent = document.createEvent('Event');
1006                tacOpenPanelEvent.initEvent("tac.open_panel", true, true);
1007            }
1008            //end ie compatibility
1009
1010            window.dispatchEvent(tacOpenPanelEvent);
1011        },
1012        "closePanel": function () {
1013            "use strict";
1014
1015            if (document.location.hash === tarteaucitron.hashtag) {
1016                if (window.history) {
1017                    window.history.replaceState('', document.title, window.location.pathname + window.location.search);
1018                } else {
1019                    document.location.hash = '';
1020                }
1021            }
1022            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1023            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1024
1025            tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1026                elem.style.display = 'none';
1027            }, true);
1028
1029            if (tarteaucitron.reloadThePage === true) {
1030                window.location.reload();
1031            } else {
1032                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1033            }
1034            if (document.getElementById('tarteaucitronCloseAlert') !== null) {
1035                document.getElementById('tarteaucitronCloseAlert').focus();
1036            }
1037            document.getElementsByTagName('body')[0].classList.remove('modal-open');
1038
1039            //ie compatibility
1040            var tacClosePanelEvent;
1041            if(typeof(Event) === 'function') {
1042                tacClosePanelEvent = new Event("tac.close_panel");
1043            }else{
1044                tacClosePanelEvent = document.createEvent('Event');
1045                tacClosePanelEvent.initEvent("tac.close_panel", true, true);
1046            }
1047            //end ie compatibility
1048
1049            window.dispatchEvent(tacClosePanelEvent);
1050        },
1051        "focusTrap": function() {
1052            "use strict";
1053
1054            var focusableEls,
1055                firstFocusableEl,
1056                lastFocusableEl,
1057                filtered;
1058
1059            focusableEls = document.getElementById('tarteaucitron').querySelectorAll('a[href], button');
1060            filtered = [];
1061
1062            // get only visible items
vendor: 5,763 bytes, lines 1063-1199
1063            for (var i = 0, max = focusableEls.length; i < max; i++) {
1064                if (focusableEls[i].offsetHeight > 0) {
1065                   filtered.push(focusableEls[i]);
1066                }
1067            }
1068
1069            firstFocusableEl = filtered[0];
1070            lastFocusableEl = filtered[filtered.length - 1];
1071
1072            //loop focus inside tarteaucitron
1073            document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) {
1074
1075                if ( evt.key === 'Tab' || evt.keyCode === 9 ) {
1076
1077                    if ( evt.shiftKey ) /* shift + tab */ {
1078                        if (document.activeElement === firstFocusableEl) {
1079                            lastFocusableEl.focus();
1080                            evt.preventDefault();
1081                        }
1082                    } else /* tab */ {
1083                        if (document.activeElement === lastFocusableEl) {
1084                            firstFocusableEl.focus();
1085                            evt.preventDefault();
1086                        }
1087                    }
1088                }
1089            })
1090        },
1091        "openAlert": function () {
1092            "use strict";
1093            var c = 'tarteaucitron';
1094            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block');
1095            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none');
1096            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'none');
1097            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'block');
1098            tarteaucitron.userInterface.addClass(c + 'Root',   'tarteaucitronBeforeVisible');
1099
1100            //ie compatibility
1101            var tacOpenAlertEvent;
1102            if(typeof(Event) === 'function') {
1103                tacOpenAlertEvent = new Event("tac.open_alert");
1104            }else{
1105                tacOpenAlertEvent = document.createEvent('Event');
1106                tacOpenAlertEvent.initEvent("tac.open_alert", true, true);
1107            }
1108            //end ie compatibility
1109
1110            window.dispatchEvent(tacOpenAlertEvent);
1111        },
1112        "closeAlert": function () {
1113            "use strict";
1114            var c = 'tarteaucitron';
1115            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none');
1116            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
1117            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'block');
1118            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'none');
1119            tarteaucitron.userInterface.removeClass(c + 'Root',   'tarteaucitronBeforeVisible');
1120            tarteaucitron.userInterface.jsSizing('box');
1121
1122            //ie compatibility
1123            var tacCloseAlertEvent;
1124            if(typeof(Event) === 'function') {
1125                tacCloseAlertEvent = new Event("tac.close_alert");
1126            }else{
1127                tacCloseAlertEvent = document.createEvent('Event');
1128                tacCloseAlertEvent.initEvent("tac.close_alert", true, true);
1129            }
1130            //end ie compatibility
1131
1132            window.dispatchEvent(tacCloseAlertEvent);
1133        },
1134        "toggleCookiesList": function () {
1135            "use strict";
1136            var div = document.getElementById('tarteaucitronCookiesListContainer');
1137
1138            if (div === null) {
1139                return;
1140            }
1141
1142            if (div.style.display !== 'block') {
1143                tarteaucitron.cookie.number();
1144                div.style.display = 'block';
1145                tarteaucitron.userInterface.jsSizing('cookie');
1146                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1147                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1148                tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1149                    elem.style.display = 'none';
1150                }, true);
1151            } else {
1152                div.style.display = 'none';
1153                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1154                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1155            }
1156        },
1157        "toggle": function (id, closeClass) {
1158            "use strict";
1159            var div = document.getElementById(id);
1160
1161            if (div === null) {
1162                return;
1163            }
1164
1165            if (closeClass !== undefined) {
1166                tarteaucitron.fallback([closeClass], function (elem) {
1167                    if (elem.id !== id) {
1168                        elem.style.display = 'none';
1169                    }
1170                }, true);
1171            }
1172
1173            if (div.style.display !== 'block') {
1174                div.style.display = 'block';
1175            } else {
1176                div.style.display = 'none';
1177            }
1178        },
1179        "order": function (id) {
1180            "use strict";
1181            var main = document.getElementById('tarteaucitronServices_' + id),
1182                allDivs,
1183                store = [],
1184                i;
1185
1186            if (main === null) {
1187                return;
1188            }
1189
1190            allDivs = main.childNodes;
1191
1192            if (typeof Array.prototype.map === 'function' && typeof Enumerable === 'undefined') {
1193                Array.prototype.map.call(main.children, Object).sort(function (a, b) {
1194                //var mainChildren = Array.from(main.children);
1195                //mainChildren.sort(function (a, b) {
1196                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
1197                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
1198                    return 0;
1199                }
1199).forEach(function (element) {
1200                    main.appendChild(element);
1201                });
1202            }
1203        },
1204        "jsSizing": function (type) {
1205            "use strict";
1206            var scrollbarMarginRight = 10,
1207                scrollbarWidthParent,
1208                scrollbarWidthChild,
1209                servicesHeight,
1210                e = window,
1211                a = 'inner',
1212                windowInnerHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
1213                mainTop,
1214                mainHeight,
1215                closeButtonHeight,
1216                headerHeight,
1217                cookiesListHeight,
1218                cookiesCloseHeight,
1219                cookiesTitleHeight,
1220                paddingBox,
1221                alertSmallHeight,
1222                cookiesNumberHeight;
1223
1224            if (type === 'box') {
1225                if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) {
1226
1227                    // reset
1228                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', '0px 10px');
1229
1230                    // calculate
1231                    alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight;
1232                    cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight;
1233                    paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2;
1234
1235                    // apply
1236                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px');
1237                }
1238            } else if (type === 'main') {
1239
1240                // get the real window width for media query
1241                if (window.innerWidth === undefined) {
1242                    a = 'client';
1243                    e = document.documentElement || document.body;
1244                }
1245
1246                // height of the services list container
1247                if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) {
1248
1249                    // reset
1250                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto');
1251
1252                    // calculate
1253                    mainHeight = document.getElementById('tarteaucitron').offsetHeight;
1254                    closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight;
1255
1256                    // apply
1257                    servicesHeight = (mainHeight - closeButtonHeight + 2);
1258                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px');
1259                    tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto');
1260                }
1261
1262                // align the main allow/deny button depending on scrollbar width
1263                if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
1264
1265                    // media query
1266                    if (e[a + 'Width'] <= 479) {
1267                        //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px');
1268                    } else if (e[a + 'Width'] <= 767) {
1269                        scrollbarMarginRight = 12;
1270                    }
1271
1272                    scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth;
1273                    scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth;
1274                    //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px');
1275                }
1276
1277                // center the main panel
1278                if (document.getElementById('tarteaucitron') !== null) {
1279
1280                    // media query
1281                    if (e[a + 'Width'] <= 767) {
1282                        mainTop = 0;
1283                    } else {
1284                        mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
1285                    }
1286
1287                    if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
1288                        if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
1289                            mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
1290                        }
1291                    }
1292
1293                    // correct
1294                    if (mainTop < 0) {
1295                        mainTop = 0;
1296                    }
1297
1298                    // apply
1299                    tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
1300                }
1301
1302
1303            } else if (type === 'cookie') {
1304
1305                // put cookies list at bottom
1306                if (document.getElementById('tarteaucitronAlertSmall') !== null) {
1307                    tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px');
1308                }
1309
1310                // height of cookies list
1311                if (document.getElementById('tarteaucitronCookiesListContainer') !== null) {
1312
1313                    // reset
1314                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', 'auto');
1315
1316                    // calculate
1317                    cookiesListHeight = document.getElementById('tarteaucitronCookiesListContainer').offsetHeight;
1318                    cookiesCloseHeight = document.getElementById('tarteaucitronClosePanelCookie').offsetHeight;
1319                    cookiesTitleHeight = document.getElementById('tarteaucitronCookiesTitle').offsetHeight;
1320
1321                    // apply
1322                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', (cookie
vendor: 9,703 bytes, lines 1322-1521
1322sListHeight - cookiesCloseHeight - cookiesTitleHeight - 2) + 'px');
1323                }
1324            }
1325        }
1326    },
1327    "cookie": {
1328        "owner": {},
1329        "create": function (key, status) {
1330            "use strict";
1331
1332            if (tarteaucitronForceExpire !== '') {
1333                // The number of day(s)/hour(s) can't be higher than 1 year
1334                if ((tarteaucitronExpireInDay && tarteaucitronForceExpire < 365) || (!tarteaucitronExpireInDay && tarteaucitronForceExpire < 8760)) {
1335                    if (tarteaucitronExpireInDay) {
1336                        // Multiplication to tranform the number of days to milliseconds
1337                        timeExpire = tarteaucitronForceExpire * 86400000;
1338                    } else {
1339                        // Multiplication to tranform the number of hours to milliseconds
1340                        timeExpire = tarteaucitronForceExpire * 3600000;
1341                    }
1342                }
1343            }
1344
1345            var d = new Date(),
1346                time = d.getTime(),
1347                expireTime = time + timeExpire, // 365 days
1348                regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
1349                cookie = tarteaucitron.cookie.read().replace(regex, ""),
1350                value = tarteaucitron.parameters.cookieName + '=' + cookie + '!' + key + '=' + status,
1351                domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? '; domain=' + tarteaucitron.parameters.cookieDomain : '',
1352                secure = location.protocol === 'https:' ? '; Secure' : '';
1353
1354            d.setTime(expireTime);
1355            document.cookie = value + '; expires=' + d.toGMTString() + '; path=/' + domain + secure + '; samesite=lax';
1356        },
1357        "read": function () {
1358            "use strict";
1359            var nameEQ = tarteaucitron.parameters.cookieName + "=",
1360                ca = document.cookie.split(';'),
1361                i,
1362                c;
1363
1364            for (i = 0; i < ca.length; i += 1) {
1365                c = ca[i];
1366                while (c.charAt(0) === ' ') {
1367                    c = c.substring(1, c.length);
1368                }
1369                if (c.indexOf(nameEQ) === 0) {
1370                    return c.substring(nameEQ.length, c.length);
1371                }
1372            }
1373            return '';
1374        },
1375        "purge": function (arr) {
1376            "use strict";
1377            var i;
1378
1379            for (i = 0; i < arr.length; i += 1) {
1380                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
1381                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
1382                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
1383            }
1384        },
1385        "checkCount": function (key) {
1386            "use strict";
1387            var arr = tarteaucitron.services[key].cookies,
1388                nb = arr.length,
1389                nbCurrent = 0,
1390                html = '',
1391                i,
1392                status = document.cookie.indexOf(key + '=true');
1393
1394            if (status >= 0 && nb === 0) {
1395                html += tarteaucitron.lang.useNoCookie;
1396            } else if (status >= 0) {
1397                for (i = 0; i < nb; i += 1) {
1398                    if (document.cookie.indexOf(arr[i] + '=') !== -1) {
1399                        nbCurrent += 1;
1400                        if (tarteaucitron.cookie.owner[arr[i]] === undefined) {
1401                            tarteaucitron.cookie.owner[arr[i]] = [];
1402                        }
1403                        if (tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]], tarteaucitron.services[key].name) === false) {
1404                            tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name);
1405                        }
1406                    }
1407                }
1408
1409                if (nbCurrent > 0) {
1410                    html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' cookie';
1411                    if (nbCurrent > 1) {
1412                        html += 's';
1413                    }
1414                    html += '.';
1415                } else {
1416                    html += tarteaucitron.lang.useNoCookie;
1417                }
1418            } else if (nb === 0) {
1419                html = tarteaucitron.lang.noCookie;
1420            } else {
1421                html += tarteaucitron.lang.useCookie + ' ' + nb + ' cookie';
1422                if (nb > 1) {
1423                    html += 's';
1424                }
1425                html += '.';
1426            }
1427
1428            if (document.getElementById('tacCL' + key) !== null) {
1429                document.getElementById('tacCL' + key).innerHTML = html;
1430            }
1431        },
1432        "crossIndexOf": function (arr, match) {
1433            "use strict";
1434            var i;
1435            for (i = 0; i < arr.length; i += 1) {
1436                if (arr[i] === match) {
1437                    return true;
1438                }
1439            }
1440            return false;
1441        },
1442        "number": function () {
1443            "use strict";
1444            var cookies = document.cookie.split(';'),
1445                nb = (document.cookie !== '') ? cookies.length : 0,
1446                html = '',
1447                i,
1448                name,
1449                namea,
1450                nameb,
1451                c,
1452                d,
1453                s = (nb > 1) ? 's' : '',
1454                savedname,
1455                regex = /^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,
1456                regexedDomain = (tarteaucitron.cdn.match(regex) !== null) ? tarteaucitron.cdn.match(regex)[1] : tarteaucitron.cdn,
1457                host = (tarteaucitron.domain !== undefined) ? tarteaucitron.domain : regexedDomain;
1458
1459            cookies = cookies.sort(function (a, b) {
1460                namea = a.split('=', 1).toString().replace(/ /g, '');
1461                nameb = b.split('=', 1).toString().replace(/ /g, '');
1462                c = (tarteaucitron.cookie.owner[namea] !== undefined) ? tarteaucitron.cookie.owner[namea] : '0';
1463                d = (tarteaucitron.cookie.owner[nameb] !== undefined) ? tarteaucitron.cookie.owner[nameb] : '0';
1464                if (c + a > d + b) { return 1; }
1465                if (c + a < d + b) { return -1; }
1466                return 0;
1467            });
1468
1469            if (document.cookie !== '') {
1470                for (i = 0; i < nb; i += 1) {
1471                    name = cookies[i].split('=', 1).toString().replace(/ /g, '');
1472                    if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) {
1473                        savedname = tarteaucitron.cookie.owner[name].join(' // ');
1474                        html += '<div class="tarteaucitronHidden">';
1475                        html += '     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';
1476                        html += '        ' + tarteaucitron.cookie.owner[name].join(' // ');
1477                        html += '    </span>';
1478                        html += '</div><ul class="cookie-list">';
1479                    } else if (tarteaucitron.cookie.owner[name] === undefined && host !== savedname) {
1480                        savedname = host;
1481                        html += '<div class="tarteaucitronHidden">';
1482                        html += '     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';
1483                        html += '        ' + host;
1484                        html += '    </span>';
1485                        html += '</div><ul class="cookie-list">';
1486                    }
1487                    html += '<li class="tarteaucitronCookiesListMain">';
1488                    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>';
1489                    html += '    </div>';
1490                    html += '    <div class="tarteaucitronCookiesListRight">' + tarteaucitron.fixSelfXSS(cookies[i].split('=').slice(1).join('=')) + '</div>';
1491                    html += '</li>';
1492                }
1493                html += '</ul>';
1494            } else {
1495                html += '<div class="tarteaucitronCookiesListMain">';
1496                html += '    <div class="tarteaucitronCookiesListLeft"><strong>-</strong></div>';
1497                html += '    <div class="tarteaucitronCookiesListRight"></div>';
1498                html += '</div>';
1499            }
1500
1501            html += '<div class="tarteaucitronHidden spacer-20"></div>';
1502
1503            if (document.getElementById('tarteaucitronCookiesList') !== null) {
1504                document.getElementById('tarteaucitronCookiesList').innerHTML = html;
1505            }
1506
1507            if (document.getElementById('tarteaucitronCookiesNumber') !== null) {
1508                document.getElementById('tarteaucitronCookiesNumber').innerHTML = nb;
1509            }
1510
1511            if (document.getElementById('tarteaucitronCookiesNumberBis') !== null) {
1512                document.getElementById('tarteaucitronCookiesNumberBis').innerHTML = nb + ' cookie' + s;
1513            }
1514
1515            var purgeBtns = document.getElementsByClassName("purgeBtn");
1516            for (i = 0; i < purgeBtns.length; i++) {
1517                tarteaucitron.addClickEventToElement(purgeBtns[i], function () {
1518                    tarteaucitron.cookie.purge([this.dataset.cookie]);
1519                    tarteaucitron.cookie.number();
1520                    tarteaucitron.userInterface.jsSizing('cookie');
1521                    return false;
1522                });
1523            }
1524
1525            for (i = 0; i < tarteaucitron.job.length; i += 1) {
1526                tarteaucitron.cookie.checkCount(tarteaucitron.job[i]);
1527            }
1528        }
1529    },
1530    "fixSelfXSS": function(html) {
1531        fixed = html.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
1532        return fixed;
1533    },
1534    "getLanguage": function () {
1535        "use strict";
1536
1537        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',
1538            defaultLanguage = 'en';
1539
1540        if (tarteaucitronForceLanguage !== '') {
1541            if (availableLanguages.indexOf(tarteaucitronForceLanguage) !== -1) {
1542                return tarteaucitronForceLanguage;
1543            }
1544        }
1545
1546        if (!navigator) { return 'en'; }
1547
1548        var lang = navigator.language || navigator.browserLanguage ||
1549                navigator.systemLanguage || navigator.userLang || null,
1550            userLanguage = lang ? lang.substr(0, 2) : null;
1551
1552        if (availableLanguages.indexOf(userLanguage) === -1) {
1553            return defaultLanguage;
1554        }
1555        return userLanguage;
1556    },
1557    "getLocale": function () {
1558        "use strict";
1559        if (!navigator) { return 'en_US'; }
1560
1561        var lang = navigator.language || navigator.browserLanguage ||
1562                navigator.systemLanguage || navigator.userLang || null,
1563            userLanguage = lang ? lang.substr(0, 2) : null;
1564
1565        if (userLanguage === 'fr') {
1566            return 'fr_FR';
1567        } else if (userLanguage === 'en') {
1568            return 'en_US';
1569        } else if (userLanguage === 'de') {
1570            return 'de_DE';
1571        } else if (userLanguage === 'es') {
1572            return 'es_ES';
1573        } else if (userLanguage === 'it') {
1574            return 'it_IT';
1575        } else if (userLanguage === 'pt') {
1576            return 'pt_PT';
1577        } else if (userLanguage === 'nl') {
1578            return 'nl_NL';
1579        } else if (userLanguage === 'el') {
1580            return 'el_EL';
1581        } else {
1582            return 'en_US';
1583        }
1584    },
1585    "addScript": function (url, id, callback, execute, attrName, attrVal, internal) {
1586        "use strict";
1587        var script,
1588            done = false;
1589
1590        if (execute === false) {
1591            if (typeof callback === 'function') {
1592                callback();
1593            }
1594        } else {
1595            script = document.createElement('script');
1596            script.type = 'text/javascript';
1597            script.id = (id !== undefined) ? id : '';
1598            script.async = true;
1599            script.src = url;
1600
1601            if (attrName !== undefined && attrVal !== undefined) {
1602                script.setAttribute(attrName, attrVal);
1603            }
1604
1605            if (typeof callback === 'function') {
1606                if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
1607                    script.onreadystatechange = script.onload = function () {
1608                        var state = script.readyState;
1609                        if (!done && (!state || /loaded|complete/.test(state))) {
1610                            done = true;
1611                            callback();
1612                        }
1613                    };
1614                } else {
1615                    callback();
1616                }
1617            }
1618
1619            if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
1620                document.getElementsByTagName('head')[0].appendChild(script);
1621            }
1622        }
1623    },
1624    "addInternalScript": function (url, id, callback, execute, attrName, attrVal) {
1625        tarteaucitron.addScript(url, id, callback, execute, attrName, attrVal, true);
1626    },
1627    "makeAsync": {
1628        "antiGhost": 0,
1629        "buffer": '',
1630        "init": function (url, id) {
1631            "use strict";
1632            var savedWrite = document.write,
1633                savedWriteln = document.writeln;
1634
1635            document.write = function (content) {
1636                tarteaucitron.makeAsync.buffer += content;
1637            };
1638            document.writeln = function (content) {
1639                tarteaucitron.makeAsync.buffer += content.concat("\n");
1640            };
1641
1642            setTimeout(function () {
1643                document.write = savedWrite;
1644                document.writeln = savedWriteln;
1645            }, 20000);
1646
1647            tarteaucitron.makeAsync.getAndParse(url, id);
1648        },
1649        "getAndParse": function (url, id) {
1650            "use strict";
1651            if (tarteaucitron.makeAsync.antiGhost > 9) {
1652                tarteaucitron.makeAsync.antiGhost = 0;
1653                return;
1654            }
1655            tarteaucitron.makeAsync.antiGhost += 1;
1656            tarteaucitron.addInternalScript(url, '', function () {
1657                if (document.getElementById(id) !== null) {
1658                    document.getElementById(id).innerHTML += "<span class='display-none'>&nbsp;</span>" + tarteaucitron.makeAsync.buffer;
1659                    tarteaucitron.makeAsync.buffer = '';
1660                    tarteaucitron.makeAsync.execJS(id);
1661                }
1662            });
1663        },
1664        "execJS": function (id) {
1665            /* not strict because third party scripts may have errors */
1666            var i,
1667                scripts,
1668                childId,
1669                type;
1670
1671            if (document.getElementById(id) === null) {
1672                return;
1673            }
1674
1675            scripts = document.getElementById(id).getElementsByTagName('script');
1676            for (i = 0; i < scripts.length; i += 1) {
1677                type = (scripts[i].getAttribute('type') !== null) ? scripts[i].getAttribute('type') : '';
1678                if (type === '') {
1679                    type = (scripts[i].getAttribute('language') !== null) ? scripts[i].getAttribute('language') : '';
1680                }
1681                if (scripts[i].getAttribute('src') !== null && scripts[i].getAttribute('src') !== '') {
1682                    childId = id + Math.floor(Math.random() * 99999999999);
1683                    document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
1684                    tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'), childId);
1685                } else if (type.indexOf('javascript') !== -1 || type === '') {
1686                    eval(scripts[i].innerHTML);
1687                }
1688            }
1689        }
1690    },
1691    "fallback": function (matchClass, content, noInner) {
1692        "use strict";
1693        var elems = document.getElementsByTagName('*'),
1694            i,
1695            index = 0;
1696
1697        for (i in elems) {
1698            if (elems[i] !== undefined) {
1699                for (index = 0; index < matchClass.length; index += 1) {
1700                    if ((' ' + elems[i].className + ' ')
1701                            .indexOf(' ' + matchClass[index] + ' ') > -1) {
1702                        if (typeof content === 'function') {
1703                            if (noInner === true) {
1704                                content(elems[i]);
1705                            } else {
1706                                elems[i].innerHTML = content(elems[i]);
1707                            }
1708                        } else {
1709                            elems[i].innerHTML = content;
1710                        }
1711                    }
1712                }
1713            }
1714        }
1715    },
1716    "engage": function (id) {
1717        "use strict";
1718        var html = '',
1719            r = Math.floor(Math.random() * 100000),
1720            engage = tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback;
1721
1722        if (tarteaucitron.lang['engage-' + id] !== undefined) {
1723            engage = tarteaucitron.lang['engage-' + id];
1724        }
1725
1726        html += '<div class="tac_activate tac_activate_' + id + '">';
1727        html += '   <div class="tac_float">';
1728        html += '      ' + engage;
1729        html += '      <button type="button" class="tarteaucitronAllow" id="Eng' + r + 'ed' + id + '">';
1730        html += '          <span class="tarteaucitronCheck"></span> ' + tarteaucitron.lang.allow;
1731        html += '       </button>';
1732        html += '   </div>';
1733        html += '</div>';
1734
1735        return html;
1736    },
1737    "extend": function (a, b) {
1738        "use strict";
1739        var prop;
1740        for (prop in b) {
1741            if (b.hasOwnProperty(prop)) {
1742                a[prop] = b[prop];
1743            }
1744        }
1745    },
1746    "proTemp": '',
1747    "proTimer": function () {
1748        "use strict";
1749        setTimeout(tarteaucitron.proPing, 500);
1750    },
1751    "pro": function (list) {
1752        "use strict";
1753        tarteaucitron.proTemp += list;
1754        clearTimeout(tarteaucitron.proTimer);
1755        tarteaucitron.proTimer = setTimeout(tarteaucitron.proPing, 500);
1756    },
1757    "proPing": function () {
1758        "use strict";
1759        if (tarteaucitron.uuid !== '' && tarteaucitron.uuid !== undefined && tarteaucitron.proTemp !== '') {
1760            var div = document.getElementById('tarteaucitronPremium'),
1761                timestamp = new Date().getTime(),
1762                url = 'https://tarteaucitron.io/log/?';
1763
1764            if (div === null) {
1765                return;
1766            }
1767
1768            url += 'account=' + tarteaucitron.uuid + '&';
1769            url += 'domain=' + tarteaucitron.domain + '&';
1770            url += 'status=' + encodeURIComponent(tarteaucitron.proTemp) + '&';
1771            url += '_time=' + timestamp;
1772
1773            div.innerHTML = '<img src="' + url + '" class="display-none" alt="" />';
1774
1775            tarteaucitron.proTemp = '';
1776        }
1777
1778        tarteaucitron.cookie.number();
1779    },
1780    "AddOrUpdate" : function(source, custom){
1781        /**
1782         Utility function to Add or update the fields of obj1 with the ones in obj2
1783         */
1784        for(key in custom){
1785            if(custom[key] instanceof Object){
1786                source[key] = tarteaucitron.AddOrUpdate(source[key], custom[key]);
1787            }else{
1788                source[key] = custom[key];
1789            }
1790        }
1791        return source;
1792    },
1793    "getElemWidth": function(elem) {
1794        return elem.getAttribute('width') || elem.clientWidth;
1795    },
1796    "getElemHeight": function(elem) {
1797        return elem.getAttribute('height') || elem.clientHeight;
1798    },
1799    "addClickEventToId": function (elemId, func) {
1800        tarteaucitron.addClickEventToElement(document.getElementById(elemId), func);
1801    },
1802    "addClickEventToElement": function (e, func) {
1803        if (e) {
1804            if (e.addEventListener) {
1805                e.addEventListener("click", func);
1806            } else {
1807                e.attachEvent("onclick", func);
1808            }
1809        }
1810    }
1811};

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.