PageSourceSearch

https://www.certinomis.fr/wp-content/themes/storefront-child/js/tarteaucitron.js?ver=7.1.2

js certinomis.fr collected 2026-10-03 21:24:03 UTC 112,419 bytes, 2,107 lines download raw bytes

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

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.