PageSourceSearch

https://www.rustica.fr/assets_2022/min/a3a6b4757004451ffa601209379bbcb6.js?20260925_133255

js rustica.fr collected 2026-10-02 09:51:54 UTC 41,203 bytes, 81 lines download raw bytes

1"use strict";!function(){window.Element.prototype.removeClass=function(){let className=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",selectors=this;if(!(selectors instanceof HTMLElement)&&selectors!==null){selectors=document.querySelector(selectors);}
2if(this.isVariableDefined(selectors)&&className){selectors.classList.remove(className);}
3return this;},window.Element.prototype.addClass=function(){let className=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",selectors=this;if(!(selectors instanceof HTMLElement)&&selectors!==null){selectors=document.querySelector(selectors);}
4if(this.isVariableDefined(selectors)&&className){selectors.classList.add(className);}
5return this;},window.Element.prototype.toggleClass=function(){let className=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",selectors=this;if(!(selectors instanceof HTMLElement)&&selectors!==null){selectors=document.querySelector(selectors);}
6if(this.isVariableDefined(selectors)&&className){selectors.classList.toggle(className);}
7return this;},window.Element.prototype.isVariableDefined=function(){return!!this&&typeof(this)!='undefined'&&this!=null;}}();var app={init:function(){app.megaMenu(),app.stickyHeader(),app.toolTipFunc(),app.popOverFunc(),app.backTotop(),app.darkMode(),app.zooming(),app.lazyLoading();},isVariableDefined:function(el){return typeof!!el&&(el)!='undefined'&&el!=null;},getParents:function(el,selector,filter){const result=[];const matchesSelector=el.matches||el.webkitMatchesSelector||el.mozMatchesSelector||el.msMatchesSelector;el=el.parentElement;while(el&&!matchesSelector.call(el,selector)){if(!filter){if(selector){if(matchesSelector.call(el,selector)){return result.push(el);}}else{result.push(el);}}else{if(matchesSelector.call(el,filter)){result.push(el);}}
8el=el.parentElement;if(app.isVariableDefined(el)){if(matchesSelector.call(el,selector)){return el;}}}
9return result;},getNextSiblings:function(el,selector,filter){let sibs=[];let nextElem=el.parentNode.firstChild;const matchesSelector=el.matches||el.webkitMatchesSelector||el.mozMatchesSelector||el.msMatchesSelector;do{if(nextElem.nodeType===3)continue;if(nextElem===el)continue;if(nextElem===el.nextElementSibling){if((!filter||filter(el))){if(selector){if(matchesSelector.call(nextElem,selector)){return nextElem;}}else{sibs.push(nextElem);}
10el=nextElem;}}}while(nextElem=nextElem.nextSibling)
11return sibs;},on:function(selectors,type,listener){const addListener=()=>{if(!(selectors instanceof HTMLElement)&&selectors!==null){selectors=document.querySelector(selectors);}
12if(selectors){selectors.addEventListener(type,listener);}};if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",addListener);}else{addListener();}},onAll:function(selectors,type,listener){const addListeners=()=>{document.querySelectorAll(selectors).forEach((element)=>{if(type.indexOf(',')>-1){let types=type.split(',');types.forEach((type)=>{element.addEventListener(type.trim(),listener);});}else{element.addEventListener(type,listener);}});};if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",addListeners);}else{addListeners();}},delegate:function(type,selector,listener){document.addEventListener(type,(event)=>{const target=event.target.closest(selector);if(target){listener.call(target,event);}});},debounce:function(func,wait){let timeout;return function(){const context=this,args=arguments;clearTimeout(timeout);timeout=setTimeout(()=>func.apply(context,args),wait);};},throttle:function(func,limit){let inThrottle;return function(){const args=arguments;const context=this;if(!inThrottle){func.apply(context,args);inThrottle=true;setTimeout(()=>inThrottle=false,limit);}}},yieldToMain:function(callback){if(window.requestIdleCallback){requestIdleCallback(callback);}else{setTimeout(callback,0);}},removeClass:function(selectors,className){if(!(selectors instanceof HTMLElement)&&selectors!==null){selectors=document.querySelector(selectors);}
13if(app.isVariableDefined(selectors)){selectors.removeClass(className);}},removeAllClass:function(selectors,className){if(app.isVariableDefined(selectors)&&(selectors instanceof HTMLElement)){document.querySelectorAll(selectors).forEac
13h((element)=>{element.removeClass(className);});}},toggleClass:function(selectors,className){if(!(selectors instanceof HTMLElement)&&selectors!==null){selectors=document.querySelector(selectors);}
14if(app.isVariableDefined(selectors)){selectors.toggleClass(className);}},addClass:function(selectors,className){if(!(selectors instanceof HTMLElement)&&selectors!==null){selectors=document.querySelector(selectors);}
15if(app.isVariableDefined(selectors)){selectors.addClass(className);}},select:function(selectors){return document.querySelector(selectors);},selectAll:function(selectors){return document.querySelectorAll(selectors);},isVisible:function(elem){if(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);}},megaMenu:function(){let toggler=document.querySelector('.navbar-toggler');if(app.isVisible(toggler)){app.onAll('.dropdown-menu a.dropdown-item.dropdown-toggle','click',function(event){var element=this;event.preventDefault();event.stopImmediatePropagation();if(app.isVariableDefined(element.nextElementSibling)&&!element.nextElementSibling.classList.contains("show")){const parents=app.getParents(element,'.dropdown-menu');app.removeClass(parents.querySelector('.show'),"show");if(app.isVariableDefined(parents.querySelector('.dropdown-opened'))){app.removeClass(parents.querySelector('.dropdown-opened'),"dropdown-opened");}}
16var $subMenu=app.getNextSiblings(element,".dropdown-menu");app.toggleClass($subMenu,"show");$subMenu.previousElementSibling.toggleClass('dropdown-opened');var parents=app.getParents(element,'li.nav-item.dropdown.show');if(app.isVariableDefined(parents)&&parents.length>0){app.on(parents,'hidden.bs.dropdown',function(event){app.removeAllClass('.dropdown-submenu .show');});}});}},stickyHeader:function(){if(window.height>992){var stickyStart=155;}else{var stickyStart=1;}
17let stickyNav=app.select('.navbar-sticky');if(app.isVariableDefined(stickyNav)){let stickyHeight=stickyNav.offsetHeight;stickyNav.insertAdjacentHTML('afterend','<div id="sticky-space"></div>');let stickySpace=app.select('#sticky-space');if(app.isVariableDefined(stickySpace)){document.addEventListener('scroll',app.throttle(function(event){let scTop=window.pageYOffset||document.documentElement.scrollTop;if(scTop>=stickyStart){stickySpace.addClass('active');app.select("#sticky-space.active").style.height=stickyHeight+'px';stickyNav.addClass('navbar-sticky-on');}else{stickySpace.removeClass('active');stickySpace.style.height='0px';stickyNav.removeClass("navbar-sticky-on");}},100));}}},toolTipFunc:function(){let tooltipTriggerList=[].slice.call(app.selectAll('[data-bs-toggle="tooltip"]'))
18let tooltipList=tooltipTriggerList.map(function(tooltipTriggerEl){return new bootstrap.Tooltip(tooltipTriggerEl)})},popOverFunc:function(){let popoverTriggerList=[].slice.call(app.selectAll('[data-bs-toggle="popover"]'))
19let popoverList=popoverTriggerList.map(function(popoverTriggerEl){return new bootstrap.Popover(popoverTriggerEl)})},backTotop:function(){let scrollpos=window.scrollY;let backBtn=app.select('.back-top');if(app.isVariableDefined(backBtn)){let add_class_on_scroll=()=>backBtn.addClass("back-top-show");let remove_class_on_scroll=()=>backBtn.removeClass("back-top-show");window.addEventListener('scroll',app.throttle(function(){scrollpos=window.scrollY;if(scrollpos>=800){add_class_on_scroll()}else{remove_class_on_scroll()}},100));backBtn.addEventListener('click',()=>window.scrollTo({top:0,behavior:'smooth',}));}},darkMode:function(){let dark=app.select('#darkModeSwitch');if(app.isVariableDefined(dark)){let theme=localStorage.getItem('data-theme');let style=document.getElementById("style-switch");let dir=document.getElementsByTagName("html")[0].getAttribute('dir');let themeLight=style.getAttribute('data-theme-light');let themeDark=style.getAttribute('data-theme-dark');let logoImg=document.getElementsByClassName("navbar-brand-item")[0];let changeThemeToDark=()=>{document.documentElement.setAttribute("data-theme","dark")
20if(dir=='rtl'){}else{style.setAttribute('href',themeDark);}
21logoImg.src=logoImg.getAttribute("data-src-dark");logoImg.classList.remove("light-mode-item");if(!logoImg.classList.contains("dark-mode-item")){logoImg.classList.add("dark-mode-item");}
22localStorage.setItem("data-theme","dark")}
23let changeThemeToLight=()=>{document.documentElement.setAttribute("data-theme","light")
24if(dir=='rtl'){}else{style.setAttribute('href',themeLight);}
25logoImg.src=logoImg.getAttribute("data-src-light");logoImg.classList.remove("dark-mode-item");if(!logoImg.classList.contains("light-mode-item")){logoImg.classList.add("light-mode-item");}
26localStorage.setItem("data-theme",'light')}
27if(theme==='dark'){changeThemeToDark()}else if(theme==null||theme==='light'){changeThemeToLight();}
28const dms=document.querySelector('#darkModeSwitch');dms.addEventListener('click',()=>{let theme=localStorage.getItem('data-theme');requestAnimationFrame(()=>{if(theme==='dark'){changeThemeToLight()}else{changeThemeToDark()}});});}},zooming:function(){const doc=document.documentElement;app.delegate('change','input[type=radio][name="fntradio"]',function(){let idZ=this.getAttribute('id');requestAnimationFrame(()=>{if(idZ=='font-sm'){doc.classList.remove('font-lg');doc.classList.add('font-sm');}else if(idZ=='font-default'){doc.classList.remove('font-sm','font-lg');}else if(idZ=='font-lg'){doc.classList.remove('font-sm');doc.classList.add('font-lg');}});});},lazyLoading:function(){let lazLoad=app.select('.lazy');if(app.isVariableDefined(lazLoad)){let lazyLoadInstance=new LazyLoad({});}},};app.init();;function isVisible(elem){if(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);}};function isTouchDevice(){return('ontouchstart'in window)||(navigator.maxTouchPoints>0)||(navigator.msMaxTouchPoints>0);}
29var getClosest=function(elem,selector){if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(s){let matches=(this.document||this.ownerDocument).querySelectorAll(s),i=matches.length;while(--i>=0&&matches.item(i)!==this){}
30return i>-1;};}
31for(;elem&&elem!==document;elem=elem.parentNode){if(elem.matches(selector))return elem;}
32return null;};function getModal(url){let req=new XMLHttpRequest();req.open('GET',url);req.onload=function(){if(req.status===200){document.getElementById('modaleContainer').innerHTML=req.responseText;modalShow('Modale');let scripts=document.querySelectorAll("#modaleContainer script");
32if(scripts.length>0){scripts.forEach(function(el){let scriptNode=document.createElement('script');scriptNode.innerHTML=el.text;document.getElementById('modaleContainer').appendChild(scriptNode);el.parentNode.removeChild(el);});}}
33else{}};req.send();}
34function modalShow(id){let myModal=new bootstrap.Modal(document.getElementById(id));myModal.show();}
35function modalHide(id){if(document.getElementById(id).classList.contains("show")){let myModalEl=document.getElementById(id);let myModal=bootstrap.Modal.getInstance(myModalEl);myModal.hide();}}
36app.delegate('click','.bt-modal-open',function(event){event.preventDefault();let modale_url=this.getAttribute('data-modal-url');if(!modale_url){return;}
37getModal(modale_url);});const bandeauAlert=document.getElementById('bandeau-mobile-alert');if(bandeauAlert){bandeauAlert.addEventListener('closed.bs.alert',event=>{setCookie('bandeau_mobile_close',bandeauAlert.getAttribute('data-bandeau-id'),1);})}
38function setCookie(name,value,days){let expires;if(days){let d=new Date;d.setTime(d.getTime()+24*60*60*1000*days);expires="; expires="+d.toGMTString();}
39else{expires="";}
40document.cookie=name+"="+value+expires+"; path=/";}
41function getCookie(name){let nameEQ=name+"=";let ca=document.cookie.split(';');for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)===' '){c=c.substring(1,c.length);}
42if(c.indexOf(nameEQ)===0){return c.substring(nameEQ.length,c.length);}}
43return null;}
44function deleteCookie(name){setCookie(name,"",-1);}
45app.delegate('click','.submit-nl',function(event){event.preventDefault();let el=this;let parent=getClosest(el,'.input-group, .inscription-nl');let email=parent.querySelector('input').value;const re=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;let is_mail=re.test(email);let inputEl=parent.querySelector('input');inputEl.classList.remove('is-invalid');let errorEl=parent.querySelector('.invalid-feedback');if(errorEl){errorEl.classList.add('d-none');errorEl.innerHTML='';}
46if(is_mail){if(!isValidEmailDomain(email)){inputEl.classList.add('is-invalid');if(errorEl){errorEl.innerHTML='Le domaine de votre adresse e-mail semble invalide (ex: gmail.fr au lieu de gmail.com).';errorEl.classList.remove('d-none');errorEl.classList.add('d-block');}
47return;}
48parent.querySelector('input').value='';let source=el.getAttribute('data-source');getModal(URL_BASE+"modale/newsletter?email="+encodeURIComponent(email)+"&source="+source);}else{inputEl.classList.add('is-invalid');if(errorEl){errorEl.innerHTML='Veuillez rentrer une adresse e-mail valide.';errorEl.classList.remove('d-none');errorEl.classList.add('d-block');errorEl.classList.add('alert');errorEl.classList.add('alert-warning');errorEl.classList.add('mt-3');}}});var cached_invalid_domains=null;function isValidEmailDomain(email){let domain=email.split('@')[1].toLowerCase();domain=domain.trim().replace(/[^a-z0-9\.\-]/g,'');if(cached_invalid_domains===null){loadInvalidDomains(true);}
49return cached_invalid_domains.indexOf(domain)===-1;}
50function loadInvalidDomains(sync){if(cached_invalid_domains!==null)return;sync=sync||false;var req=new XMLHttpRequest();req.open('GET',URL_BASE+"php/ajax/get_invalid_domains.php",!sync);if(sync){try{req.send();if(req.status===200){cached_invalid_domains=JSON.parse(req.responseText);}else{cached_invalid_domains=[];}}catch(e){cached_invalid_domains=[];}}else{req.onload=function(){if(req.status===200){cached_invalid_domains=JSON.parse(req.responseText);}};req.send();}}"use strict";var mySticky;let s={init:function(){s.myMenu();s.offCanvasLogo();if(document.getElementById('droite')){if(!document.getElementById('droite').classList.contains("no-resize")){s.sidebarResize();}
51s.stickElements();}},insertAfter:function(referenceNode,newNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling);},myMenu:function(){let toggler=document.querySelector('.navbar-toggler');app.onAll('#menu a.dropdown-toggle.univers','click',function(event){if(!app.isVisible(toggler)){let urlTo=this.getAttribute('href');document.location.href=urlTo;}});if(!app.isVisible(toggler)){let offcanvasCreatedItems=document.querySelectorAll('#offcanvasMenu .to-offcanvas');
51if(offcanvasCreatedItems){offcanvasCreatedItems.forEach(function(item,index){let li=item.closest('.nav-item ');li.remove();});}
52let menuItemsToCopy=document.querySelectorAll('#menu .nav-item>.to-offcanvas');if(menuItemsToCopy){let offcanvasCopiedButtons=0;menuItemsToCopy.forEach(function(item,index){if(!app.isVisible(item)){let clone=item.closest('li').cloneNode(true);clone.classList.add("mb-2");let link=clone.querySelector('a');link.classList.remove("d-none","d-sm-none","d-md-none","d-lg-none","d-xl-none");let newId=link.getAttribute("id")+"-offcanvas";link.setAttribute("id",newId);if(clone.classList.contains('dropdown')){let list=clone.querySelector('ul');if(list){list.setAttribute("aria-labelledby",newId);}}
53let navOffcanvas=document.querySelector('#offcanvasMenu .nav');if(offcanvasCopiedButtons==0){navOffcanvas.prepend(clone);}else{let currentItem=document.querySelectorAll('#offcanvasMenu .nav li')[index-1];s.insertAfter(currentItem,clone);}
54offcanvasCopiedButtons++;}});}}else{let offcanvasCreatedItems=document.querySelectorAll('#offcanvasMenu .to-offcanvas');if(offcanvasCreatedItems){offcanvasCreatedItems.forEach(function(item,index){let li=item.closest('.nav-item ');li.remove();});}}},offCanvasLogo:function(){let existingLogo=document.querySelector('.offcanvas .navbar-brand-item');
54if(!existingLogo){let navbarBrandItem=document.querySelector('.navbar-brand-item');let offCanvasBody=document.querySelector('.offcanvas-body');if(navbarBrandItem&&offCanvasBody){offCanvasBody.insertAdjacentHTML('afterbegin',navbarBrandItem.outerHTML);}}},sidebarResize:function(){if(window.innerWidth<992)return;if(document.getElementById('droite')){let el_main=document.getElementById('content');let el_sidebar=document.getElementById('droite');if(!el_main||!el_sidebar)return;let sidebarWidth=Math.floor(el_sidebar.offsetWidth);let el_container=document.querySelector('body>main');let containerWidth=Math.floor(el_container.offsetWidth);let newWidth=Math.floor(containerWidth-sidebarWidth)-1;requestAnimationFrame(()=>{let cssString="ms-flex: 0 0 "+newWidth+"px !important;";cssString+="flex: 0 0 "+newWidth+"px !important;";cssString+="max-width: "+newWidth+"px !important;";el_main.style.cssText+=';'+cssString;});}},stickElements:function(){if(window.innerWidth<992)return;if(document.body.contains(document.getElementById("stickMe"))&&document.body.contains(document.getElementById("insidedroite"))){let bottomEnd=0;if(!document.body.classList.contains("tpl-home")&&!document.body.classList.contains("tpl-univers")){let contentDiv=document.getElementById("content");let currentContentHeight=contentDiv.offsetHeight;let sidebarHeight=document.getElementById("insidedroite").offsetHeight;let heigthDiff=(currentContentHeight-sidebarHeight);if(heigthDiff>1200){bottomEnd=(heigthDiff-1200);}}
55if(typeof(mySticky)==='undefined'){mySticky=new hcSticky('#insidedroite',{stickTo:'#droite',innerSticker:'#stickMe',bottomEnd:bottomEnd,followScroll:false,top:72,responsive:{980:{disable:true}}});}else{mySticky.update({bottomEnd:bottomEnd});mySticky.refresh();}}},}
56s.init();window.addEventListener('resize',app.debounce(s.init,150));if(document.body.contains(document.getElementById("stickMe"))&&document.body.contains(document.getElementById("insidedroite"))){const habillage_observer=new MutationObserver(function(mutationRecords,observer){mutationRecords.forEach(function(mutation){if(document.body.classList.contains("hasHabillage")){setTimeout(()=>{mySticky.refresh();observer.disconnect();},250);}});});habillage_observer.observe(document.body,{attributeFilter:["class"],characterDataOldValue:true});let contentDiv=document.getElementById("content");let currentContentHeight=contentDiv.offsetHeight;let content_observer=new MutationObserver(function(mutationRecords,observer){mutationRecords.forEach(function(mutation){if(mutation.type==="childList"){if(currentContentHeight!=contentDiv.offsetHeight){currentContentHeight=contentDiv.offsetHeight;let sidebarHeight=document.getElementById("insidedroite").offsetHeight;let bottomEnd=0;let heigthDiff=(currentContentHeight-sidebarHeight);if(heigthDiff>1200){bottomEnd=(heigthDiff-1200);}
57mySticky.update({bottomEnd:bottomEnd});mySticky.refresh();}}});});content_observer.observe(contentDiv,{childList:true,subtree:true});}
58let hoverControls=Array.prototype.slice.call(document.querySelectorAll("[data-hover-controls]"));hoverControls.forEach((function(item){!function(item){let target,n=item.getAttribute("data-hover-controls"),r=null;(target=-1===n.indexOf(".")?document.getElementById(n):item.parentNode.querySelector(n)).setAttribute("data-hover-extends","true");let o=function(n){r&&clearTimeout(r),"leave"===n?r=setTimeout((function(){item.setAttribute("data-control-used","false"),target.setAttribute("aria-hidden","true")}),10):(item.setAttribute("data-control-used","true"),target.setAttribute("aria-hidden","false"))};item.addEventListener("mouseenter",(function(item){return o("enter");})),item.addEventListener("mouseleave",(function(item){return o("leave");})),target.addEventListener("mouseenter",(function(item){return o("enter");})),target.addEventListener("mouseleave",(function(item){return o("leave");}))}(item)}));;(function(){function initEventTracker(){const menuElts=document.querySelectorAll("[ga-on]");if(menuElts.length===0)return;[...menuElts].forEach((elt)=>{if(elt.dataset.eventTrackerBound)return;elt.dataset.eventTrackerBound='true';try{elt.addEventListener("click",function(evt){let attribs=elt.attributes;if(attribs.hasOwnProperty('href')&&(!attribs.hasOwnProperty('target')||(attribs.hasOwnProperty('target')&&attribs.target=="_self"))){evt.preventDefault();}
59let pushDatas={};for(var i=0;i<attribs.length;i++){if(attribs[i].name.startsWith("ga-push-")){let key=attribs[i].name.replace('ga-push-','');let value=attribs[i].value;pushDatas[key]=value;}}
60window.dataLayer=window.dataLayer||[];window.dataLayer.push(pushDatas);if(attribs.hasOwnProperty('href')&&(!attribs.hasOwnProperty('target')||(attribs.hasOwnProperty('target')&&attribs.target=="_self"))){window.location.href=attribs.href.value;}});}catch(e){console.log("Something wrong happened when setting up event handling for the menu items.");}});}
61if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',initEventTracker);}else{initEventTracker();}})();;const applicationServerKey="BN69oNBAjSsaDLTGOCkfDyzwGDlF8l2LXnqex1Qgv79dAYqn3wHPGtuQYpZK8185FBN7zpf2_EHZx9qmDEI93S8";function urlBase64ToUint8Array(base64String){const padding='='.repeat((4-base64String.length%4)%4);const base64=(base64String+padding).replace(/\-/g,'+').replace(/_/g,'/');const rawData=window.atob(base64);const outputArray=new Uint8Array(rawData.length);for(let i=0;i<rawData.length;++i){outputArray[i]=rawData.charCodeAt(i);}
62return outputArray;}
63function push_subscribe(){navigator.serviceWorker.ready.then(serviceWorkerRegistration=>serviceWorkerRegistration.pushManager.subscribe({userVisibleOnly:true,applicationServerKey:urlBase64ToUint8Array(applicationServerKey),})).then(subscription=>{return push_sendSubscriptionToServer(subscription,'POST');}).then(subscription=>subscription).catch(e=>{if(Notification.permission==='denied'){console.warn('Notifications are denied by the user.');}else{console.error('Impossible to subscribe to push notifications',e);if(e.message.indexOf('already exists')!=-1||e.message.indexOf('Error retrieving push subscription')!=-1){push_unsubscribe();push_subscribe();}}});}
64function push_unsubscribe(){navigator.serviceWorker.ready.then(serviceWorkerRegistration=>serviceWorkerRegistration.pushManager.getSubscription()).then(subscription=>{if(!subscription){return;}
65return push_sendSubscriptionToServer(subscription,'DELETE');}).then(subscription=>subscription.unsubscribe()).catch(e=>{console.error('Error when unsubscribing the user',e);});}
66function push_updateSubscription(){navigator.serviceWorker.ready.then(serviceWorkerRegistration=>serviceWorkerRegistration.pushManager.getSubscription()).then(subscription=>{if(!subscription){return;}
67return push_sendSubscriptionToServer(subscription,'PUT');}).then(subscription=>subscription).catch(e=>{console.error('Error when updating the subscription',e);});}
68function push_sendSubscriptionToServer(subscription,method){const key=subscription.getKey('p256dh');const token=subscription.getKey('auth');const contentEncoding=(PushManager.supportedContentEncodings||['aesgcm'])[0];return fetch('https://notifications.rustica.fr/subscription.php',{method,body:JSON.stringify({endpoint:subscription.endpoint,publicKey:key?btoa(String.fromCharCode.apply(null,new Uint8Array(key))):null,authToken:token?btoa(String.fromCharCode.apply(null,new Uint8Array(token))):null,contentEncoding,}),}).then(()=>subscription);}
69document.addEventListener("DOMContentLoaded",()=>{let isPushEnabled=false;if(typeof ServiceWorkerRegistration==="undefined"||!('showNotification'in ServiceWorkerRegistration.prototype)){console.warn('Notifications are not supported by this browser');return;}
70if(Notification.permission==='denied'){console.warn('Notifications are denied by the user');return;}
71navigator.serviceWorker.register(URL_BASE+"OneSignalSDKWorker.js").then(()=>{console.log('[SW] Service worker has been registered');push_updateSubscription();},e=>{console.error('[SW] Service worker registration failed',e);});});var cambiumWebpush=cambiumWebpush||{};cambiumWebpush.showEndpoint=function(){navigator.serviceWorker.ready.then(serviceWorkerRegistration=>serviceWorkerRegistration.pushManager.getSubscription()).then(function(subscription){console.log('[cambiumWebpush] Endpoint :'+subscription.endpoint);return subscription.endpoint;}).catch(e=>{console.error('[cambiumWebpush] Erreur ',e);return e;});}
72;"use strict";function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){for(var e=["DocumentType","Element","CharacterData"],t=function(){null!=this.parentNode&&this.parentNode.removeChild(this)},i=0;i<e.length;i++){var r=e[i];window[r]&&!window[r].prototype.remove&&(window[r].prototype.remove=t)}}(),function(e){function t(){}function i(e,t){return function(){e.apply(t,arguments)}}function r(e){if("object"!==_typeof(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function n(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):(e._handled=!0,void r._immediateFn(function(){var i=1===e._state?t.onFulfilled:t.onRejected;if(null===i)return void(1===e._state?o:s)(t.promise,e._value);var r;try{r=i(e._value)}catch(n){return void s(t.promise,n)}o(t.promise,r)}))}function o(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===("undefined"==typeof t?"undefined":_typeof(t))||"function"==typeof t)){var n=t.then;if(t instanceof r)return e._state=3,e._value=t,void a(e);if("function"==typeof n)return void u(i(n,t),e)}e._state=1,e._value=t,a(e)}catch(o){s(e,o)}}function s(e,t){e._state=2,e._value=t,a(e)}function a(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,i=e._deferreds.length;t<i;t++)n(e,e._deferreds[t]);e._deferreds=null}function l(e,t,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=i}function u(e,t){var i=!1;try{e(function(e){i||(i=!0,o(t,e))},function(e){i||(i=!0,s(t,e))})}catch(r){if(i)return;i=!0,s(t,r)}}var d=setTimeout;r.prototype["catch"]=function(e){return this.then(null,e)},r.prototype.then=function(e,i){var r=new this.constructor(t);return n(this,new l(e,i,r)),r},r.all=function(e){var t=Array.prototype.slice.call(e);return new r(function(e,i){function r(o,s){try{if(s&&("object"===("undefined"==typeof s?"undefined":_typeof(s))||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(e){r(o,e)},i)}t[o]=s,0===--n&&e(t)}catch(l){i(l)}}if(0===t.length)return e([]);for(var n=t.length,o=0;o<t.length;o++)r(o,t[o])})},r.resolve=function(e){return e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))&&e.constructor===r?e:new r(function(t){t(e)})},r.reject=function(e){return new r(function(t,i){i(e)})},r.race=function(e){return new r(function(t,i){for(var r=0,n=e.length;r<n;r++)e[r].then(t,i)})},r._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){d(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},"undefined"!=typeof module&&module.exports?module.exports=r:e.Promise||(e.Promise=r)}(window),function(e){e.Promise||(e.Promise=Promise);
72var t="required",i="email",r="minLength",n="maxLength",o="password",s="zip",a="phone",l="remote",u="strength",d="function",c=function(e,t){if("string"==typeof e)return e;var i="post"===t.toLowerCase()?"":"?";return Array.isArray(e)?i+e.map(function(e){return e.name+"="+e.value}).join("&"):i+Object.keys(e).map(function(t){return t+"="+e[t]}).join("&")},h=function(e){var t=e.url,i=e.method,r=e.data,n=e.debug,o=e.callback,s=e.error;if(n)return void o("test");var a=e.async!==!1,l=new XMLHttpRequest,u=c(r,"get"),d=null;"post"===i.toLowerCase()&&(d=c(r,"post"),u=""),l.open(i,t+u,a),l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.onreadystatechange=function(){4===this.readyState&&(200===this.status?o(this.responseText):s&&s(this.responseText))},l.send(d)},f=function(e,t){this.options=t||{},this.rules=this.options.rules||{},this.messages=this.options.messages||void 0,this.colorWrong=this.options.colorWrong||"#B81111",this.result={},this.elements=[],this.tooltip=this.options.tooltip||{},this.tooltipFadeOutTime=this.tooltip.fadeOutTime||5e3,this.tooltipFadeOutClass=this.tooltip.fadeOutClass||"just-validate-tooltip-hide",this.tooltipSelectorWrap=document.querySelectorAll(this.tooltip.selectorWrap).length?document.querySelectorAll(this.tooltip.selectorWrap):document.querySelectorAll(".just-validate-tooltip-container"),this.bindHandlerKeyup=this.handlerKeyup.bind(this),this.submitHandler=this.options.submitHandler||void 0,this.invalidFormCallback=this.options.invalidFormCallback||void 0,this.promisesRemote=[],this.isValidationSuccess=!1,this.focusWrongField=this.options.focusWrongField||!1,this.REGEXP={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,zip:/^\d{5}(-\d{4})?$/,phone:/^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$/,password:/[^\w\d]*(([0-9]+.*[A-Za-z]+.*)|[A-Za-z]+.*([0-9]+.*))/,strengthPass:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]/},this.DEFAULT_REMOTE_ERROR="Error",this.state={tooltipsTimer:null},this.setForm(document.querySelector(e))};f.prototype={defaultRules:{email:{required:!0,email:!0},name:{required:!0,minLength:3,maxLength:15},text:{required:!0,maxLength:300,minLength:5},password:{required:!0,password:!0,minLength:4,maxLength:8},zip:{required:!0,zip:!0},phone:{phone:!0}},defaultMessages:{required:"The field is required",email:"Please, type a valid email",maxLength:"The field must contain a maximum of :value characters",minLength:"The field must contain a minimum of :value characters",password:"Password is not valid",remote:"Email already exists",strength:"Password must contents at least one uppercase letter, one lowercase letter and one number","function":"Function returned false"},handlerKeyup:function(e){var t=e.target,i={name:t.getAttribute("data-validate-field"),value:t.value};delete this.result[i.name],this.validateItem({name:i.name,value:i.value,group:[],isKeyupChange:!0}),this.renderErrors()}
72,setterEventListener:function(e,t,i,r){switch("keyup"===t&&(i=this.bindHandlerKeyup),r){case"add":e.addEventListener(t,i);break;case"remove":e.removeEventListener(t,i)}},getElementsRealValue:function(){for(var e=this.$form.querySelectorAll("*"),t=void 0,i={},r=0,n=e.length;r<n;++r)if(t=e[r].getAttribute("name")){if("checkbox"===e[r].type){i[t]=e[r].checked;continue}i[t]=e[r].value}return i},validationFailed:function(){this.invalidFormCallback&&this.invalidFormCallback(this.result);var e=document.querySelector(".js-validate-error-field");this.focusWrongField&&e&&e.focus&&e.focus()},validationSuccess:function(){if(0===Object.keys(this.result).length){if(this.isValidationSuccess=!1,this.submitHandler){var e=this.getElementsRealValue();return void this.submitHandler(this.$form,e,h)}this.$form.submit()}},setForm:function(e){var t=this;this.$form=e,this.$form.setAttribute("novalidate","novalidate"),this.$form.addEventListener("submit",function(e){return e.preventDefault(),t.result=[],t.getElements(),t.promisesRemote.length?void Promise.all(t.promisesRemote).then(function(){t.promisesRemote=[],t.isValidationSuccess?t.validationSuccess():t.validationFailed()}):void(t.isValidationSuccess?t.validationSuccess():t.validationFailed())})},isEmail:function(e){return this.REGEXP.email.test(e)},isZip:function(e){return this.REGEXP.zip.test(e)},isPhone:function(e){return this.REGEXP.phone.test(e)},isPassword:function(e){return this.REGEXP.password.test(e)},isEmpty:function(e){var t=e;return e.trim&&(t=e.trim()),!t},checkLengthMax:function(e,t){return e.length<=t},checkLengthMin:function(e,t){return e.length>=t},checkStrengthPass:function(e){return this.REGEXP.strengthPass.test(e)},getElements:function(){var e=this,t=this.$form.querySelectorAll("[data-validate-field]");this.elements=[];for(var i=function(i,r){var n=t[i],o=n.getAttribute("data-validate-field"),s=n.value,a=!1,l=[];
72if("checkbox"===n.type&&(s=n.checked||"",n.addEventListener("change",function(t){var i=t.target,r={name:i.getAttribute("data-validate-field"),value:i.checked};delete e.result[r.name],e.validateItem({name:r.name,value:r.value,group:[]}),e.renderErrors()})),"radio"===n.type){var u=e.elements.filter(function(e){if(e.name===o)return e})[0];u?(u.group.push(n.checked),a=!0):l.push(n.checked),n.addEventListener("change",function(t){var i=t.target,r={name:i.getAttribute("data-validate-field"),value:i.checked};delete e.result[r.name],e.validateItem({name:r.name,value:r.value,group:[]}),e.renderErrors()})}e.setterEventListener(n,"keyup",e.handlerKeyup,"add"),a||e.elements.push({name:o,value:s,group:l})},r=0,n=t.length;r<n;++r)i(r,n);this.validateElements()},validateRequired:function(e){return!this.isEmpty(e)},validateEmail:function(e){return this.isEmail(e)},validatePhone:function(e){return this.isPhone(e)},validateMinLength:function(e,t){return this.checkLengthMin(e,t)},validateMaxLength:function(e,t){return this.checkLengthMax(e,t)},validateStrengthPass:function(e){return this.checkStrengthPass(e)},validatePassword:function(e){return this.isPassword(e)},validateZip:function(e){return this.isZip(e)},validateRemote:function(e){var t=e.value,i=e.name,r=e.url,n=e.successAnswer,o=e.sendParam,s=e.method;return new Promise(function(e){h({url:r,method:s,data:_defineProperty({},o,t),async:!0,callback:function(t){t.toLowerCase()===n.toLowerCase()&&e("ok"),e({type:"incorrect",name:i})},error:function(){e({type:"error",name:i})}})})},generateMessage:function(e,t,i){var r=this.messages||this.defaultMessages,n=r[t]&&r[t][e]||this.messages&&"string"==typeof this.messages[t]&&r[t]||this.defaultMessages[e]||this.DEFAULT_REMOTE_ERROR;i&&(n=n.replace(":value",i.toString())),this.result[t]={message:n}},validateElements:function(){var e=this;return this.lockForm(),this.elements.forEach(function(t){e.validateItem({name:t.name,value:t.value,group:t.group})}),this.promisesRemote.length?void Promise.all(this.promisesRemote).then(function(t){t.forEach(function(t){return"ok"===t?void e.renderErrors():("error"===t.type&&alert("Server error occured. Please try later."),e.generateMessage(l,t.name),void e.renderErrors())})}):void this.renderErrors()},validateItem:function(e){var c=this,h=e.name,f=e.group,m=e.value,v=e.isKeyupChange,p=this.rules[h]||this.defaultRules[h]||!1;if(p)for(var g in p){var y=p[g];if(g!==t&&g!==d&&""==m)return;switch(g){case d:if("function"!=typeof y)break;if(y(h,m))break;return void this.generateMessage(d,h,y);case t:if(!y)break;if(f.length){var b=!1;if(f.forEach(function(e){c.validateRequired(e)&&(b=!0)}),b)break}else if(this.validateRequired(m))break;return void this.generateMessage(t,h);case i:if(!y)break;if(this.validateEmail(m))break;return void this.generateMessage(i,h);case r:if(!y)break;if(this.validateMinLength(m,y))break;return void this.generateMessage(r,h,y);case n:if(!y)break;if(this.validateMaxLength(m,y))break;return void this.generateMessage(n,h,y);case a:if(!y)break;if(this.validatePhone(m))break;return void this.generateMessage(a,h);case o:if(!y)break;if(this.validatePassword(m))break;return void this.generateMessage(o,h);case u:if(!y||"object"!==("undefined"==typeof y?"undefined":_typeof(y)))break;if(y["default"]&&this.validateStrengthPass(m))break;if(y.custom){var E=void 0;try{E=new RegExp(y.custom)}catch(w){E=this.REGEXP.strengthPass,console.error("Custom regexp for strength rule is not valid. Default regexp was used.")}if(E.test(m))break}return void this.generateMessage(u,h);case s:if(!y)break;if(this.validateZip(m))break;return void this.generateMessage(s,h);case l:if(v)break;if(!y)break;var k=y.url,_=y.successAnswer,P=y.method,R=y.sendParam,S=this.$form.querySelector('input[data-validate-field="'+h+'"]');return this.setterEventListener(S,"keyup",this.handlerKeyup,"remove"),void this.promisesRemote.push(this.validateRemote({name:h,value:m,url:k,method:P,sendParam:R,successAnswer:_}))}}},clearErrors:function(){for(var e=document.querySelectorAll(".js-validate-error-label"),t=0,i=e.length;t<i;++t)e[t].remove();e=document.querySelectorAll(".js-validate-error-field");for(var r=0,n=e.length;r<n;++r)e[r].classList.remove("js-validate-error-field"),e[r].style.border="",e[r].style.color=""},renderErrors:function(){var e=this;if(this.clearErrors(),this.unlockForm(),this.isValidationSuccess=!1,0===Object.keys(this.result).length)return void(this.isValidationSuccess=!0);for(var t in this.result){var i=this.result[t].message,r=this.$form.querySelectorAll('[data-validate-field="'+t+'"]'),n=r[r.length-1],o=document.createElement("div");if(o.innerHTML=i,o.className="js-validate-error-label",o.setAttribute("style","color: "+this.colorWrong),n.style.border="1px solid "+this.colorWrong,n.style.color=""+this.colorWrong,n.classList.add("js-validate-error-field"),"checkbox"===n.type||"radio"===n.type){var s=document.querySelector('label[for="'+n.getAttribute("id")+'"]');"label"===n.parentNode.tagName.toLowerCase()?n.parentNode.parentNode.insertBefore(o,null):s?s.parentNode.insertBefore(o,s.nextSibling):n.parentNode.insertBefore(o,n.nextSibling)}else n.parentNode.insertBefore(o,n.nextSibling)}this.tooltipSelectorWrap.length&&(this.state.tooltipsTimer=setTimeout(function(){e.hideTooltips()},this.tooltipFadeOutTime))},hideTooltips:function(){var e=this,t=document.querySelectorAll(".js-validate-error-label");t.forEach(function(t){t.classList.add(e.tooltipFadeOutClass)}),this.state.tooltipsTimer=null},lockForm:function(){for(var e=this.$form.querySelectorAll("input, textarea, button, select"),t=0,i=e.length;t<i;++t)e[t].setAttribute("disabled","disabled"),e[t].style.pointerEvents="none",e[t].style.webitFilter="grayscale(100%)",e[t].style.filter="grayscale(100%)"},unlockForm:function(){for(var e=this.$form.querySelectorAll("input, textarea, button, select"),t=0,i=e.length;t<i;++t)e[t].removeAttribute("disabled"),e[t].style.pointerEvents="",e[t].style.webitFilter="",e[t].style.filter=""}},e.JustValidate=f}(window);
73;function letterswithbasicpunc(name,value){return(value=='')||/^[a-zA-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ\-.,()'"\s]+$/i.test(value);}
74function valideCodePostal(name,value){return(value=='')||/^[0-9a-zA-Z ]{3,9}$/i.test(value);}
75function valideDateNaissance(name,value){var format=/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/i.test(value);
75var future=new Date(value)<new Date();return(value=='0000-00-00')||(format&&future);}
76function valideTelephone(name,value){return(value=='')||/^(\+){0,1}[0-9\ \-\.\(\)]{8,18}$/i.test(value);}
77function valideUsername(name,value){return(value=='')||/^[0-9a-zA-Z\-\_\.]{6,32}$/i.test(value);}
78function validePassword(name,value){return(value=='')||/^[0-9a-zA-Z\?\_\!\@\#]{6,20}$/i.test(value);}
79function hasAnsweredCaptcha(){return true;}
80function confirmmdp(name,value){var pass=document.getElementById('pass').value;if(pass==value){return true;}else{return false;}};new window.JustValidate('#contact',{rules:{motif:{required:true},civilite:{required:true},nom:{required:true,},prenom:{required:true,},objet:{required:true},message:{required:true},email:{required:true,email:true}},submitHandler:function(form,values,ajax){const el=document.getElementById('g-recaptcha-response');const siteKey=el?el.dataset.sitekey:null;if(typeof grecaptcha!=='undefined'&&typeof grecaptcha.execute==='function'&&siteKey!==null){grecaptcha.ready(function(){grecaptcha.execute(siteKey,{action:'contact'}).then(function(token){let recaptchaResponse=document.getElementById('g-recaptcha-response');if(recaptchaResponse){recaptchaResponse.value=token;}
81form.submit();});});}else{form.submit();}},messages:{motif:{required:'Ce champs est obligatoire'},civilite:{required:'Ce champs est obligatoire'},nom:{required:'Ce champs est obligatoire',},prenom:{required:'Ce champs est obligatoire',}
81,objet:{required:'Ce champs est obligatoire'},message:{required:'Ce champs est obligatoire'},email:{required:'Ce champs est obligatoire',email:'Veuillez saisir une adresse email valide.'}},});

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.