PageSourceSearch

https://www.nodaiwa.com/js/libs/tarteaucitron/tarteaucitron.js?v=3

js nodaiwa.com collected 2026-10-04 02:55:02 UTC 129,290 bytes, 2,424 lines download raw bytes

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

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.