PageSourceSearch

https://www.1001-services.com/tarteaucitron_js/tarteaucitron.js

js 1001-services.com collected 2026-10-08 01:53:48 UTC 127,989 bytes, 2,364 lines download raw bytes

vendor: 18,198 bytes, lines 1-418
1/*jslint browser: true, evil: true */
2/* min ready */
3
4var scripts = document.getElementsByTagName('script'),
5    tarteaucitronPath = (document.currentScript || scripts[scripts.length - 1]).src.split('?')[0],
6    tarteaucitronForceCDN = (tarteaucitronForceCDN === undefined) ? '' : tarteaucitronForceCDN,
7    tarteaucitronUseMin = (tarteaucitronUseMin === undefined) ? '' : tarteaucitronUseMin,
8    cdn = (tarteaucitronForceCDN === '') ? tarteaucitronPath.split('/').slice(0, -1).join('/') + '/' : tarteaucitronForceCDN,
9    alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch,
10    tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage,
11    tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire,
12    tarteaucitronCustomText = (tarteaucitronCustomText === undefined) ? '' : tarteaucitronCustomText,
13    // tarteaucitronExpireInDay: true for day(s) value - false for hour(s) value
14    tarteaucitronExpireInDay = (tarteaucitronExpireInDay === undefined || typeof tarteaucitronExpireInDay !== "boolean") ? true : tarteaucitronExpireInDay,
15    timeExpire = 31536000000,
16    tarteaucitronProLoadServices,
17    tarteaucitronNoAdBlocker = false,
18    tarteaucitronIsLoaded = false;
19
20
21
22var tarteaucitron = {
23    "version": 1.17,
24    "cdn": cdn,
25    "user": {},
26    "lang": {},
27    "services": {},
28    "added": [],
29    "idprocessed": [],
30    "state": {},
31    "launch": [],
32    "parameters": {},
33    "isAjax": false,
34    "reloadThePage": false,
35    "events": {
36        "init": function () {},
37        "load": function () {},
38    },
39    "init": function (params) {
40        "use strict";
41        var origOpen;
42
43        tarteaucitron.parameters = params;
44        if (alreadyLaunch === 0) {
45            alreadyLaunch = 1;
46            if (window.addEventListener) {
47                window.addEventListener("load", function () {
48                    tarteaucitron.initEvents.loadEvent(false);
49                }, false);
50                window.addEventListener("scroll", function () {
51                    tarteaucitron.initEvents.scrollEvent();
52                }, false);
53
54                window.addEventListener("keydown", function (evt) {
55                    tarteaucitron.initEvents.keydownEvent(false, evt);
56                }, false);
57                window.addEventListener("hashchange", function () {
58                    tarteaucitron.initEvents.hashchangeEvent();
59                }, false);
60                window.addEventListener("resize", function () {
61                    tarteaucitron.initEvents.resizeEvent();
62                }, false);
63            } else {
64                window.attachEvent("onload", function () {
65                    tarteaucitron.initEvents.loadEvent(true);
66                });
67                window.attachEvent("onscroll", function () {
68                    tarteaucitron.initEvents.scrollEvent();
69                });
70                window.attachEvent("onkeydown", function (evt) {
71                    tarteaucitron.initEvents.keydownEvent(true, evt);
72
73                });
74                window.attachEvent("onhashchange", function () {
75                    tarteaucitron.initEvents.hashchangeEvent();
76                });
77                window.attachEvent("onresize", function () {
78                    tarteaucitron.initEvents.resizeEvent();
79                });
80            }
81
82            if (typeof XMLHttpRequest !== 'undefined') {
83                origOpen = XMLHttpRequest.prototype.open;
84                XMLHttpRequest.prototype.open = function () {
85
86                    if (window.addEventListener) {
87                        this.addEventListener("load", function () {
88                            if (typeof tarteaucitronProLoadServices === 'function') {
89                                tarteaucitronProLoadServices();
90                            }
91                        }, false);
92                    } else if (typeof this.attachEvent !== 'undefined') {
93                        this.attachEvent("onload", function () {
94                            if (typeof tarteaucitronProLoadServices === 'function') {
95                                tarteaucitronProLoadServices();
96                            }
97                        });
98                    } else {
99                        if (typeof tarteaucitronProLoadServices === 'function') {
100                            setTimeout(tarteaucitronProLoadServices, 1000);
101                        }
102                    }
103
104                    try {
105                        origOpen.apply(this, arguments);
106                    } catch (err) {}
107                };
108            }
109        }
110
111        if(tarteaucitron.events.init) {
112            tarteaucitron.events.init();
113        }
114    },
115    "initEvents": {
116        "loadEvent": function (isOldBrowser) {
117            tarteaucitron.load();
118            tarteaucitron.fallback(['tarteaucitronOpenPanel'], function (elem) {
119                if (isOldBrowser) {
120                    elem.attachEvent("onclick", function (event) {
121                        tarteaucitron.userInterface.openPanel();
122                        event.preventDefault();
123                    });
124                } else {
125                    elem.addEventListener("click", function (event) {
126                        tarteaucitron.userInterface.openPanel();
127                        event.preventDefault();
128                    }, false);
129                }
130            }, true);
131        },
132        "keydownEvent": function (isOldBrowser, evt) {
133            if (evt.keyCode === 27) {
134                tarteaucitron.userInterface.closePanel();
135            }
136
137            if (isOldBrowser) {
138                if ( evt.keyCode === 9 && focusableEls.indexOf(evt.target) >= 0) {
139                    if ( evt.shiftKey ) /* shift + tab */ {
140                        if (document.activeElement === firstFocusableEl) {
141                            lastFocusableEl.focus();
142                            evt.preventDefault();
143                        }
144                    } else /* tab */ {
145                        if (document.activeElement === lastFocusableEl) {
146                            firstFocusableEl.focus();
147                            evt.preventDefault();
148                        }
149                    }
150                }
151            }
152        },
153        "hashchangeEvent": function () {
154            if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
155                tarteaucitron.userInterface.openPanel();
156            }
157        },
158        "resizeEvent": function () {
159            var tacElem = document.getElementById('tarteaucitron');
160            var tacCookieContainer = document.getElementById('tarteaucitronCookiesListContainer');
161
162            if (tacElem && tacElem.style.display === 'block') {
163                tarteaucitron.userInterface.jsSizing('main');
164            }
165
166            if (tacCookieContainer && tacCookieContainer.style.display === 'block') {
167                tarteaucitron.userInterface.jsSizing('cookie');
168            }
169        },
170        "scrollEvent": function () {
171            var scrollPos = window.pageYOffset || document.documentElement.scrollTop;
172            var heightPosition;
173            var tacPercentage = document.getElementById('tarteaucitronPercentage');
174            var tacAlertBig = document.getElementById('tarteaucitronAlertBig');
175
176            if (tacAlertBig && !tarteaucitron.highPrivacy) {
177                if (tacAlertBig.style.display === 'block') {
178                    heightPosition = tacAlertBig.offsetHeight + 'px';
179
180                    if (scrollPos > (screen.height * 2)) {
181                        tarteaucitron.userInterface.respondAll(true);
182                    } else if (scrollPos > (screen.height / 2)) {
183                        document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<strong>' + tarteaucitron.lang.alertBigScroll + '</strong> ' + tarteaucitron.lang.alertBig;
184                    }
185
186                    if (tacPercentage) {
187                        if (tarteaucitron.orientation === 'top') {
188                            tacPercentage.style.top = heightPosition;
189                        } else {
190                            tacPercentage.style.bottom = heightPosition;
191                        }
192                        tacPercentage.style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
193                    }
194                }
195            }
196        },
197    },
198    "load": function () {
199        "use strict";
200
201        if (tarteaucitronIsLoaded === true) {
202            return;
203        }
204
205        var cdn = tarteaucitron.cdn,
206            language = tarteaucitron.getLanguage(),
207            useMinifiedJS = ((cdn.indexOf('cdn.jsdelivr.net') >= 0) || (tarteaucitronPath.indexOf('.min.') >= 0) || (tarteaucitronUseMin !== '')),
208            pathToLang = cdn + 'lang/tarteaucitron.' + language + (useMinifiedJS ? '.min' : '') + '.js',
209            pathToServices = cdn + 'tarteaucitron.services' + (useMinifiedJS ? '.min' : '') + '.js',
210            linkElement = document.createElement('link'),
211            defaults = {
212                "adblocker": false,
213                "hashtag": '#tarteaucitron',
214                "cookieName": 'tarteaucitron',
215                "highPrivacy": true,
216                "orientation": "middle",
217                "bodyPosition": "bottom",
218                "removeCredit": false,
219                "showAlertSmall": false,
220                "showDetailsOnClick": true,
221                "showIcon": true,
222                "iconPosition": "BottomRight",
223                "cookieslist": false,
224                "handleBrowserDNTRequest": false,
225                "DenyAllCta": true,
226                "AcceptAllCta" : true,
227                "moreInfoLink": true,
228                "privacyUrl": "",
229                "useExternalCss": false,
230                "useExternalJs": false,
231                "mandatory": true,
232                "mandatoryCta": true,
233                "closePopup": false,
234                "groupServices": false,
235                "serviceDefaultState": 'wait',
236                "googleConsentMode": true,
237                "partnersList": false,
238                "texte": "",
239                "font_color": "#008300",
240                "fond_color": "#333333",
241                "lien_color": "#333333",
242            },
243            params = tarteaucitron.parameters;
244
245        // flag the tac load
246        tarteaucitronIsLoaded = true;
247
248        // Don't show the middle bar if we are on the privacy policy or more page
249        if (((tarteaucitron.parameters.readmoreLink !== undefined && window.location.href == tarteaucitron.parameters.readmoreLink) || window.location.href == tarteaucitron.parameters.privacyUrl) && tarteaucitron.parameters.orientation == "middle") {
250            tarteaucitron.parameters.orientation = "bottom";
251        }
252
253        // Step -1
254        if (typeof tarteaucitronCustomPremium !== 'undefined') {
255            tarteaucitronCustomPremium();
256        }
257
258        // Step 0: get params
259        if (params !== undefined) {
260
261            for (var k in defaults) {
262                if(!tarteaucitron.parameters.hasOwnProperty(k)) {
263                    tarteaucitron.parameters[k] = defaults[k];
264                }
265            }
266        }
267
268        // global
269        tarteaucitron.orientation = tarteaucitron.parameters.orientation;
270        tarteaucitron.hashtag = tarteaucitron.parameters.hashtag;
271        tarteaucitron.highPrivacy = tarteaucitron.parameters.highPrivacy;
272        tarteaucitron.handleBrowserDNTRequest = tarteaucitron.parameters.handleBrowserDNTRequest;
273        tarteaucitron.customCloserId = tarteaucitron.parameters.customCloserId;
274
275        // google consent mode
276        if (tarteaucitron.parameters.googleConsentMode === true) {
277
278            // set the dataLayer and a function to update
279            window.dataLayer = window.dataLayer || [];
280            window.tac_gtag = function tac_gtag() {
281                dataLayer.push(arguments);
282            };
283
284            // default consent to denied
285            window.tac_gtag('consent', 'default', {
286                ad_storage: 'denied',
287                analytics_storage: 'denied',
288                ad_user_data: 'denied',
289                ad_personalization: 'denied',
290                wait_for_update: 800
291            });
292
293            // if google ads, add a service for personalized ads
294            document.addEventListener('googleads_added', function() {
295
296                // skip if already added
297                if (tarteaucitron.added["gcmads"] === true) {
298                    return;
299                }
300
301                // simple service to control gcm with event
302                tarteaucitron.services.gcmads = {
303                    "key": "gcmads",
304                    "type": "ads",
305                    "name": "Google Ads (personalized ads)",
306                    "uri": "https://support.google.com/analytics/answer/9976101",
307                    "needConsent": true,
308                    "cookies": [],
309                    "js": function() {},
310                    "fallback": function() {}
311                };
312                tarteaucitron.job.push('gcmads');
313
314                // fix the event handler on the buttons
315                var i,
316                    allowBtns = document.getElementsByClassName("tarteaucitronAllow"),
317                    denyBtns = document.getElementsByClassName("tarteaucitronDeny");
318                for (i = 0; i < allowBtns.length; i++) {
319                    tarteaucitron.addClickEventToElement(allowBtns[i], function() {
320                        tarteaucitron.userInterface.respond(this, true);
321                    });
322                }
323                for (i = 0; i < denyBtns.length; i++) {
324                    tarteaucitron.addClickEventToElement(denyBtns[i], function() {
325                        tarteaucitron.userInterface.respond(this, false);
326                    });
327                }
328            });
329
330            // when personalized ads are accepted, accept googleads
331            document.addEventListener('gcmads_allowed', function() {
332                tarteaucitron.setConsent('googleads', true);
333            });
334
335            // personalized ads loaded/allowed, set gcm to granted
336            document.addEventListener('gcmads_loaded', function() {
337                window.tac_gtag('consent', 'update', {
338                    ad_user_data: 'granted',
339                    ad_personalization: 'granted'
340                });
341            });
342            document.addEventListener('gcmads_allowed', function() {
343                window.tac_gtag('consent', 'update', {
344                    ad_user_data: 'granted',
345                    ad_personalization: 'granted'
346                });
347            });
348
349            // personalized ads disallowed, set gcm to denied
350            document.addEventListener('gcmads_disallowed', function() {
351                window.tac_gtag('consent', 'update', {
352                    ad_user_data: 'denied',
353                    ad_personalization: 'denied'
354                });
355            });
356
357            // google ads loaded/allowed, set gcm to granted
358            document.addEventListener('googleads_loaded', function() {
359                window.tac_gtag('consent', 'update', {
360                    ad_storage: 'granted'
361                });
362            });
363            document.addEventListener('googleads_allowed', function() {
364                window.tac_gtag('consent', 'update', {
365                    ad_storage: 'granted'
366                });
367            });
368
369            // google ads disallowed, disable personalized ads and update gcm
370            document.addEventListener('googleads_disallowed', function() {
371                tarteaucitron.setConsent('gcmads', false);
372                window.tac_gtag('consent', 'update', {
373                    ad_storage: 'denied'
374                });
375            });
376
377            // ga4 loaded/allowed, set gcm to granted
378            document.addEventListener('gtag_loaded', function() {
379                window.tac_gtag('consent', 'update', {
380                    analytics_storage: 'granted'
381                });
382            });
383            document.addEventListener('gtag_allowed', function() {
384                window.tac_gtag('consent', 'update', {
385                    analytics_storage: 'granted'
386                });
387            });
388
389            // ga4 disallowed, update gcm
390            document.addEventListener('gtag_disallowed', function() {
391                window.tac_gtag('consent', 'update', {
392                    analytics_storage: 'denied'
393                });
394            });
395
396            // allow gtag/googleads by default if consent mode is on
397            window.addEventListener('tac.root_available', function() {
398                if (typeof tarteaucitron_block !== 'undefined') {
399                    tarteaucitron_block.unblock(/www\.googletagmanager\.com\/gtag\/js/);
400                    tarteaucitron_block.unblock(/www\.googleadservices\.com\/pagead\/conversion/);
401                    tarteaucitron_block.unblock(/AW-/);
402                    tarteaucitron_block.unblock(/google-analytics\.com\/analytics\.js/);
403                    tarteaucitron_block.unblock(/google-analytics\.com\/ga\.js/);
404                }
405            });
406        }
407
408        // Step 1: load css
409        if ( !tarteaucitron.parameters.useExternalCss ) {
410            linkElement.rel = 'stylesheet';
411            linkElement.type = 'text/css';
412            linkElement.href = cdn + 'css/tarteaucitron' + (useMinifiedJS ? '.min' : '') + '.css';
413            document.getElementsByTagName('head')[0].appendChild(linkElement);
414        }
415        // Step 2: load language and services
416        tarteaucitron.addInternalScript(pathToLang, '', function () {
417
418          if(tarteaucitronCustomText !== ''){
419            tarteaucitron.lang = tarteaucitron.AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText);
420          }
421            tarteaucitron.addInternalScript(pathToServices, '', function () {
422
423                // css for the middle bar TODO: add it on the css file
424                if (tarteaucitron.orientation === 'middle') {
425                    var customThemeMiddle = document.createElement('style'),
426                        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;}}';
427
428                    customThemeMiddle.type = 'text/css';
429                    if (customThemeMiddle.styleSheet) {
430                        customThemeMiddle.styleSheet.cssText = cssRuleMiddle;
431                    } else {
432                        customThemeMiddle.appendChild(document.createTextNode(cssRuleMiddle));
433                    }
434                    document.getElementsByTagName('head')[0].appendChild(customThemeMiddle);
435                }
436
437                // disable the expand option if services grouped by category
438                if (tarteaucitron.parameters.groupServices == true) {
439                    tarteaucitron.parameters.showDetailsOnClick = true;
440                }
441
442                // css for the popup bar TODO: add it on the css file
443                if (tarteaucitron.orientation === 'popup') {
444                    var customThemePopup = document.createElement('style'),
445                        cssRulePopup = 'div#tarteaucitronAlertBig:before {content: \'' + tarteaucitron.lang.middleBarHead + '\';font-size: 22px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {bottom: 0;top: auto!important;left: 8px!important;right: auto!important;transform: initial!important;border-radius: 5px 5px 0 0!important;max-width: 250px!important;width: calc(100% - 16px)!important;min-width: 0!important;padding: 25px 0;}span#tarteaucitronDisclaimerAlert {padding: 0 30px;font-size: 15px!important;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 10px 0 30px;display: block;text-align: center;font-size: 21px;}div#tarteaucitronAlertBig button {margin: 0 auto 10px!important;display: block!important;width: calc(100% - 60px);box-sizing: border-box;}';
446
447                    customThemePopup.type = 'text/css';
448                    if (customThemePopup.styleSheet) {
449                        customThemePopup.styleSheet.cssText = cssRulePopup;
450                    } else {
451                        customThemePopup.appendChild(document.createTextNode(cssRulePopup));
452                    }
453                    document.getElementsByTagName('head')[0].appendChild(customThemePopup);
454                }
455
456                var body = document.body,
457                    div = document.createElement('div'),
458                    html = '',
459                    index,
460                    orientation = 'Top',
461                    modalAttrs = '',
462                    cat = ['ads', 'analytic', 'api', 'comment', 'social', 'support', 'video', 'other', 'google'],
463                    i;
464
465                cat = cat.sort(function (a, b) {
466                    if (tarteaucitron.lang[a].title > tarteaucitron.lang[b].title) { return 1; }
467                    if (tarteaucitron.lang[a].title < tarteaucitron.lang[b].title) { return -1; }
468                    return 0;
469                });
470
471                // Step 3: prepare the html
472                html += '<div role="heading" aria-level="1" id="tac_title" class="tac_visually-hidden">' + tarteaucitron.lang.title + '</div>';
473                html += '<div id="tarteaucitronPremium"></div>';
474                if (tarteaucitron.reloadThePage) {
475                    html += '<button type="button" id="tarteaucitronBack" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')"></button>';
476                } else {
477                    html += '<button type="button" id="tarteaucitronBack" aria-label="' + tarteaucitron.lang.close + '" title="' + tarteaucitron.lang.close + '"></button>';
478                }
479                html += '<div id="tarteaucitron" role="dialog" aria-modal="true" aria-labelledby="dialogTitle" tabindex="-1">';
480                if (tarteaucitron.reloadThePage) {
481                    html += '   <button type="button" id="tarteaucitronClosePanel" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')">';
482                } else {
483                    html += '   <button type="button" id="tarteaucitronClosePanel">';
484                }
485                html += '       ' + tarteaucitron.lang.close;
486                html += '   </button>';
487                html += '   <div id="tarteaucitronServices">';
488                html += '      <div class="tarteaucitronLine tarteaucitronMainLine" id="tarteaucitronMainLineOffset">';
vendor: 13,849 bytes, lines 489-652
489                html += '         <span class="tarteaucitronH1" role="heading" aria-level="1" id="dialogTitle">'+ tarteaucitron.lang.title + '</span>';
490                html += '         <div id="tarteaucitronInfo">';
491                html += '         ' + tarteaucitron.lang.disclaimer;
492                if (tarteaucitron.parameters.privacyUrl !== "") {
493                    html += '   <br/><br/>';
494                    html += '   <button type="button" id="tarteaucitronPrivacyUrlDialog" role="link">';
495                    html += '       ' + tarteaucitron.lang.privacyUrl;
496                    html += '   </button>';
497                }
498                html += '         </div>';
499                html += '         <div class="tarteaucitronName">';
500                html += '            <span class="tarteaucitronH2" role="heading" aria-level="2">' + tarteaucitron.lang.all + '</span>';
501                html += '         </div>';
502                html += '         <div class="tarteaucitronAsk" id="tarteaucitronScrollbarAdjust">';
503                html += '            <button type="button" id="tarteaucitronAllAllowed" class="tarteaucitronAllow">';
504                html += '               <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allowAll;
505                html += '            </button> ';
506                html += '            <button type="button" id="tarteaucitronAllDenied" class="tarteaucitronDeny">';
507                html += '               <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.denyAll;
508                html += '            </button>';
509                html += '         </div>';
510                html += '      </div>';
511                html += '      <div class="tarteaucitronBorder">';
512                html += '         <div class="clear"></div><ul>';
513
514
515                if (tarteaucitron.parameters.mandatory == true) {
516                   html += '<li id="tarteaucitronServicesTitle_mandatory">';
517                   html += '<div class="tarteaucitronTitle">';
518                    if(tarteaucitron.parameters.showDetailsOnClick){
519                        html += '   <button type="button" tabindex="-1"><span class="tarteaucitronPlus" aria-hidden="true"></span> ' + tarteaucitron.lang.mandatoryTitle + '</button>';
520                    }else{
521                        html += '   <span class="asCatToggleBtn">' + tarteaucitron.lang.mandatoryTitle + '</span>';
522                    }
523                   html += '</div>';
524                   html += '<ul id="tarteaucitronServices_mandatory">';
525                   html += '<li class="tarteaucitronLine">';
526                   html += '   <div class="tarteaucitronName">';
527                   html += '       <span class="tarteaucitronH3" role="heading" aria-level="3">' + tarteaucitron.lang.mandatoryText + '</span>';
528                   html += '       <span class="tarteaucitronListCookies" aria-hidden="true"></span><br/>';
529                   html += '   </div>';
530                   if (tarteaucitron.parameters.mandatoryCta == true) {
531                       html += '   <div class="tarteaucitronAsk">';
532                       html += '       <button type="button" class="tarteaucitronAllow" tabindex="-1" disabled>';
533                       html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
534                       html += '       </button> ';
535                       html += '       <button type="button" class="tarteaucitronDeny" style="visibility:hidden" tabindex="-1">';
536                       html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
537                       html += '       </button> ';
538                       html += '   </div>';
539                   }
540                   html += '</li>';
541                   html += '</ul></li>';
542                }
543
544                for (i = 0; i < cat.length; i += 1) {
545                    html += '         <li id="tarteaucitronServicesTitle_' + cat[i] + '" class="tarteaucitronHidden">';
546                    html += '            <div class="tarteaucitronTitle" role="heading" aria-level="2">';
547                    if(tarteaucitron.parameters.showDetailsOnClick)
548                    {
549                        html += '               <button type="button" class="catToggleBtn" aria-expanded="false" data-cat="tarteaucitronDetails' + cat[i] + '"><span class="tarteaucitronPlus" aria-hidden="true"></span> ' + tarteaucitron.lang[cat[i]].title + '</button>';
550                    }else{
551                        html += '               <span class="asCatToggleBtn" data-cat="tarteaucitronInlineDetails' + cat[i] + '">' + tarteaucitron.lang[cat[i]].title + '</span>';
552                    }
553                    html += '            </div>';
554                    html += '            <div id="tarteaucitronDetails' + cat[i] + '" class="tarteaucitronDetails '+ (tarteaucitron.parameters.showDetailsOnClick ? 'tarteaucitronInfoBox' : 'tarteaucitronDetailsInline')+'">';
555                    html += '               ' + tarteaucitron.lang[cat[i]].details;
556                    html += '            </div>';
557                    html += '         <ul id="tarteaucitronServices_' + cat[i] + '"></ul></li>';
558                }
559                html += '             <li id="tarteaucitronNoServicesTitle" class="tarteaucitronLine">' + tarteaucitron.lang.noServices + '</li>';
560                html += '         </ul>';
561                html += '         <div class="tarteaucitronHidden tarteaucitron-spacer-20" id="tarteaucitronScrollbarChild"></div>';
562                if (tarteaucitron.parameters.removeCredit === false) {
563                    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>';
564                }
565                html += '       </div>';
566                html += '   </div>';
567                html += '</div>';
568
569                if (tarteaucitron.parameters.orientation === 'bottom') {
570                    orientation = 'Bottom';
571                }
572
573                if (tarteaucitron.parameters.orientation === 'middle' || tarteaucitron.parameters.orientation === 'popup') {
574                    modalAttrs = ' role="dialog" aria-modal="true" aria-labelledby="tac_title"';
575                }
576
577                if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) {
578                    html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '"' + modalAttrs + '" style="background-color:' + tarteaucitron.parameters.fond_color + '">';
579                    //html += '<div class="tarteaucitronAlertBigWrapper">';
580                    html += '   <span id="tarteaucitronDisclaimerAlert" role="paragraph">';
581                    html += '       ' + tarteaucitron.parameters.texte;
582                    html += '   </span>';
583                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
584                    html += '   <button type="button" id="tarteaucitronPersonalize" aria-label="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow +
585                    '" style="background-color:' +
586                    tarteaucitron.parameters.font_color +
587                    ';">';
588                    html += '       ' + tarteaucitron.lang.personalize;
589                    html += '   </button>';
590
591                    if (tarteaucitron.parameters.privacyUrl !== "") {
592                        html += '   <button role="link" type="button" id="tarteaucitronPrivacyUrl" onclick="document.location = tarteaucitron.parameters.privacyUrl" style="background-color:' +
593                        tarteaucitron.parameters.font_color +
594                        ";color:" +
595                        tarteaucitron.parameters.lien_color +
596                        ';">';
597                        html += '       ' + tarteaucitron.lang.privacyUrl;
598                        html += '   </button>';
599                    }
600
601                    //html += '   </span>';
602                    //html += '</div>';
603                    html += '</div>';
604                } else {
605                    html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '"' + modalAttrs + '" style="background-color:' + tarteaucitron.parameters.fond_color + '">';
606                    //html += '<div class="tarteaucitronAlertBigWrapper">';
607                    html += '   <span id="tarteaucitronDisclaimerAlert" role="paragraph">';
608
609                    if (tarteaucitron.parameters.highPrivacy) {
610                        html += '       ' + tarteaucitron.lang.alertBigPrivacy;
611                    } else {
612                        html += '       ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig;
613                    }
614
615                    html += '   </span>';
616                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
617                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronAllow" id="tarteaucitronPersonalize2" style="background-color:' + tarteaucitron.parameters.font_color + ';">';
618                    html += '       <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.acceptAll;
619                    html += '   </button>';
620
621
622                    if (tarteaucitron.parameters.DenyAllCta) {
623                        if (tarteaucitron.reloadThePage) {
624                                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2" aria-label="' + tarteaucitron.lang.denyAll + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.denyAll + ' (' + tarteaucitron.lang.reload + ')">';
625                        } else {
626                                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2">';
627                        }
628                                    html += '       <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.denyAll;
629                                    html += '   </button>';
630                                    //html += '   <br/><br/>';
631                    }
632
633                    html += '   <button type="button" id="tarteaucitronCloseAlert" aria-label="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '">';
634                    html += '       ' + tarteaucitron.lang.personalize;
635                    html += '   </button>';
636
637                    if (tarteaucitron.parameters.privacyUrl !== "") {
638                        html += '   <button type="button" id="tarteaucitronPrivacyUrl" role="link">';
639                        html += '       ' + tarteaucitron.lang.privacyUrl;
640                        html += '   </button>';
641                    }
642
643                    //html += '   </span>';
644                    //html += '</div>';
645                    html += '</div>';
646                    html += '<div id="tarteaucitronPercentage"></div>';
647                }
648
649                if (tarteaucitron.parameters.showIcon === true) {
650                    html += '<div id="tarteaucitronIcon" class="tarteaucitronIcon' + tarteaucitron.parameters.iconPosition + '" style="display: block">';
651                    html += '   <button type="button" id="tarteaucitronManager" aria-label="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '">';
652                    html += '       <img src="' + (tarteaucitron.parameters.iconSrc ? tarteaucitron.parameters.iconSrc : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAGA0lEQVRoge1a207bWBRdBtJwLYZhKDMVmlSK1LxNkPo+ZH6g8B6p5AuALwC+APoFoVLeoT8whPeRSt+CZKmZVu3AiIsRlEtCktGyjy8xzuXYhvahS0JJHJ/4rLP3XnuffcAPfGdQ7mM6jRLSAF4BxqsbewB2lRS2o35mpEQaJcwCyANIdLi1DGBNSWEzqmdHRqRRwjqAJclhtExOSUEP+/xIiDRKhhUWfL7ShTtBuJnqcw+/z4Ql0xNmMEwSSz4ku
652NIzSgpjSsqYJP/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="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '">';
653                    html += '   </button>';
654                    html += '</div>';
655                }
656
657                if (tarteaucitron.parameters.showAlertSmall === true) {
658                    html += '<div id="tarteaucitronAlertSmall" class="tarteaucitronAlertSmall' + orientation + '">';
659                    html += '   <button type="button" id="tarteaucitronManager" aria-label="' + tarteaucitron.lang.alertSmall + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.alertSmall + ' ' + tarteaucitron.lang.modalWindow + '">';
660                    html += '       ' + tarteaucitron.lang.alertSmall;
661                    html += '       <span id="tarteaucitronDot">';
662                    html += '           <span id="tarteaucitronDotGreen"></span>';
663                    html += '           <span id="tarteaucitronDotYellow"></span>';
664                    html += '           <span id="tarteaucitronDotRed"></span>';
665                    html += '       </span>';
666                    if (tarteaucitron.parameters.cookieslist === true) {
667                        html += '   </button><!-- @whitespace';
668                        html += '   --><button type="button" id="tarteaucitronCookiesNumber" aria-expanded="false" aria-controls="tarteaucitronCookiesListContainer">0</button>';
669                        html += '   <div id="tarteaucitronCookiesListContainer">';
670                        if (tarteaucitron.reloadThePage) {
671                            html += '       <button type="button" id="tarteaucitronClosePanelCookie" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')">';
672                        } else {
673                            html += '       <button type="button" id="tarteaucitronClosePanelCookie">';
674                        }
675                        html += '           ' + tarteaucitron.lang.close;
676                        html += '       </button>';
677                        html += '       <div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">';
vendor: 4,585 bytes, lines 678-764
678                        html += '            <span class="tarteaucitronH2" role="heading" aria-level="2" id="tarteaucitronCookiesNumberBis">0 cookie</span>';
679                        html += '       </div>';
680                        html += '       <div id="tarteaucitronCookiesList"></div>';
681                        html += '    </div>';
682                    } else {
683                        html += '   </div>';
684                    }
685                    html += '</div>';
686                }
687
688                tarteaucitron.addInternalScript(tarteaucitron.cdn + 'advertising' + (useMinifiedJS ? '.min' : '') + '.js', '', function () {
689                    if (tarteaucitronNoAdBlocker === true || tarteaucitron.parameters.adblocker === false) {
690
691                        // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened
692                        /*var wrapper = document.createElement('div');
693                        wrapper.id = "tarteaucitronContentWrapper";
694
695                        while (document.body.firstChild)
696                        {
697                            wrapper.appendChild(document.body.firstChild);
698                        }
699
700                        // Append the wrapper to the body
701                        document.body.appendChild(wrapper);*/
702
703                        div.id = 'tarteaucitronRoot';
704                        if (tarteaucitron.parameters.bodyPosition === 'top') {
705                            // Prepend tarteaucitron: #tarteaucitronRoot first-child of the body for better accessibility
706                            var bodyFirstChild = body.firstChild;
707                            body.insertBefore(div, bodyFirstChild);
708                        }
709                        else {
710                            // Append tarteaucitron: #tarteaucitronRoot last-child of the body
711                            body.appendChild(div, body);
712                        }
713
714                        div.setAttribute('data-nosnippet', 'true');
715                        div.setAttribute('lang', language);
716                        div.setAttribute('role', 'region');
717                        div.setAttribute('aria-labelledby', 'tac_title');
718
719                        div.innerHTML = html;
720
721                        //ie compatibility
722                        var tacRootAvailableEvent;
723                        if(typeof(Event) === 'function') {
724                            tacRootAvailableEvent = new Event("tac.root_available");
725                        }else if (typeof(document.createEvent) === 'function'){
726                            tacRootAvailableEvent = document.createEvent('Event');
727                            tacRootAvailableEvent.initEvent("tac.root_available", true, true);
728                        }
729                        //end ie compatibility
730
731                        if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacRootAvailableEvent);}
732
733                        if (tarteaucitron.job !== undefined) {
734                            tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job);
735                            for (index = 0; index < tarteaucitron.job.length; index += 1) {
736                                tarteaucitron.addService(tarteaucitron.job[index]);
737                            }
738                        } else {
739                            tarteaucitron.job = [];
740                        }
741
742                        if (tarteaucitron.job.length === 0) {
743                            tarteaucitron.userInterface.closeAlert();
744                        }
745
746                        tarteaucitron.isAjax = true;
747
748                        tarteaucitron.job.push = function (id) {
749
750                            // ie <9 hack
751                            if (typeof tarteaucitron.job.indexOf === 'undefined') {
752                                tarteaucitron.job.indexOf = function (obj, start) {
753                                    var i,
754                                        j = this.length;
755                                    for (i = (start || 0); i < j; i += 1) {
756                                        if (this[i] === obj) { return i; }
757                                    }
758                                    return -1;
759                                };
760                            }
761
762                            if (tarteaucitron.job.indexOf(id) === -1) {
763                                Array.prototype.push.call(this, id);
764                            }
765                            tarteaucitron.launch[id] = false;
766                            tarteaucitron.addService(id);
767                        };
768
769                        if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
770                            tarteaucitron.userInterface.openPanel();
771                        }
772
773                        tarteaucitron.cookie.number();
774                        setInterval(tarteaucitron.cookie.number, 60000);
775                    }
776                }, tarteaucitron.parameters.adblocker);
777
778                if (tarteaucitron.parameters.adblocker === true) {
779                    setTimeout(function () {
780                        if (tarteaucitronNoAdBlocker === false) {
781                            html = '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + ' tarteaucitron-display-block" role="alert" aria-live="polite" style="background-color:' +
782                            tarteaucitron.parameters.fond_color +
783                            '">';
784                            html += '   <p id="tarteaucitronDisclaimerAlert">';
785                            html += '       ' + tarteaucitron.lang.adblock + '<br/>';
786                            html += '       <strong>' + tarteaucitron.lang.adblock_call + '</strong>';
787                            html += '   </p>';
788                            html += '   <button type="button" class="tarteaucitronCTAButton" id="tarteaucitronCTAButton">';
789                            html += '       ' + tarteaucitron.lang.reload;
790                            html += '   </button>';
791                            html += '</div>';
792                            html += '<div role="heading" aria-level="1" id="tac_title" class="tac_visually-hidden">' + tarteaucitron.lang.title + '</div>';
793                            html += '<div id="tarteaucitronPremium"></div>';
794
795                            div.id = 'tarteaucitronRoot';
796                            if (tarteaucitron.parameters.bodyPosition === 'top') {
797                                // Prepend tarteaucitron: #tarteaucitronRoot first-child of the body for better accessibility
798                                var bodyFirstChild = body.firstChild;
799                                body.insertBefore(div, bodyFirstChild);
800                            }
801                            else {
802                                // Append tarteaucitron: #tarteaucitronRoot last-child of the body
803                                body.appendChild(div, body);
804                            }
805
806                            div.setAttribute('data-nosnippet', 'true');
807                            div.setAttribute('lang', language);
808                            div.setAttribute('role', 'region');
809                            div.setAttribute('aria-labelledby', 'tac_title');
810
811                            div.innerHTML = html;
812                        }
813                    }, 1500);
814                }
815                if(tarteaucitron.parameters.closePopup === true){
816                    setTimeout(function() {
817                        var closeElement = document.getElementById('tarteaucitronAlertBig'),
818                            closeSpan = document.createElement('span');
819                        if (closeElement) {
820                            closeSpan.textContent = 'X';
821                            closeSpan.setAttribute('id', "tarteaucitronCloseCross");
822                            closeElement.insertBefore(closeSpan, closeElement.firstElementChild);
823                        }
824                    }, 100);
825                }
826
827                if(tarteaucitron.parameters.groupServices === true) {
828                    var tac_group_style = document.createElement('style');
829                    tac_group_style.innerHTML = '.tarteaucitronTitle{display:none}';
830                    document.head.appendChild(tac_group_style);
831                    var cats = document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]')
832                    Array.prototype.forEach.call(cats, function(item) {
833                        var cat = item.getAttribute('id').replace(/^(tarteaucitronServicesTitle_)/, "");
834                        if (cat !== "mandatory") {
835                            var html = '';
836                            html += '<li  class="tarteaucitronLine">';
837                            html += '   <div class="tarteaucitronName">';
838                            html += '       <span class="tarteaucitronH3" role="heading" aria-level="2">'+tarteaucitron.lang[cat].title+'</span>';
839                            html += '       <span>'+tarteaucitron.lang[cat].details+'</span>';
840                            html += '   <button type="button" aria-expanded="false" class="tarteaucitron-toggle-group" id="tarteaucitron-toggle-group-'+cat+'">'+tarteaucitron.lang.alertSmall+' ('+document.getElementById("tarteaucitronServices_"+cat).childElementCount+')</button>';
841                            html += '   </div>';
842                            html += '   <div class="tarteaucitronAsk" id="tarteaucitron-group-'+cat+'">';
843                            html += '       <button type="button" aria-label="' + tarteaucitron.lang.allow + ' ' + tarteaucitron.lang[cat].title + '" class="tarteaucitronAllow" id="tarteaucitron-accept-group-'+cat+'">';
844                            html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
845                            html += '       </button> ';
846                            html += '       <button type="button" aria-label="' + tarteaucitron.lang.deny + ' ' + tarteaucitron.lang[cat].title + '" class="tarteaucitronDeny" id="tarteaucitron-reject-group-'+cat+'">';
847                            html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
848                            html += '       </button>';
849                            html += '   </div>';
850                            html += '</li>';
851                            var ul = document.createElement('ul');
852                            ul.innerHTML = html;
853                            item.insertBefore(ul, item.querySelector('#tarteaucitronServices_'+cat+''));
854                            document.querySelector('#tarteaucitronServices_' + cat).style.display = 'none';
855                            tarteaucitron.addClickEventToId("tarteaucitron-toggle-group-" + cat, function () {
856                                tarteaucitron.userInterface.toggle('tarteaucitronServices_' + cat);
857                               if (document.getElementById('tarteaucitronServices_' + cat).style.display == 'block') {
858                                    tarteaucitron.userInterface.addClass('tarteaucitronServicesTitle_' + cat, 'tarteaucitronIsExpanded');
859                                    document.getElementById('tarteaucitron-toggle-group-'+cat).setAttribute('aria-expanded', 'true');
860                                } else {
861                                    tarteaucitron.userInterface.removeClass('tarteaucitronServicesTitle_' + cat, 'tarteaucitronIsExpanded');
862                                    document.getElementById('tarteaucitron-toggle-group-'+cat).setAttribute('aria-expanded', 'false');
863                                }
864                                //tarteaucitron.initEvents.resizeEvent();
865                            });
866                            tarteaucitron.addClickEventToId("tarteaucitron-accept-group-" + cat, function () {
867                                tarteaucitron.userInterface.respondAll(true, cat);
868                            });
869                            tarteaucitron.addClickEventToId("tarteaucitron-reject-group-" + cat, function () {
870                                tarteaucitron.userInterface.respondAll(false, cat);
871                            });
872                        }
873                    });
874                }
875
876                // add info about the services on the main banner
877                if (tarteaucitron.parameters.partnersList === true && (tarteaucitron.parameters.orientation === "middle" || tarteaucitron.parameters.orientation === "popup")) {
878                    setTimeout(function() {
879                        var liPartners = "";
880                        var tarteaucitronPartnersCat = [];
881                        tarteaucitron.job.forEach(function (id) {
882                            if (tarteaucitronPartnersCat[tarteaucitron.services[id].type] === undefined) {
883                                tarteaucitronPartnersCat[tarteaucitron.services[id].type] = true;
884                                liPartners += "<li>" + tarteaucitron.lang[tarteaucitron.services[id].type].title + "</li>";
885                            }
886                        });
887                        var tacPartnersInfoParent = document.getElementById('tarteaucitronDisclaimerAlert');
888                        if (tacPartnersInfoParent !== null) {
889                            tacPartnersInfoParent.insertAdjacentHTML('beforeend', '<div class="tarteaucitronPartnersList"><b>
889' + tarteaucitron.lang.ourpartners + ' (' + tarteaucitron.job.length + ')</b> <ul>' + liPartners + '</ul></div>');
890                        }
891                    }, 100);
892                }
893
894                // add a save button
895                setTimeout(function() {
896                    var tacSaveButtonParent = document.getElementById('tarteaucitronServices');
897                    if (tacSaveButtonParent !== null) {
898                        tacSaveButtonParent.insertAdjacentHTML('beforeend', '<div id="tarteaucitronSave"><button class="tarteaucitronAllow" id="tarteaucitronSaveButton">' + tarteaucitron.lang.save + '</button></div>');
899                    }
900                }, 100);
901
902                tarteaucitron.userInterface.color("", true);
903
904                // add a little timeout to be sure everything is accessible
905                setTimeout(function () {
906
907                    // Setup events
908                    tarteaucitron.addClickEventToId("tarteaucitronCloseCross", function () {
909                        tarteaucitron.userInterface.closeAlert();
910                    });
911                    tarteaucitron.addClickEventToId("tarteaucitronPersonalize", function () {
912                        tarteaucitron.userInterface.openPanel();
913                    });
914                    tarteaucitron.addClickEventToId("tarteaucitronPersonalize2", function () {
915                        tarteaucitron.userInterface.respondAll(true);
916                        window.location.reload();
917                    });
918                    tarteaucitron.addClickEventToId("tarteaucitronManager", function () {
919                        tarteaucitron.userInterface.openPanel();
920                    });
921                    tarteaucitron.addClickEventToId("tarteaucitronBack", function () {
922                        tarteaucitron.userInterface.closePanel();
923                    });
924                    tarteaucitron.addClickEventToId("tarteaucitronClosePanel", function () {
925                        tarteaucitron.userInterface.closePanel();
926                    });
927                    tarteaucitron.addClickEventToId("tarteaucitronClosePanelCookie", function () {
928                        tarteaucitron.userInterface.closePanel();
929                    });
930                    tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrl", function () {
931                        document.location = tarteaucitron.parameters.privacyUrl;
932                    });
933                    tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrlDialog", function () {
934                        document.location = tarteaucitron.parameters.privacyUrl;
935                    });
936                    tarteaucitron.addClickEventToId("tarteaucitronCookiesNumber", function () {
937                        tarteaucitron.userInterface.toggleCookiesList();
938                    });
939                    tarteaucitron.addClickEventToId("tarteaucitronAllAllowed", function () {
940                        tarteaucitron.userInterface.respondAll(true);
941                    });
942                    tarteaucitron.addClickEventToId("tarteaucitronAllDenied", function () {
943                        tarteaucitron.userInterface.respondAll(false);
944                    });
945                    tarteaucitron.addClickEventToId("tarteaucitronAllDenied2", function () {
946                        tarteaucitron.userInterface.respondAll(false, '', true);
947                        if (tarteaucitron.reloadThePage === true) {
948                            window.location.reload();
949                        }
950                    });
951                    tarteaucitron.addClickEventToId("tarteaucitronCloseAlert", function () {
vendor: 39,445 bytes, lines 952-1709
952                        tarteaucitron.userInterface.openPanel();
953                    });
954                    tarteaucitron.addClickEventToId("tarteaucitronCTAButton", function () {
955                        location.reload();
956                    });
957                    tarteaucitron.addClickEventToId("tarteaucitronSaveButton", function () {
958                        var timeoutSaveButton = 0;
959                        tarteaucitron.job.forEach(function(id) {
960                            if (tarteaucitron.state[id] !== true && tarteaucitron.state[id] !== false) {
961                                timeoutSaveButton = 500;
962                                tarteaucitron.setConsent(id, false);
963                            }
964                        });
965                        setTimeout(tarteaucitron.userInterface.closePanel, timeoutSaveButton);
966                    });
967                    var toggleBtns = document.getElementsByClassName("catToggleBtn"), i;
968                    for (i = 0; i < toggleBtns.length; i++) {
969                        toggleBtns[i].dataset.index = i;
970                        tarteaucitron.addClickEventToElement(toggleBtns[i], function () {
971                            if(!tarteaucitron.parameters.showDetailsOnClick) return false;
972                            tarteaucitron.userInterface.toggle('tarteaucitronDetails' + cat[this.dataset.index], 'tarteaucitronInfoBox');
973                            if (document.getElementById('tarteaucitronDetails' + cat[this.dataset.index]).style.display === 'block') {
974                                this.setAttribute('aria-expanded', 'true');
975                            } else {
976                                this.setAttribute('aria-expanded', 'false');
977                            }
978                            return false;
979                        });
980                    }
981
982                    // accessibility: on click on "Allow" in the site (not in TAC module), move focus to the loaded service's parent 
983                    var allowBtnsInSite = document.querySelectorAll(".tac_activate .tarteaucitronAllow");
984                    for (i = 0; i < allowBtnsInSite.length; i++) {
985                        tarteaucitron.addClickEventToElement(allowBtnsInSite[i], function () {
986                            if(this.closest('.tac_activate') !== null && this.closest('.tac_activate').parentNode !== null) {
987                                this.closest('.tac_activate').parentNode.setAttribute("tabindex", "-1");
988                                this.closest('.tac_activate').parentNode.focus();
989                            }
990                        });
991                    }
992
993                    var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
994                    for (i = 0; i < allowBtns.length; i++) {
995                        tarteaucitron.addClickEventToElement(allowBtns[i], function () {
996                            tarteaucitron.userInterface.respond(this, true);
997                        });
998                    }
999                    var denyBtns = document.getElementsByClassName("tarteaucitronDeny");
1000                    for (i = 0; i < denyBtns.length; i++) {
1001                        tarteaucitron.addClickEventToElement(denyBtns[i], function () {
1002                            tarteaucitron.userInterface.respond(this, false);
1003                        });
1004                    }
1005                    if(tarteaucitron.events.load) {
1006                        tarteaucitron.events.load();
1007                    }
1008                }, 500);
1009
1010            });
1011        });
1012    },
1013    "addService": function (serviceId) {
1014        "use strict";
1015        var html = '',
1016            s = tarteaucitron.services,
1017            service = s[serviceId],
1018            cookie = tarteaucitron.cookie.read(),
1019            hostname = document.location.hostname,
1020            hostRef = document.referrer.split('/')[2],
1021            isNavigating = (hostRef === hostname && window.location.href !== tarteaucitron.parameters.privacyUrl),
1022            isAutostart = (!service.needConsent),
1023            isWaiting = (cookie.indexOf(service.key + '=wait') >= 0),
1024            isDenied = (cookie.indexOf(service.key + '=false') >= 0),
1025            isAllowed = ((cookie.indexOf(service.key + '=true') >= 0) || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)),
1026            isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0),
1027            isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1"),
1028            currentStatus = (isAllowed) ? tarteaucitron.lang.allowed : tarteaucitron.lang.disallowed,
1029            state = (undefined !== service.defaultState) ? service.defaultState :
1030                    (undefined !== tarteaucitron.parameters.serviceDefaultState ? tarteaucitron.parameters.serviceDefaultState : 'wait');
1031
1032
1033        if (tarteaucitron.added[service.key] !== true) {
1034            tarteaucitron.added[service.key] = true;
1035
1036            html += '<li id="' + service.key + 'Line" class="tarteaucitronLine">';
1037            html += '   <div class="tarteaucitronName">';
1038            html += '       <span class="tarteaucitronH3" role="heading" aria-level="3">' + service.name + '</span>';
1039            html += '       <div class="tarteaucitronStatusInfo">';
1040            html += '          <span class="tacCurrentStatus" id="tacCurrentStatus' + service.key + '">'+currentStatus+'</span>';
1041            html += '          <span class="tarteaucitronReadmoreSeparator"> - </span>';
1042            html += '          <span id="tacCL' + service.key + '" class="tarteaucitronListCookies"></span>';
1043            html += '       </div>';
1044            if (tarteaucitron.parameters.moreInfoLink == true) {
1045
1046                var link = 'https://tarteaucitron.io/service/' + service.key + '/';
1047                if (service.readmoreLink !== undefined && service.readmoreLink !== '') {
1048                    link = service.readmoreLink;
1049                }
1050                if (tarteaucitron.parameters.readmoreLink !== undefined && tarteaucitron.parameters.readmoreLink !== '') {
1051                    link = tarteaucitron.parameters.readmoreLink;
1052                }
1053                html += '       <a href="' + link + '" target="_blank" rel="noreferrer noopener nofollow" title="' + tarteaucitron.lang.more + ' : '+ tarteaucitron.lang.cookieDetail + ' ' + service.name + ' ' + tarteaucitron.lang.ourSite + ' ' + tarteaucitron.lang.newWindow +'" class="tarteaucitronReadmoreInfo">' + tarteaucitron.lang.more + '</a>';
1054                html += '       <span class="tarteaucitronReadmoreSeparator"> - </span>';
1055                html += '       <a href="' + service.uri + '" target="_blank" rel="noreferrer noopener" title="' + tarteaucitron.lang.source + ' ' + service.name + ' ' + tarteaucitron.lang.newWindow + '" class="tarteaucitronReadmoreOfficial">' + tarteaucitron.lang.source + '</a>';
1056            }
1057
1058            html += '   </div>';
1059            html += '   <div class="tarteaucitronAsk">';
1060            html += '       <button type="button" aria-label="' + tarteaucitron.lang.allow + ' ' + service.name + '" id="' + service.key + 'Allowed" class="tarteaucitronAllow">';
1061            html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
1062            html += '       </button> ';
1063            html += '       <button type="button" aria-label="' + tarteaucitron.lang.deny + ' ' + service.name + '" id="' + service.key + 'Denied" class="tarteaucitronDeny">';
1064            html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
1065            html += '       </button>';
1066            html += '   </div>';
1067            html += '</li>';
1068
1069            tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block');
1070
1071            if (document.getElementById('tarteaucitronServices_' + service.type) !== null) {
1072                document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html;
1073            }
1074
1075            tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle', 'display', 'none');
1076
1077            tarteaucitron.userInterface.order(service.type);
1078
1079            tarteaucitron.addClickEventToId(service.key + 'Allowed', function () {
1080                tarteaucitron.userInterface.respond(this, true);
1081            });
1082
1083            tarteaucitron.addClickEventToId(service.key + 'Denied', function () {
1084                tarteaucitron.userInterface.respond(this, false);
1085            });
1086        }
1087
1088        tarteaucitron.pro('!' + service.key + '=' + isAllowed);
1089
1090        // allow by default for non EU
1091        if (isResponded === false && tarteaucitron.user.bypass === true) {
1092            isAllowed = true;
1093            tarteaucitron.cookie.create(service.key, true);
1094        }
1095
1096        if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !tarteaucitron.highPrivacy) || isAllowed) {
1097            if (!isAllowed || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)) {
1098                tarteaucitron.cookie.create(service.key, true);
1099            }
1100            if (tarteaucitron.launch[service.key] !== true) {
1101                tarteaucitron.launch[service.key] = true;
1102                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.js(); }
1103                tarteaucitron.sendEvent(service.key + '_loaded');
1104            }
1105            tarteaucitron.state[service.key] = true;
1106            tarteaucitron.userInterface.color(service.key, true);
1107        } else if (isDenied) {
1108            if (typeof service.fallback === 'function') {
1109                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
1110            }
1111            tarteaucitron.state[service.key] = false;
1112            tarteaucitron.userInterface.color(service.key, false);
1113        } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) {
1114            tarteaucitron.cookie.create(service.key, 'false');
1115            if (typeof service.fallback === 'function') {
1116                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
1117            }
1118            tarteaucitron.state[service.key] = false;
1119            tarteaucitron.userInterface.color(service.key, false);
1120        } else if (!isResponded) {
1121            tarteaucitron.cookie.create(service.key, state);
1122            if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) {
1123                if(true === state && typeof service.js === 'function') {
1124                    service.js();
1125                    tarteaucitron.sendEvent(key + '_loaded');
1126                } else if (typeof service.fallback === 'function') {
1127                    service.fallback();
1128                }
1129            }
1130
1131            tarteaucitron.userInterface.color(service.key, state);
1132
1133            if( 'wait' === state ) {
1134                tarteaucitron.userInterface.openAlert();
1135            }
1136        }
1137
1138        tarteaucitron.cookie.checkCount(service.key);
1139        tarteaucitron.sendEvent(service.key + '_added');
1140    },
1141    "sendEvent" : function(event_key) {
1142        if(event_key !== undefined) {
1143            //ie compatibility
1144            var send_event_item;
1145            if(typeof(Event) === 'function') {
1146                send_event_item = new Event(event_key);
1147            }else if (typeof(document.createEvent) === 'function'){
1148                send_event_item = document.createEvent('Event');
1149                send_event_item.initEvent(event_key, true, true);
1150            }
1151            //end ie compatibility
1152
1153            document.dispatchEvent(send_event_item);
1154        }
1155    },
1156    "cleanArray": function cleanArray(arr) {
1157        "use strict";
1158        var i,
1159            len = arr.length,
1160            out = [],
1161            obj = {},
1162            s = tarteaucitron.services;
1163
1164        for (i = 0; i < len; i += 1) {
1165            if (!obj[arr[i]]) {
1166                obj[arr[i]] = {};
1167                if (tarteaucitron.services[arr[i]] !== undefined) {
1168                    out.push(arr[i]);
1169                }
1170            }
1171        }
1172
1173        out = out.sort(function (a, b) {
1174            if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }
1175            if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; }
1176            return 0;
1177        });
1178
1179        return out;
1180    },
1181    "setConsent": function (id, status) {
1182        if (status === true) {
1183            tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true);
1184        } else if (status === false) {
1185            tarteaucitron.userInterface.respond(document.getElementById(id + 'Denied'), false);
1186        }
1187    },
1188    "userInterface": {
1189        "css": function (id, property, value) {
1190            "use strict";
1191            if (document.getElementById(id) !== null) {
1192
1193                if (property == "display" && value == "none" && (id == "tarteaucitron" || id == "tarteaucitronBack" || id == "tarteaucitronAlertBig")) {
1194                    document.getElementById(id).style["opacity"] = "0";
1195
1196                    /*setTimeout(function() {*/document.getElementById(id).style[property] = value;/*}, 200);*/
1197                } else {
1198
1199                    document.getElementById(id).style[property] = value;
1200
1201                    if (property == "display" && value == "block" && (id == "tarteaucitron" || id == "tarteaucitronAlertBig")) {
1202                        document.getElementById(id).style["opacity"] = "1";
1203                    }
1204
1205                    if (property == "display" && value == "block" && id == "tarteaucitronBack") {
1206                        document.getElementById(id).style["opacity"] = "0.7";
1207                    }
1208
1209                    if (property == "display" && value == "block" && id == "tarteaucitronAlertBig" && (tarteaucitron.parameters.orientation == "middle"|| tarteaucitron.parameters.orientation == "popup")) {
1210                        tarteaucitron.userInterface.focusTrap('tarteaucitronAlertBig');
1211                    }
1212                }
1213            }
1214        },
1215        "addClass": function (id, className) {
1216            "use strict";
1217            if (document.getElementById(id) !== null && document.getElementById(id).classList !== undefined) {
1218                document.getElementById(id).classList.add(className);
1219            }
1220        },
1221        "removeClass": function (id, className) {
1222            "use strict";
1223            if (document.getElementById(id) !== null && document.getElementById(id).classList !== undefined) {
1224                document.getElementById(id).classList.remove(className);
1225            }
1226        },
1227        "respondAll": function (status, type, allowSafeAnalytics) {
1228            "use strict";
1229            var s = tarteaucitron.services,
1230                service,
1231                key,
1232                index = 0;
1233
1234            for (index = 0; index < tarteaucitron.job.length; index += 1) {
1235
1236                if (typeof type !== 'undefined' && type !== '' && s[tarteaucitron.job[index]].type !== type) {
1237                    continue;
1238                }
1239
1240                if (allowSafeAnalytics && typeof s[tarteaucitron.job[index]].safeanalytic !== "undefined" && s[tarteaucitron.job[index]].safeanalytic === true) {
1241                    continue;
1242                }
1243
1244                service = s[tarteaucitron.job[index]];
1245                key = service.key;
1246                if (tarteaucitron.state[key] !== status) {
1247                    if (status === false && tarteaucitron.launch[key] === true) {
1248                        tarteaucitron.reloadThePage = true;
1249                        if (tarteaucitron.checkIfExist('tarteaucitronClosePanel')) {
1250                            var ariaCloseValue = document.getElementById('tarteaucitronClosePanel').textContent.trim() + ' (' + tarteaucitron.lang.reload + ')';
1251                            document.getElementById('tarteaucitronClosePanel').setAttribute("aria-label", ariaCloseValue);
1252                            document.getElementById('tarteaucitronClosePanel').setAttribute("title", ariaCloseValue);
1253                        }
1254                    }
1255                    if (tarteaucitron.launch[key] !== true && status === true) {
1256
1257                        tarteaucitron.pro('!' + key + '=engage');
1258
1259                        tarteaucitron.launch[key] = true;
1260                        if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
1261                        tarteaucitron.sendEvent(key + '_loaded');
1262                    }
1263                    var itemStatusElem = document.getElementById('tacCurrentStatus'+key);
1264                    tarteaucitron.state[key] = status;
1265                    tarteaucitron.cookie.create(key, status);
1266                    tarteaucitron.userInterface.color(key, status);
1267                    if (status == true) {
1268                        itemStatusElem.innerHTML = tarteaucitron.lang.allowed;
1269                        tarteaucitron.sendEvent(key + '_allowed');
1270                    } else {
1271                        itemStatusElem.innerHTML = tarteaucitron.lang.disallowed;
1272                        tarteaucitron.sendEvent(key + '_disallowed');
1273                    }
1274                }
1275            }
1276        },
1277        "respond": function (el, status) {
1278            "use strict";
1279            if (el.id === '') {
1280                return;
1281            }
1282            var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), '');
1283
1284            if (key.substring(0, 13) === 'tarteaucitron' || key === '') {return;}
1285
1286            // return if same state
1287            if (tarteaucitron.state[key] === status) {
1288                return;
1289            }
1290
1291            if (status === false && tarteaucitron.launch[key] === true) {
1292                tarteaucitron.reloadThePage = true;
1293                if (tarteaucitron.checkIfExist('tarteaucitronClosePanel')) {
1294                    var ariaCloseValue = document.getElementById('tarteaucitronClosePanel').textContent.trim() + ' (' + tarteaucitron.lang.reload + ')';
1295                    document.getElementById('tarteaucitronClosePanel').setAttribute("aria-label", ariaCloseValue);
1296                    document.getElementById('tarteaucitronClosePanel').setAttribute("title", ariaCloseValue);
1297                }
1298            }
1299
1300            // if not already launched... launch the service
1301            if (status === true) {
1302                if (tarteaucitron.launch[key] !== true) {
1303
1304                    tarteaucitron.pro('!' + key + '=engage');
1305
1306                    tarteaucitron.launch[key] = true;
1307                    if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
1308                    tarteaucitron.sendEvent(key + '_loaded');
1309                }
1310            }
1311            var itemStatusElem = document.getElementById('tacCurrentStatus'+key);
1312            tarteaucitron.state[key] = status;
1313            tarteaucitron.cookie.create(key, status);
1314            tarteaucitron.userInterface.color(key, status);
1315            if (status == true) {
1316                itemStatusElem.innerHTML = tarteaucitron.lang.allowed;
1317                tarteaucitron.sendEvent(key + '_allowed');
1318            } else {
1319                itemStatusElem.innerHTML = tarteaucitron.lang.disallowed;
1320                tarteaucitron.sendEvent(key + '_disallowed');
1321            }
1322        },
1323        "color": function (key, status) {
1324            "use strict";
1325            var c = 'tarteaucitron',
1326                nbDenied = 0,
1327                nbPending = 0,
1328                nbAllowed = 0,
1329                sum = tarteaucitron.job.length,
1330                index,
1331                s = tarteaucitron.services;
1332
1333            if (key !== "") {
1334
1335            if (status === true) {
1336                tarteaucitron.userInterface.addClass(key + 'Line', 'tarteaucitronIsAllowed');
1337                tarteaucitron.userInterface.removeClass(key + 'Line', 'tarteaucitronIsDenied');
1338                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'true');
1339                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'false');
1340            } else if (status === false) {
1341                tarteaucitron.userInterface.removeClass(key + 'Line', 'tarteaucitronIsAllowed');
1342                tarteaucitron.userInterface.addClass(key + 'Line', 'tarteaucitronIsDenied');
1343                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'false');
1344                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'true');
1345            } else {
1346                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'false');
1347                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'false');
1348            }
1349
1350            // check if all services are allowed
1351            var sumToRemove = 0;
1352            for (index = 0; index < sum; index += 1) {
1353
1354                if (typeof s[tarteaucitron.job[index]].safeanalytic !== "undefined" && s[tarteaucitron.job[index]].safeanalytic === true) {
1355                    sumToRemove += 1;
1356                    continue;
1357                }
1358
1359                if (tarteaucitron.state[tarteaucitron.job[index]] === false) {
1360                    nbDenied += 1;
1361                } else if (tarteaucitron.state[tarteaucitron.job[index]] === undefined) {
1362                    nbPending += 1;
1363                } else if (tarteaucitron.state[tarteaucitron.job[index]] === true) {
1364                    nbAllowed += 1;
1365                }
1366            }
1367            sum -= sumToRemove;
1368
1369            tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%');
1370            tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%');
1371            tarteaucitron.userInterface.css(c + 'DotRed', 'width', ((100 / sum) * nbDenied) + '%');
1372
1373            if (nbDenied === 0 && nbPending === 0) {
1374                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
1375                tarteaucitron.userInterface.addClass(c + 'AllAllowed', c + 'IsSelected');
1376
1377                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsAllowed');
1378                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
1379
1380                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'false');
1381                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'true');
1382
1383            } else if (nbAllowed === 0 && nbPending === 0) {
1384                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
1385                tarteaucitron.userInterface.addClass(c + 'AllDenied', c + 'IsSelected');
1386
1387                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
1388                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsDenied');
1389
1390                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'true');
1391                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'false');
1392
1393            } else {
1394                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
1395                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
1396
1397                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
1398                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
1399
1400                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'false');
1401                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'false');
1402            }
1403
1404            // close the alert if all service have been reviewed
1405            if (nbPending === 0) {
1406                tarteaucitron.userInterface.closeAlert();
1407            }
1408
1409            if (tarteaucitron.services[key].cookies.length > 0 && status === false) {
1410                tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies);
1411            }
1412
1413            if (status === true) {
1414                if (document.getElementById('tacCL' + key) !== null) {
1415                    document.getElementById('tacCL' + key).innerHTML = '...';
1416                }
1417                setTimeout(function () {
1418                    tarteaucitron.cookie.checkCount(key);
1419                }, 2500);
1420            } else {
1421                tarteaucitron.cookie.checkCount(key);
1422            }
1423
1424            }
1425
1426	    // groups
1427            var cats = document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]')
1428            Array.prototype.forEach.call(cats, function(item) {
1429                var cat = item.getAttribute('id').replace(/^(tarteaucitronServicesTitle_)/, ""),
1430                    total = document.getElementById("tarteaucitronServices_"+cat).childElementCount;
1431                var doc = document.getElementById("tarteaucitronServices_"+cat),
1432                    groupdenied = 0,
1433                    groupallowed = 0;
1434                for (var ii = 0; ii < doc.children.length; ii++) {
1435                    if (doc.children[ii].className == "tarteaucitronLine tarteaucitronIsDenied") {
1436                        groupdenied++;
1437                    }
1438                    if (doc.children[ii].className == "tarteaucitronLine tarteaucitronIsAllowed") {
1439                        groupallowed++;
1440                    }
1441                }
1442                if (total === groupallowed) {
1443                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1444                    tarteaucitron.userInterface.addClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1445
1446                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1447                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'false');
1448                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'true');
1449                    }
1450                }
1451                if (total === groupdenied) {
1452                    tarteaucitron.userInterface.addClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1453                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1454
1455                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1456                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'true');
1457                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'false');
1458                    }
1459                }
1460                if (total !== groupdenied && total !== groupallowed) {
1461                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1462                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1463
1464                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1465                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'false');
1466                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'false');
1467                    }
1468                }
1469                groupdenied = 0;
1470                groupallowed = 0;
1471            });
1472
1473        },
1474        "openPanel": function () {
1475            "use strict";
1476
1477            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block');
1478            tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1479            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1480
1481            document.getElementById('tarteaucitronClosePanel').focus();
1482            if (document.getElementsByTagName('body')[0].classList !== undefined) {
1483                document.getElementsByTagName('body')[0].classList.add('tarteaucitron-modal-open');
1484            }
1485            tarteaucitron.userInterface.focusTrap('tarteaucitron');
1486            tarteaucitron.userInterface.jsSizing('main');
1487
1488            //ie compatibility
1489            var tacOpenPanelEvent;
1490            if(typeof(Event) === 'function') {
1491                tacOpenPanelEvent = new Event("tac.open_panel");
1492            }else if (typeof(document.createEvent) === 'function'){
1493                tacOpenPanelEvent = document.createEvent('Event');
1494                tacOpenPanelEvent.initEvent("tac.open_panel", true, true);
1495            }
1496            //end ie compatibility
1497
1498            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacOpenPanelEvent);}
1499        },
1500        "closePanel": function () {
1501            "use strict";
1502
1503            if (document.location.hash === tarteaucitron.hashtag) {
1504                if (window.history) {
1505                    window.history.replaceState('', document.title, window.location.pathname + window.location.search);
1506                } else {
1507                    document.location.hash = '';
1508                }
1509            }
1510            if (tarteaucitron.checkIfExist('tarteaucitron')) {
1511                // accessibility: manage focus on close panel
1512                if (tarteaucitron.checkIfExist('tarteaucitronCloseAlert')) {
1513                    document.getElementById('tarteaucitronCloseAlert').focus();
1514                } else if (tarteaucitron.checkIfExist('tarteaucitronManager')) {
1515                    document.getElementById('tarteaucitronManager').focus();
1516                } else if (tarteaucitron.customCloserId && tarteaucitron.checkIfExist(tarteaucitron.customCloserId)) {
1517                    document.getElementById(tarteaucitron.customCloserId).focus();
1518                }
1519                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1520            }
1521
1522            if (tarteaucitron.checkIfExist('tarteaucitronCookiesListContainer') && tarteaucitron.checkIfExist('tarteaucitronCookiesNumber')) {
1523                // accessibility: manage focus on close cookies list
1524                document.getElementById('tarteaucitronCookiesNumber').focus();
1525                document.getElementById('tarteaucitronCookiesNumber').setAttribute("aria-expanded", "false");
1526                tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1527            }
1528
1529            tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1530                elem.style.display = 'none';
1531            }, true);
1532
1533            if (tarteaucitron.reloadThePage === true) {
1534                window.location.reload();
1535            } else {
1536                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1537            }
1538            if (document.getElementsByTagName('body')[0].classList !== undefined) {
1539                document.getElementsByTagName('body')[0].classList.remove('tarteaucitron-modal-open');
1540            }
1541
1542            //ie compatibility
1543            var tacClosePanelEvent;
1544            if(typeof(Event) === 'function') {
1545                tacClosePanelEvent = new Event("tac.close_panel");
1546            }else if (typeof(document.createEvent) === 'function'){
1547                tacClosePanelEvent = document.createEvent('Event');
1548                tacClosePanelEvent.initEvent("tac.close_panel", true, true);
1549            }
1550            //end ie compatibility
1551
1552            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacClosePanelEvent);}
1553        },
1554        "focusTrap": function(parentElement) {
1555            "use strict";
1556
1557            var focusableEls,
1558                firstFocusableEl,
1559                lastFocusableEl,
1560                filtered;
1561
1562            focusableEls = document.getElementById(parentElement).querySelectorAll('a[href], button');
1563            filtered = [];
1564
1565            // get only visible items
1566            for (var i = 0, max = focusableEls.length; i < max; i++) {
1567                if (focusableEls[i].offsetHeight > 0) {
1568                   filtered.push(focusableEls[i]);
1569                }
1570            }
1571
1572            firstFocusableEl = filtered[0];
1573            lastFocusableEl = filtered[filtered.length - 1];
1574
1575            //loop focus inside tarteaucitron
1576            document.getElementById(parentElement).addEventListener("keydown", function (evt) {
1577
1578                if ( evt.key === 'Tab' || evt.keyCode === 9 ) {
1579
1580                    if ( evt.shiftKey ) /* shift + tab */ {
1581                        if (document.activeElement === firstFocusableEl) {
1582                            lastFocusableEl.focus();
1583                            evt.preventDefault();
1584                        }
1585                    } else /* tab */ {
1586                        if (document.activeElement === lastFocusableEl) {
1587                            firstFocusableEl.focus();
1588                            evt.preventDefault();
1589                        }
1590                    }
1591                }
1592            })
1593        },
1594        "openAlert": function () {
1595            "use strict";
1596            var c = 'tarteaucitron';
1597            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block');
1598            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none');
1599            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'none');
1600            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'block');
1601            tarteaucitron.userInterface.addClass(c + 'Root',   'tarteaucitronBeforeVisible');
1602
1603            //ie compatibility
1604            var tacOpenAlertEvent;
1605            if(typeof(Event) === 'function') {
1606                tacOpenAlertEvent = new Event("tac.open_alert");
1607            }else if (typeof(document.createEvent) === 'function'){
1608                tacOpenAlertEvent = document.createEvent('Event');
1609                tacOpenAlertEvent.initEvent("tac.open_alert", true, true);
1610            }
1611            //end ie compatibility
1612
1613            if (document.getElementById('tarteaucitronAlertBig') !== null && tarteaucitron.parameters.orientation === 'middle') {
1614                document.getElementById('tarteaucitronAlertBig').focus();
1615            }
1616
1617            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacOpenAlertEvent);}
1618        },
1619        "closeAlert": function () {
1620            "use strict";
1621            var c = 'tarteaucitron';
1622            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none');
1623            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
1624            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'block');
1625            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'none');
1626            tarteaucitron.userInterface.removeClass(c + 'Root',   'tarteaucitronBeforeVisible');
1627            tarteaucitron.userInterface.jsSizing('box');
1628
1629            //ie compatibility
1630            var tacCloseAlertEvent;
1631            if(typeof(Event) === 'function') {
1632                tacCloseAlertEvent = new Event("tac.close_alert");
1633            }else if (typeof(document.createEvent) === 'function'){
1634                tacCloseAlertEvent = document.createEvent('Event');
1635                tacCloseAlertEvent.initEvent("tac.close_alert", true, true);
1636            }
1637            //end ie compatibility
1638
1639            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacCloseAlertEvent);}
1640        },
1641        "toggleCookiesList": function () {
1642            "use strict";
1643            var div = document.getElementById('tarteaucitronCookiesListContainer'),
1644                togglediv = document.getElementById('tarteaucitronCookiesNumber');
1645
1646            if (div === null) {
1647                return;
1648            }
1649
1650            if (div.style.display !== 'block') {
1651                tarteaucitron.cookie.number();
1652                div.style.display = 'block';
1653                togglediv.setAttribute("aria-expanded", "true");
1654                tarteaucitron.userInterface.jsSizing('cookie');
1655                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1656                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1657                tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1658                    elem.style.display = 'none';
1659                }, true);
1660            } else {
1661                div.style.display = 'none';
1662                togglediv.setAttribute("aria-expanded", "false");
1663                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1664                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1665            }
1666        },
1667        "toggle": function (id, closeClass) {
1668            "use strict";
1669            var div = document.getElementById(id);
1670
1671            if (div === null) {
1672                return;
1673            }
1674
1675            if (closeClass !== undefined) {
1676                tarteaucitron.fallback([closeClass], function (elem) {
1677                    if (elem.id !== id) {
1678                        elem.style.display = 'none';
1679                    }
1680                }, true);
1681            }
1682
1683            if (div.style.display !== 'block') {
1684                div.style.display = 'block';
1685            } else {
1686                div.style.display = 'none';
1687            }
1688        },
1689        "order": function (id) {
1690            "use strict";
1691            var main = document.getElementById('tarteaucitronServices_' + id),
1692                allDivs,
1693                store = [],
1694                i;
1695
1696            if (main === null) {
1697                return;
1698            }
1699
1700            allDivs = main.childNodes;
1701
1702            if (typeof Array.prototype.map === 'function' && typeof Enumerable === 'undefined') {
1703                Array.prototype.map.call(main.children, Object).sort(function (a, b) {
1704                //var mainChildren = Array.from(main.children);
1705                //mainChildren.sort(function (a, b) {
1706                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
1707                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
1708                    return 0;
1709                }
1709).forEach(function (element) {
1710                    main.appendChild(element);
1711                });
1712            }
1713        },
1714        "jsSizing": function (type) {
1715            "use strict";
1716            var scrollbarMarginRight = 10,
1717                scrollbarWidthParent,
1718                scrollbarWidthChild,
1719                servicesHeight,
1720                e = window,
1721                a = 'inner',
1722                windowInnerHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
1723                mainTop,
1724                mainHeight,
1725                closeButtonHeight,
1726                headerHeight,
1727                cookiesListHeight,
1728                cookiesCloseHeight,
1729                cookiesTitleHeight,
1730                paddingBox,
1731                alertSmallHeight,
1732                cookiesNumberHeight;
1733
1734            if (type === 'box') {
1735                if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) {
1736
1737                    // reset
1738                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', '0px 10px');
1739
1740                    // calculate
1741                    alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight;
1742                    cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight;
1743                    paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2;
1744
1745                    // apply
1746                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px');
1747                }
1748            } else if (type === 'main') {
1749
1750                // get the real window width for media query
1751                if (window.innerWidth === undefined) {
1752                    a = 'client';
1753                    e = document.documentElement || document.body;
1754                }
1755
1756                // height of the services list container
1757                if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) {
1758
1759                    // reset
1760                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto');
1761
1762                    // calculate
1763                    mainHeight = document.getElementById('tarteaucitron').offsetHeight;
1764                    closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight;
1765
1766                    // apply
1767                    servicesHeight = (mainHeight - closeButtonHeight + 2);
1768                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px');
1769                    tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto');
1770                }
1771
1772                // align the main allow/deny button depending on scrollbar width
1773                if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
1774
1775                    // media query
1776                    if (e[a + 'Width'] <= 479) {
1777                        //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px');
1778                    } else if (e[a + 'Width'] <= 767) {
1779                        scrollbarMarginRight = 12;
1780                    }
1781
1782                    scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth;
1783                    scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth;
1784                    //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px');
1785                }
1786
1787                // center the main panel
1788                if (document.getElementById('tarteaucitron') !== null) {
1789
1790                    // media query
1791                    if (e[a + 'Width'] <= 767) {
1792                        mainTop = 0;
1793                    } else {
1794                        mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
1795                    }
1796
1797                    if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
1798                        if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
1799                            mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
1800                        }
1801                    }
1802
1803                    // correct
1804                    if (mainTop < 0) {
1805                        mainTop = 0;
1806                    }
1807
1808                    // apply
1809                    tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
1810                }
1811
1812
1813            } else if (type === 'cookie') {
1814
1815                // put cookies list at bottom
1816                if (document.getElementById('tarteaucitronAlertSmall') !== null) {
1817                    tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px');
1818                }
1819
1820                // height of cookies list
1821                if (document.getElementById('tarteaucitronCookiesListContainer') !== null) {
1822
1823                    // reset
1824                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', 'auto');
1825
1826                    // calculate
1827                    cookiesListHeight = document.getElementById('tarteaucitronCookiesListContainer').offsetHeight;
1828                    cookiesCloseHeight = document.getElementById('tarteaucitronClosePanelCookie').offsetHeight;
1829                    cookiesTitleHeight = document.getElementById('tarteaucitronCookiesTitle').offsetHeight;
1830
1831                    // apply
1832                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', (cookie
vendor: 15,362 bytes, lines 1832-2171
1832sListHeight - cookiesCloseHeight - cookiesTitleHeight - 2) + 'px');
1833                }
1834            }
1835        }
1836    },
1837    "cookie": {
1838        "owner": {},
1839        "create": function (key, status) {
1840            "use strict";
1841
1842            if (tarteaucitronForceExpire !== '') {
1843                // The number of day(s)/hour(s) can't be higher than 1 year
1844                if ((tarteaucitronExpireInDay && tarteaucitronForceExpire < 365) || (!tarteaucitronExpireInDay && tarteaucitronForceExpire < 8760)) {
1845                    if (tarteaucitronExpireInDay) {
1846                        // Multiplication to tranform the number of days to milliseconds
1847                        timeExpire = tarteaucitronForceExpire * 86400000;
1848                    } else {
1849                        // Multiplication to tranform the number of hours to milliseconds
1850                        timeExpire = tarteaucitronForceExpire * 3600000;
1851                    }
1852                }
1853            }
1854
1855            var d = new Date(),
1856                time = d.getTime(),
1857                expireTime = time + timeExpire, // 365 days
1858                regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
1859                cookie = tarteaucitron.cookie.read().replace(regex, ""),
1860                value = tarteaucitron.parameters.cookieName + '=' + cookie + '!' + key + '=' + status,
1861                domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? '; domain=' + tarteaucitron.parameters.cookieDomain : '',
1862                secure = location.protocol === 'https:' ? '; Secure' : '';
1863
1864            d.setTime(expireTime);
1865            document.cookie = value + '; expires=' + d.toGMTString() + '; path=/' + domain + secure + '; samesite=lax';
1866
1867            tarteaucitron.sendEvent('tac.consent_updated');
1868        },
1869        "read": function () {
1870            "use strict";
1871            var nameEQ = tarteaucitron.parameters.cookieName + "=",
1872                ca = document.cookie.split(';'),
1873                i,
1874                c;
1875
1876            for (i = 0; i < ca.length; i += 1) {
1877                c = ca[i];
1878                while (c.charAt(0) === ' ') {
1879                    c = c.substring(1, c.length);
1880                }
1881                if (c.indexOf(nameEQ) === 0) {
1882                    return c.substring(nameEQ.length, c.length);
1883                }
1884            }
1885            return '';
1886        },
1887        "purge": function (arr) {
1888            "use strict";
1889            var i;
1890
1891            for (i = 0; i < arr.length; i += 1) {
1892
1893                var rgxpCookie = new RegExp("^(.*;)?\\s*" + arr[i] + "\\s*=\\s*[^;]+(.*)?$");
1894                if (document.cookie.match(rgxpCookie)) {
1895                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
1896                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
1897                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
1898                }
1899            }
1900        },
1901        "checkCount": function (key) {
1902            "use strict";
1903            var arr = tarteaucitron.services[key].cookies,
1904                nb = arr.length,
1905                nbCurrent = 0,
1906                html = '',
1907                i,
1908                status = document.cookie.indexOf(key + '=true');
1909
1910            if (status >= 0 && nb === 0) {
1911                html += tarteaucitron.lang.useNoCookie;
1912            } else if (status >= 0) {
1913                for (i = 0; i < nb; i += 1) {
1914                    if (document.cookie.indexOf(arr[i] + '=') !== -1) {
1915                        nbCurrent += 1;
1916                        if (tarteaucitron.cookie.owner[arr[i]] === undefined) {
1917                            tarteaucitron.cookie.owner[arr[i]] = [];
1918                        }
1919                        if (tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]], tarteaucitron.services[key].name) === false) {
1920                            tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name);
1921                        }
1922                    }
1923                }
1924
1925                if (nbCurrent > 0) {
1926                    html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' cookie';
1927                    if (nbCurrent > 1) {
1928                        html += 's';
1929                    }
1930                    html += '.';
1931                } else {
1932                    html += tarteaucitron.lang.useNoCookie;
1933                }
1934            } else if (nb === 0) {
1935                html = tarteaucitron.lang.noCookie;
1936            } else {
1937                html += tarteaucitron.lang.useCookie + ' ' + nb + ' cookie';
1938                if (nb > 1) {
1939                    html += 's';
1940                }
1941                html += '.';
1942            }
1943
1944            if (document.getElementById('tacCL' + key) !== null) {
1945                document.getElementById('tacCL' + key).innerHTML = html;
1946            }
1947        },
1948        "crossIndexOf": function (arr, match) {
1949            "use strict";
1950            var i;
1951            for (i = 0; i < arr.length; i += 1) {
1952                if (arr[i] === match) {
1953                    return true;
1954                }
1955            }
1956            return false;
1957        },
1958        "number": function () {
1959            "use strict";
1960            var cookies = document.cookie.split(';'),
1961                nb = (document.cookie !== '') ? cookies.length : 0,
1962                html = '',
1963                i,
1964                name,
1965                namea,
1966                nameb,
1967                c,
1968                d,
1969                s = (nb > 1) ? 's' : '',
1970                savedname,
1971                regex = /^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,
1972                regexedDomain = (tarteaucitron.cdn.match(regex) !== null) ? tarteaucitron.cdn.match(regex)[1] : tarteaucitron.cdn,
1973                host = (tarteaucitron.domain !== undefined) ? tarteaucitron.domain : regexedDomain;
1974
1975            cookies = cookies.sort(function (a, b) {
1976                namea = a.split('=', 1).toString().replace(/ /g, '');
1977                nameb = b.split('=', 1).toString().replace(/ /g, '');
1978                c = (tarteaucitron.cookie.owner[namea] !== undefined) ? tarteaucitron.cookie.owner[namea] : '0';
1979                d = (tarteaucitron.cookie.owner[nameb] !== undefined) ? tarteaucitron.cookie.owner[nameb] : '0';
1980                if (c + a > d + b) { return 1; }
1981                if (c + a < d + b) { return -1; }
1982                return 0;
1983            });
1984
1985            if (document.cookie !== '') {
1986                for (i = 0; i < nb; i += 1) {
1987                    name = cookies[i].split('=', 1).toString().replace(/ /g, '');
1988                    if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) {
1989                        savedname = tarteaucitron.cookie.owner[name].join(' // ');
1990                        html += '<div class="tarteaucitronHidden">';
1991                        html += '     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';
1992                        html += '        ' + tarteaucitron.cookie.owner[name].join(' // ');
1993                        html += '    </span>';
1994                        html += '</div><ul class="cookie-list">';
1995                    } else if (tarteaucitron.cookie.owner[name] === undefined && host !== savedname) {
1996                        savedname = host;
1997                        html += '<div class="tarteaucitronHidden">';
1998                        html += '     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';
1999                        html += '        ' + host;
2000                        html += '    </span>';
2001                        html += '</div><ul class="cookie-list">';
2002                    }
2003                    html += '<li class="tarteaucitronCookiesListMain">';
2004                    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>';
2005                    html += '    </div>';
2006                    html += '    <div class="tarteaucitronCookiesListRight">' + tarteaucitron.fixSelfXSS(cookies[i].split('=').slice(1).join('=')) + '</div>';
2007                    html += '</li>';
2008                }
2009                html += '</ul>';
2010            } else {
2011                html += '<div class="tarteaucitronCookiesListMain">';
2012                html += '    <div class="tarteaucitronCookiesListLeft"><strong>-</strong></div>';
2013                html += '    <div class="tarteaucitronCookiesListRight"></div>';
2014                html += '</div>';
2015            }
2016
2017            html += '<div class="tarteaucitronHidden tarteaucitron-spacer-20"></div>';
2018
2019            if (document.getElementById('tarteaucitronCookiesList') !== null) {
2020                document.getElementById('tarteaucitronCookiesList').innerHTML = html;
2021            }
2022
2023            if (document.getElementById('tarteaucitronCookiesNumber') !== null) {
2024                document.getElementById('tarteaucitronCookiesNumber').innerHTML = nb;
2025                document.getElementById('tarteaucitronCookiesNumber').setAttribute("aria-label", nb + ' cookie' + s + " - " + tarteaucitron.lang.toggleInfoBox);
2026                document.getElementById('tarteaucitronCookiesNumber').setAttribute("title", nb + ' cookie' + s + " - " + tarteaucitron.lang.toggleInfoBox);
2027            }
2028
2029            if (document.getElementById('tarteaucitronCookiesNumberBis') !== null) {
2030                document.getElementById('tarteaucitronCookiesNumberBis').innerHTML = nb + ' cookie' + s;
2031            }
2032
2033            var purgeBtns = document.getElementsByClassName("purgeBtn");
2034            for (i = 0; i < purgeBtns.length; i++) {
2035                tarteaucitron.addClickEventToElement(purgeBtns[i], function () {
2036                    tarteaucitron.cookie.purge([this.dataset.cookie]);
2037                    tarteaucitron.cookie.number();
2038                    tarteaucitron.userInterface.jsSizing('cookie');
2039                    return false;
2040                });
2041            }
2042
2043            for (i = 0; i < tarteaucitron.job.length; i += 1) {
2044                tarteaucitron.cookie.checkCount(tarteaucitron.job[i]);
2045            }
2046        }
2047    },
2048    "fixSelfXSS": function(html) {
2049        return html.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
2050    },
2051    "getLanguage": function () {
2052        "use strict";
2053
2054        var availableLanguages = 'ar,bg,ca,cn,cs,da,de,et,el,en,es,fi,fr,hu,it,ja,lb,lt,lv,nl,no,oc,pl,pt,ro,ru,se,sk,sv,tr,uk,vi,zh',
2055            defaultLanguage = 'en';
2056
2057        if (tarteaucitronForceLanguage !== '') {
2058            if (availableLanguages.indexOf(tarteaucitronForceLanguage) !== -1) {
2059                return tarteaucitronForceLanguage;
2060            }
2061        }
2062
2063        // get the html lang
2064        if (availableLanguages.indexOf(document.documentElement.getAttribute("lang").substr(0, 2)) !== -1) {
2065          return document.documentElement.getAttribute("lang").substr(0, 2);
2066        }
2067
2068        if (!navigator) { return defaultLanguage; }
2069
2070        var lang = navigator.language || navigator.browserLanguage ||
2071                navigator.systemLanguage || navigator.userLang || null,
2072            userLanguage = lang ? lang.substr(0, 2) : null;
2073
2074        if (availableLanguages.indexOf(userLanguage) !== -1) {
2075            return userLanguage;
2076        }
2077
2078        return defaultLanguage;
2079    },
2080    "getLocale": function () {
2081        "use strict";
2082        if (!navigator) { return 'en_US'; }
2083
2084        var lang = navigator.language || navigator.browserLanguage ||
2085                navigator.systemLanguage || navigator.userLang || null,
2086            userLanguage = lang ? lang.substr(0, 2) : null;
2087
2088        if (userLanguage === 'fr') {
2089            return 'fr_FR';
2090        } else if (userLanguage === 'en') {
2091            return 'en_US';
2092        } else if (userLanguage === 'de') {
2093            return 'de_DE';
2094        } else if (userLanguage === 'es') {
2095            return 'es_ES';
2096        } else if (userLanguage === 'it') {
2097            return 'it_IT';
2098        } else if (userLanguage === 'pt') {
2099            return 'pt_PT';
2100        } else if (userLanguage === 'nl') {
2101            return 'nl_NL';
2102        } else if (userLanguage === 'el') {
2103            return 'el_EL';
2104        } else {
2105            return 'en_US';
2106        }
2107    },
2108    "addScript": function (url, id, callback, execute, attrName, attrVal, internal) {
2109        "use strict";
2110        var script,
2111            done = false;
2112
2113        if (execute === false) {
2114            if (typeof callback === 'function') {
2115                callback();
2116            }
2117        } else {
2118            script = document.createElement('script');
2119            if (id !== undefined) {
2120                script.id = id;
2121            }
2122            script.async = true;
2123            script.src = url;
2124
2125            if (attrName !== undefined && attrVal !== undefined) {
2126                script.setAttribute(attrName, attrVal);
2127            }
2128
2129            if (typeof callback === 'function') {
2130                if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
2131                    script.onreadystatechange = script.onload = function () {
2132                        var state = script.readyState;
2133                        if (!done && (!state || /loaded|complete/.test(state))) {
2134                            done = true;
2135                            callback();
2136                        }
2137                    };
2138                } else {
2139                    callback();
2140                }
2141            }
2142
2143            if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
2144                document.getElementsByTagName('head')[0].appendChild(script);
2145            }
2146        }
2147    },
2148    "addInternalScript": function (url, id, callback, execute, attrName, attrVal) {
2149        tarteaucitron.addScript(url, id, callback, execute, attrName, attrVal, true);
2150    },
2151    "checkIfExist": function (elemId) {
2152        "use strict";
2153        return document.getElementById(elemId) !== null && document.getElementById(elemId).offsetWidth !== 0 && document.getElementById(elemId).offsetHeight !== 0;
2154    },
2155    "makeAsync": {
2156        "antiGhost": 0,
2157        "buffer": '',
2158        "init": function (url, id) {
2159            "use strict";
2160            var savedWrite = document.write,
2161                savedWriteln = document.writeln;
2162
2163            document.write = function (content) {
2164                tarteaucitron.makeAsync.buffer += content;
2165            };
2166            document.writeln = function (content) {
2167                tarteaucitron.makeAsync.buffer += content.concat("\n");
2168            };
2169
2170            setTimeout(function () {
2171                document.write = savedWrite;
2172                document.writeln = savedWriteln;
2173            }, 20000);
2174
2175            tarteaucitron.makeAsync.getAndParse(url, id);
2176        },
2177        "getAndParse": function (url, id) {
2178            "use strict";
2179            if (tarteaucitron.makeAsync.antiGhost > 9) {
2180                tarteaucitron.makeAsync.antiGhost = 0;
2181                return;
2182            }
2183            tarteaucitron.makeAsync.antiGhost += 1;
2184            tarteaucitron.addInternalScript(url, '', function () {
2185                if (document.getElementById(id) !== null) {
2186                    document.getElementById(id).innerHTML += "<span class='tarteaucitron-display-none'>&nbsp;</span>" + tarteaucitron.makeAsync.buffer;
2187                    tarteaucitron.makeAsync.buffer = '';
2188                    tarteaucitron.makeAsync.execJS(id);
2189                }
2190            });
2191        },
2192        "execJS": function (id) {
2193            /* not strict because third party scripts may have errors */
2194            var i,
2195                scripts,
2196                childId,
2197                type;
2198
2199            if (document.getElementById(id) === null) {
2200                return;
2201            }
2202
2203            scripts = document.getElementById(id).getElementsByTagName('script');
2204            for (i = 0; i < scripts.length; i += 1) {
2205                type = (scripts[i].getAttribute('type') !== null) ? scripts[i].getAttribute('type') : '';
2206                if (type === '') {
2207                    type = (scripts[i].getAttribute('language') !== null) ? scripts[i].getAttribute('language') : '';
2208                }
2209                if (scripts[i].getAttribute('src') !== null && scripts[i].getAttribute('src') !== '') {
2210                    childId = id + Math.floor(Math.random() * 99999999999);
2211                    document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
2212                    tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'), childId);
2213                } else if (type.indexOf('javascript') !== -1 || type === '') {
2214                    eval(scripts[i].innerHTML);
2215                }
2216            }
2217        }
2218    },
2219    "fallback": function (matchClass, content, noInner) {
2220        "use strict";
2221        var elems = document.getElementsByTagName('*'),
2222            i,
2223            index = 0;
2224
2225        for (i in elems) {
2226            if (elems[i] !== undefined) {
2227                for (index = 0; index < matchClass.length; index += 1) {
2228                    if ((' ' + elems[i].className + ' ')
2229                            .indexOf(' ' + matchClass[index] + ' ') > -1) {
2230                        if (typeof content === 'function') {
2231                            if (noInner === true) {
2232                                content(elems[i]);
2233                            } else {
2234                                elems[i].innerHTML = content(elems[i]);
2235                            }
2236                        } else {
2237                            elems[i].innerHTML = content;
2238                        }
2239                    }
2240                }
2241            }
2242        }
2243    },
2244    "engage": function (id) {
2245        "use strict";
2246        var html = '',
2247            r = Math.floor(Math.random() * 100000),
2248            engage = tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback;
2249
2250        if (tarteaucitron.lang['engage-' + id] !== undefined) {
2251            engage = tarteaucitron.lang['engage-' + id];
2252        }
2253
2254        html += '<div class="tac_activate tac_activate_' + id + '">';
2255        html += '   <div class="tac_float">';
2256        html += '      ' + engage;
2257        html += '      <button type="button" class="tarteaucitronAllow" id="Eng' + r + 'ed' + id + '">';
2258        html += '          <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
2259        html += '       </button>';
2260        html += '   </div>';
2261        html += '</div>';
2262
2263        return html;
2264    },
2265    "extend": function (a, b) {
2266        "use strict";
2267        var prop;
2268        for (prop in b) {
2269            if (b.hasOwnProperty(prop)) {
2270                a[prop] = b[prop];
2271            }
2272        }
2273    },
2274    "proTemp": '',
2275    "proTimer": function () {
2276        "use strict";
2277        setTimeout(tarteaucitron.proPing, (Math.floor(Math.random() * (1200 - 500 + 1)) + 500));
2278    },
2279    "pro": function (list) {
2280        "use strict";
2281        tarteaucitron.proTemp += list;
2282        clearTimeout(tarteaucitron.proTimer);
2283        tarteaucitron.proTimer = setTimeout(tarteaucitron.proPing, (Math.floor(Math.random() * (1200 - 500 + 1)) + 500));
2284    },
2285    "proPing": function () {
2286        "use strict";
2287        if (tarteaucitron.uuid !== '' && tarteaucitron.uuid !== undefined && tarteaucitron.proTemp !== '' && tarteaucitronStatsEnabled) {
2288            var div = document.getElementById('tarteaucitronPremium'),
2289                timestamp = new Date().getTime(),
2290                url = 'https://tarteaucitron.io/log/?';
2291
2292            if (div === null) {
2293                return;
2294            }
2295
2296            url += 'account=' + tarteaucitron.uuid + '&';
2297            url += 'domain=' + tarteaucitron.domain + '&';
2298            url += 'status=' + encodeURIComponent(tarteaucitron.proTemp) + '&';
2299            url += '_time=' + timestamp;
2300
2301            div.innerHTML = '<img src="' + url + '" class="tarteaucitron-display-none" alt="" />';
2302
2303            tarteaucitron.proTemp = '';
2304        }
2305
2306        tarteaucitron.cookie.number();
2307    },
2308    "AddOrUpdate" : function(source, custom){
2309        /**
2310         Utility function to Add or update the fields of obj1 with the ones in obj2
2311         */
2312        for(var key in custom){
2313            if(custom[key] instanceof Object){
2314                source[key] = tarteaucitron.AddOrUpdate(source[key], custom[key]);
2315            }else{
2316                source[key] = custom[key];
2317            }
2318        }
2319        return source;
2320    },
2321    "getElemWidth": function(elem) {
2322        return tarteaucitron.getElemAttr(elem, 'width') || elem.clientWidth;
2323    },
2324    "getElemHeight": function(elem) {
2325        return tarteaucitron.getElemAttr(elem, 'height') || elem.clientHeight;
2326    },
2327    "getElemAttr": function (elem, attr) {
2328        var attribute = elem.getAttribute('data-' + attr) || elem.getAttribute(attr);
2329
2330        if (typeof attribute === 'string') {
2331            return tarteaucitron.fixSelfXSS(attribute);
2332        }
2333
2334        return "";
2335    },
2336    "addClickEventToId": function (elemId, func) {
2337        tarteaucitron.addClickEventToElement(document.getElementById(elemId), func);
2338    },
2339    "addClickEventToElement": function (e, func) {
2340        if (e) {
2341            if (e.addEventListener) {
2342                e.addEventListener("click", func);
2343            } else {
2344                e.attachEvent("onclick", func);
2345            }
2346        }
2347    },
2348    "triggerJobsAfterAjaxCall": function() {
2349        tarteaucitron.job.forEach(function(e) { tarteaucitron.job.push(e) });
2350        var i;
2351        var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
2352        for (i = 0; i < allowBtns.length; i++) {
2353            tarteaucitron.addClickEventToElement(allowBtns[i], function () {
2354                tarteaucitron.userInterface.respond(this, true);
2355            });
2356        }
2357        var denyBtns = document.getElementsByClassName("tarteaucitronDeny");
2358        for (i = 0; i < denyBtns.length; i++) {
2359            tarteaucitron.addClickEventToElement(denyBtns[i], function () {
2360                tarteaucitron.userInterface.respond(this, false);
2361            });
2362        }
2363    }
2364};

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.