1var AccessConfig=(function(){'use strict ' 2var config={Setup:{id:'accessconfig',},Setting:{useExtendContrast:!0},BodyActive:{classSetting:'active'},Overlay:{classSetting:'overlay'},ModalButton:{id:'button'},ModalContainer:{classSetting:'modal',titleLang:{en:'Accessibility setting',fr:'Paramètres dâaccessibilité',},titleId:'title',titleClass:'title',},CloseButton:{id:'close',classSetting:'close',lang:{en:'close',fr:'fermer'},hiddenTextClass:'sr-only'},InlineContentContainer:{id:'inline-c'},FormFieldsetContent:{classSetting:'content'},FormFieldset:{classSetting:'fieldset'},LegendFieldset:{classSetting:'legend'},FormRadio:{classSetting:'radio'},ContrastFieldset:{id:'contrast'},ContrastLegend:{lang:{en:'Contrast',fr:'Contrastes'}},DefaultContrastCheckbox:{id:'default-contrast',value:'default-contrast',groupName:'contrast',lang:{en:'Default',fr:'Défaut'}},HighContrastCheckbox:{id:'high-contrast',value:'high-contrast',groupName:'contrast',lang:{en:'Reinforce',fr:'Renforcer'}},InvertContrastCheckbox:{id:'inv-contrast',value:'inv-contrast',groupName:'contrast',lang:{en:'Reverse',fr:'Inverser'}},DyslexiaFieldset:{id:'font'},DyslexiaLegend:{lang:{en:'Font (dyslexia)',fr:'Police (dyslexie)'}},DefaultFontCheckbox:{id:'default-font',value:'default-font',groupName:'font',lang:{en:'Default',fr:'Défaut'}},DyslexiaFontCheckbox:{id:'dys-font',value:'dys-font',groupName:'font',lang:{en:'Adapt',fr:'Adapter'}},LineSpacingFieldset:{id:'line-spacing'},LineSpacingLegend:{lang:{en:'Line spacing',fr:'Interlignage'}},DefaultLineSpacingCheckbox:{id:'default-spacing',value:'default-spacing',groupName:'line-spacing',lang:{en:'Default',fr:'Défaut'}},DyslexiaLineSpacingCheckbox:{id:'dys-spacing',value:'dys-spacing',groupName:'line-spacing',lang:{en:'Increase',fr:'Augmenter'}},JustificationFieldset:{id:'justification'},JustificationLegend:{lang:{en:'Justification',fr:'Justification'}},DefaultJustificationCheckbox:{id:'default-justification',value:'default-justification',groupName:'justification',lang:{en:'Default',fr:'Défaut'}},DyslexiaJustificationCheckbox:{id:'cancel-justification',value:'cancel-justification',groupName:'justification',lang:{en:'Remove',fr:'Supprimer'}},ImageReplacementFieldset:{id:'image'},ImageReplacementCSS:{replacementCss:'replace-img',replacementStyle:'replace-style'},ImageReplacementLegend:{lang:{en:'Images',fr:'Images'}},DefaultImageReplacementCheckbox:{id:'default-img',value:'default-img',groupName:'image',lang:{en:'Default',fr:'Défaut'}},ImageReplacementCheckbox:{id:'text-img',value:'text-img',groupName:'image',lang:{en:'Replace with text',fr:'Remplacer par du texte'}},} 3var global={mode:null,cookieName:null,openObj:null,imgTab:null,imgSpan:null} 4window.onload=function(){if(!document.querySelector('[data-accessconfig-params]')){console.log('AccessConfig warning : HTML missing')}else{var openButton=document.querySelector('[data-accessconfig-params]');global.userParams=JSON.parse(openButton.getAttribute('data-accessconfig-params'));global.userParams.Prefix?(userPrefix=global.userParams.Prefix):(userPrefix='a42-ac');settingForm();if(global.userParams.Modal==!0||global.userParams.Modal===undefined){var otherOpenButton=document.querySelectorAll('[data-accessconfig-button="true"]');for(i=0,len=otherOpenButton.length;i<len;i++){otherOpenButton[i].addEventListener('click',function(){dialog(this)},!1)}} 5if(global.userParams.Contrast!=!1){global.mode=userPrefix+'-'+config.ContrastFieldset.id;global.cookieName='contrast';setEvent()} 6if(global.userParams.Font!=!1){global.mode=userPrefix+'-'+config.DyslexiaFieldset.id;global.cookieName='font';setEvent()} 7if(global.userParams.LineSpacing!=!1){global.mode=userPrefix+'-'+config.LineSpacingFieldset.id;global.cookieName='line-spacing';setEvent()} 8if(global.userParams.Justification!=!1){global.mode=userPrefix+'-'+config.JustificationFieldset.id;global.cookieName='justification';setEvent()} 9if(global.userParams.ImageReplacement!=!1){global.mode=userPrefix+'-'+config.ImageReplacementFieldset.id;global.cookieName='image';setImgtab();setEvent()}}} 10function settingForm(){function $create(o){var tn=o.tagName;var x=document.createElement(tn);for(var i in o)if(i!='tagName'&&typeof(o[i])!='function')x.setAttribute(i,o[i]);return x} 11var langRef=setdefaultLang();var div=$create({tagName:'div',id:userPrefix,class:userPrefix});var fieldsetContent=$create({tagName:'div',class:userPrefix+'-'+config.FormFieldsetContent.classSetting});if(global.userParams.Modal==!0||global.userParams.Modal===undefined){div.setAttribute('role','dialog');div.setAttribute('aria-labelledby',userPrefix+'-'+config.ModalContainer.titleId);div.setAttribute('tabindex','-1');global.userParams.ContainerClass?div.classList.add(userPrefix+'-'+global.userParams.ContainerClass):div.classList.add(userPrefix+'-'+config.ModalContainer.classSetting);var titleWindow=$create({tagName:'h1',id:userPrefix+'-'+config.ModalContainer.titleId});global.userParams.ModalTitle?titleWindow.classList.add(userPrefix+global.userParams.ModalTitle):titleWindow.classList.add(userPrefix+'-'+config.ModalContainer.titleClass);var titleTxt=document.createTextNode(config.ModalContainer.titleLang[langRef]);titleWindow.appendChild(titleTxt);div.appendChild(titleWindow);var CClose=$create({tagName:'button',type:'button',id:userPrefix+'-'+config.CloseButton.id});global.userParams.ModalCloseButton?CClose.classList.add(userPrefix+global.userParams.ModalCloseButton):CClose.classList.add(userPrefix+'-'+config.CloseButton.classSetting);var SpanHidden=$create({tagName:'span',class:config.CloseButton.hiddenTextClass});var CloseTxt=document.createTextNode(config.CloseButton.lang[langRef]);SpanHidden.appendChild(CloseTxt);CClose.appendChild(SpanHidden);div.appendChild(CClose);div.appendChild(fieldsetContent)}else{var setupdiv=document.getElementById(config.Setup.id);setupdiv.appendChild(div);div.classList.add(userPrefix+'accessconfig-inline');div.appendChild(fieldsetContent)} 12if(global.userParams.Contrast!=!1){var fieldset=$create({tagName:'fieldset',id:userPrefix+'-'+config.ContrastFieldset.id});var legend=document.createElement('legend');var legendText=document.createTextNode(config.ContrastLegend.lang[langRef]);legend.appendChild(legendText);fieldset.appendChild(legend);
12var CInput=$create({tagName:'input',type:'radio',checked:'checked',id:userPrefix+'-'+config.DefaultContrastCheckbox.id,value:userPrefix+'-'+config.DefaultContrastCheckbox.value,name:userPrefix+'-'+config.DefaultContrastCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.DefaultContrastCheckbox.id});var defaultCText=document.createTextNode(config.DefaultContrastCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);if(config.Setting.useExtendContrast){var CInput=$create({tagName:'input',type:'radio',id:userPrefix+'-'+config.HighContrastCheckbox.id,value:userPrefix+'-'+config.HighContrastCheckbox.value,name:userPrefix+'-'+config.HighContrastCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.HighContrastCheckbox.id});var defaultCText=document.createTextNode(config.HighContrastCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel)} 13var CInput
13=$create({tagName:'input',type:'radio',id:userPrefix+'-'+config.InvertContrastCheckbox.id,value:userPrefix+'-'+config.InvertContrastCheckbox.value,name:userPrefix+'-'+config.InvertContrastCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.InvertContrastCheckbox.id});var defaultCText=document.createTextNode(config.InvertContrastCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);fieldsetContent.appendChild(fieldset)} 14if(global.userParams.Font!=!1){var fieldset=$create({tagName:'fieldset',id:userPrefix+'-'+config.DyslexiaFieldset.id});var legend=document.createElement('legend');var legendText=document.createTextNode(config.DyslexiaLegend.lang[langRef]);legend.appendChild(legendText);fieldset.appendChild(legend);var CInput=$create({tagName:'input',type:'radio',checked:'checked',id:userPrefix+'-'+config.DefaultFontCheckbox.id,value:userPrefix+'-'+config.DefaultFontCheckbox.value,name:userPrefix+'-'+config.DefaultFontCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.DefaultFontCheckbox.id});var defaultCText=document.createTextNode(config.DefaultFontCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);var CInput=$create({tagName:'input',type:'radio',id:userPrefix+'-'+config.DyslexiaFontCheckbox.id,value:userPrefix+'-'+config.DyslexiaFontCheckbox.value,name:userPrefix+'-'+config.DyslexiaFontCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.DyslexiaFontCheckbox.id});var defaultCText=document.createTextNode(config.DyslexiaFontCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);fieldsetContent.appendChild(fieldset)} 15if(global.userParams.LineSpacing!=!1){var fieldset=$create({tagName:'fieldset',id:userPrefix+'-'+config.LineSpacingFieldset.id});var legend=document.createElement('legend');var legendText=document.createTextNode(config.LineSpacingLegend.lang[langRef]);legend.appendChild(legendText);fieldset.appendChild(legend);var CInput=$create({tagName:'input',type:'radio',checked:'checked',id:userPrefix+'-'+config.DefaultLineSpacingCheckbox.id,value:userPrefix+'-'+config.DefaultLineSpacingCheckbox.value,name:userPrefix+'-'+config.DefaultLineSpacingCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.DefaultLineSpacingCheckbox.id});var defaultCText=document.createTextNode(config.DefaultLineSpacingCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);var CInput=$create({tagName:'input',type:'radio',id:userPrefix+'-'+config.DyslexiaLineSpacingCheckbox.id,value:userPrefix+'-'+config.DyslexiaLineSpacingCheckbox.value,name:userPrefix+'-'+config.DyslexiaLineSpacingCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.DyslexiaLineSpacingCheckbox.id});var defaultCText=document.createTextNode(config.DyslexiaLineSpacingCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);fieldsetContent.appendChild(fieldset)} 16if(global.userParams.Justification!=!1){var fieldset=$create({tagName:'fieldset',id:userPrefix+'-'+config.JustificationFieldset.id});var legend=document.createElement('legend');var legendText=document.createTextNode(config.JustificationLegend.lang[langRef]);legend.appendChild(legendText);fieldset.appendChild(legend);var CInput=$create({tagName:'input',type:'radio',checked:'checked',id:userPrefix+'-'+config.DefaultJustificationCheckbox.id,value:userPrefix+'-'+config.DefaultJustificationCheckbox.value,name:userPrefix+'-'+config.DefaultJustificationCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.DefaultJustificationCheckbox.id});var defaultCText=document.createTextNode(config.DefaultJustificationCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);var CInput=$create({tagName:'input',type:'radio',id:userPrefix+'-'+config.DyslexiaJustificationCheckbox.id,value:userPrefix+'-'+config.DyslexiaJustificationCheckbox.value,name:userPrefix+'-'+config.DyslexiaJustificationCheckbox.groupName});
16var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.DyslexiaJustificationCheckbox.id});var defaultCText=document.createTextNode(config.DyslexiaJustificationCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);fieldsetContent.appendChild(fieldset)} 17if(global.userParams.ImageReplacement!=!1){var fieldset=$create({tagName:'fieldset',id:userPrefix+'-'+config.ImageReplacementFieldset.id});var legend=document.createElement('legend');var legendText=document.createTextNode(config.ImageReplacementLegend.lang[langRef]);legend.appendChild(legendText);fieldset.appendChild(legend);var CInput=$create({tagName:'input',type:'radio',checked:'checked',id:userPrefix+'-'+config.DefaultImageReplacementCheckbox.id,value:userPrefix+'-'+config.DefaultImageReplacementCheckbox.value,name:userPrefix+'-'+config.DefaultImageReplacementCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.DefaultImageReplacementCheckbox.id});var defaultCText=document.createTextNode(config.DefaultImageReplacementCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);var CInput=$create({tagName:'input',type:'radio',id:userPrefix+'-'+config.ImageReplacementCheckbox.id,value:userPrefix+'-'+config.ImageReplacementCheckbox.value,name:userPrefix+'-'+config.ImageReplacementCheckbox.groupName});var CLabel=$create({tagName:'label',for:userPrefix+'-'+config.ImageReplacementCheckbox.id});var defaultCText=document.createTextNode(config.ImageReplacementCheckbox.lang[langRef]);CLabel.appendChild(defaultCText);fieldset.appendChild(CInput);fieldset.appendChild(CLabel);fieldsetContent.appendChild(fieldset)} 18allFieldset=div.querySelectorAll('fieldset');for(i=0,len=allFieldset.length;i<len;i++){global.userParams.FormFieldset?allFieldset[i].classList.add(userPrefix+global.userParams.FormFieldset):allFieldset[i].classList.add(userPrefix+'-'+config.FormFieldset.classSetting)} 19allLegend=div.querySelectorAll('legend');for(i=0,len=allLegend.length;i<len;i++){global.userParams.FormFieldsetLegend?allLegend[i].classList.add(userPrefix+global.userParams.FormFieldsetLegend):allLegend[i].classList.add(userPrefix+'-'+config.LegendFieldset.classSetting)} 20allRadio=div.querySelectorAll('input[type="radio"]');for(i=0,len=allRadio.length;i<len;i++){global.userParams.FormRadio?allRadio[i].classList.add(userPrefix+global.userParams.FormRadio):allRadio[i].classList.add(userPrefix+'-'+config.FormRadio.classSetting)} 21var modalAttach=document.querySelector('body');var modalAttachFirstChild=modalAttach.firstChild;if(global.userParams.Modal==!0||global.userParams.Modal===undefined)modalAttach.insertBefore(div,modalAttachFirstChild)} 22function setdefaultLang(){var lang=document.querySelector('html').getAttribute('lang');if(lang){var ndx;(lang.indexOf('-')>0)?ndx=lang.indexOf('-'):ndx=3;return lang.substring(0,ndx)}else{return'en'}} 23function setEvent(){var body=document.querySelector('body');var fieldset=document.getElementById(global.mode);var checkBoxList=fieldset.querySelectorAll('input');for(i=0,len=checkBoxList.length;i<len;i++){checkBoxList[i].addEventListener('click',function(){setAdaptive(this)},!1)} 24var target=readCookie(global.cookieName);if(target){body.classList.add(target);for(i=0,len=checkBoxList.length;i<len;i++){checkBoxList[i].removeAttribute('checked')} 25document.getElementById(target).setAttribute('checked','checked')} 26if(body.classList.contains(userPrefix+'-'+config.DefaultImageReplacementCheckbox.value)){replaceImgSpan()} 27if(body.classList.contains(userPrefix+'-'+config.ImageReplacementCheckbox.value)){replaceImg()}} 28function setAdaptive(obj){global.mode=obj.getAttribute('name');global.cookieName=obj.getAttribute('name');var fieldset=document.getElementById(global.mode);var checkBoxList=fieldset.querySelectorAll('input');var body=document.querySelector('body');for(i=0,lenx=checkBoxList.length;i<lenx;i++){var value=checkBoxList[i].getAttribute('value');checkBoxList[i].removeAttribute('checked');if(value===userPrefix+'-'+config.DefaultImageReplacementCheckbox.value){replaceImgSpan()} 29body.classList.remove(value)} 30var newClass=obj.getAttribute('value');obj.setAttribute('checked','checked');var value=obj.getAttribute('value');
30if(value===userPrefix+'-'+config.ImageReplacementCheckbox.value){replaceImg()} 31body.classList.add(newClass);createCookie(global.cookieName,newClass,'180')} 32function setImgtab(){global.imgSpan=new Array;var selector='.'+userPrefix+'-'+config.ImageReplacementCSS.replacementCss;global.imgTab=document.querySelectorAll(selector);for(j=0,len=global.imgTab.length;j<len;j++){var imgPReplacement=document.createElement('span');var imgAlt=global.imgTab[j].getAttribute('alt');var imgTxtReplacement=document.createTextNode(imgAlt);imgPReplacement.appendChild(imgTxtReplacement);imgPReplacement.classList.add(userPrefix+'-'+config.ImageReplacementCSS.replacementCss);imgPReplacement.classList.add(userPrefix+'-'+config.ImageReplacementCSS.replacementStyle);global.imgSpan[j]=imgPReplacement}} 33function replaceImg(){for(j=0,len=global.imgTab.length;j<len;j++){if(global.imgTab[j].parentNode){var parent=global.imgTab[j].parentNode;global.imgTab[j]=parent.replaceChild(global.imgSpan[j],global.imgTab[j])}}} 34function replaceImgSpan(){for(j=0,len=global.imgSpan.length;j<len;j++){if(global.imgSpan[j].parentNode){var parent=global.imgSpan[j].parentNode;global.imgSpan[j]=parent.replaceChild(global.imgTab[j],global.imgSpan[j])}}} 35function dialog(returnTo){document.body.classList.add(userPrefix+'-'+config.BodyActive.classSetting);var overlay=document.createElement('div');overlay.classList.add(userPrefix+'-'+config.Overlay.classSetting);document.body.appendChild(overlay);global.openObj=document.getElementById(userPrefix);global.openObj.style.display='block';document.getElementById(userPrefix+'-'+config.CloseButton.id).focus();document.addEventListener('keydown',escClose,!1);var closeButton=document.getElementById(userPrefix+'-'+config.CloseButton.id);closeButton.addEventListener('click',buttonClose,!1);document.addEventListener('focus',trappingFocus,!0);function escClose(event){if(event.keyCode===27){global.openObj.style.display='none';returnTo.focus();document.removeEventListener('keydown',escClose,!1);document.body.classList.remove(userPrefix+'-'+config.BodyActive.classSetting);var overlay=document.querySelector('.'+userPrefix+'-'+config.Overlay.classSetting);if(overlay){overlay.remove()}}} 36function buttonClose(){global.openObj.style.display='none';returnTo.focus();closeButton.removeEventListener('click',buttonClose,!1);document.body.classList.remove(userPrefix+'-'+config.BodyActive.classSetting);var overlay=document.querySelector('.'+userPrefix+'-'+config.Overlay.classSetting);if(overlay){overlay.remove()}}} 37function trappingFocus(event){if(global.openObj&&!global.openObj.contains(event.target)){event.stopPropagation();global.openObj.focus()}} 38function createCookie(name,value,days){if(days){var datetime=new Date();datetime.setTime(datetime.getTime()+(days*24*60*60*1000));var expires="; expires="+datetime.toGMTString()}else var expires="";document.cookie=name+"="+value+expires+"; path=/"} 39function readCookie(name){var nameEQ=userPrefix+'-'+name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length)} 40return null} 41function eraseCookie(name){createCookie(name,"",-1)}})();(function(arr){arr.forEach(function(item){if(item.hasOwnProperty('remove')){return} 42Object.defineProperty(item,'remove',{configurable:!0,enumerable:!0,writable:!0,value:function remove(){if(this.parentNode!==null) 43this.parentNode.removeChild(this)}})})})([Element.prototype,CharacterData.prototype,DocumentType.prototype])
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.