var c={};!function(f,r){f.noConflict();var s=document,o=window;f(s).ready(function(){c.showHide(),c.readMore(),c.email(),c.iframeResize(),c.headerHelper(),c.imgLinksHelper(),c.asideAnchors(),c.formStuff(),c.modal(),c.datepicker()}),c.debounce=function(i,n,r){var s;return function(){var e=this,t=arguments,a=r&&!s;clearTimeout(s),s=setTimeout(function(){s=null,r||i.apply(e,t)},n),a&&i.apply(e,t)}},c.pxValue=function(e){return e*parseFloat(f("body").css("font-size"))},c.showHide=function(){var r=f("body");f(".show-hide").each(function(){var t=f(this),a=f(t.data("target")),i=t.closest(".show-hide-collection");0===a.length&&(a=t.prev(".show-hide-target").add(t.next(".show-hide-target")));var e=a.find(".show-hide-close"),n=a.find("a, button");t.add(a).not(".default-active").removeClass("active"),t.hasClass("default-active")||n.attr("tabindex","-1"),t.add(e).off("click").on("click",function(e){if(a.hasClass("active")){if(0!==i.length&&!e.isTrigger)return!1;"header__burger"===t.attr("id")&&r.removeClass("freezed"),t.add(a).removeClass("active"),n.attr("tabindex","-1")}else f(".show-hide.show-hide-autoclose").filter(".active").trigger("click"),"header__burger"===t.attr("id")&&r.addClass("freezed"),t.add(a).addClass("active"),n.attr("tabindex","0"),0!==i.length&&i.find(".show-hide.active").not(t).trigger("click");return t.blur(),!1})}),f(s).on("click",function(e){var a=e.target?e.target:e.srcElement;f(".show-hide.show-hide-autoclose").filter(".active").each(function(){var e=f(this),t=f(e.data("target"));0===t.length&&(t=e.prev(".show-hide-target").add(e.next(".show-hide-target"))),f(a).closest(".show-hide-target").is(t)||e.trigger("click")})})},c.readMore=function(){f(".read-more").each(function(){var e=f(this),t=e.html(),a=e.text().replace(/([.?!])\s*(?=[A-Z])/g,"$1|").split("|");if(3<a.length){e.empty().append('<p class="read-more__short">'+a[0]+" "+a[1]+" "+a[2]+"</p>").append('<div class="read-more__full">'+t+"</div>").append('<button class="read-more__caller">lire la suite…</button>');var i=e.find(".read-more__short"),n=e.find(".read-more__full"),r=e.find(".read-more__caller");i.addClass("active"),r.on("click",function(){r.hasClass("active")?(r.removeClass("active").html("lire la suite…"),i.addClass("active"),n.removeClass("active")):(r.addClass("active").html("Refermer"),i.removeClass("active"),n.addClass("active")),r.blur()})}})},c.email=function(){f(".email").each(function(e){var t=f(this),a=t.data("title"),i=t.html(),n=i.split("[AT]")[0]+"@"+i.split("[AT]")[1].split("[DOT]")[0]+"."+i.split("[AT]")[1].split("[DOT]")[1];a===r&&(a=n),t.html('<a href="mailto:'+n+'">'+a+"</a>")})},c.iframeResize=function(){function e(){f(".iframe-container").each(function(){var e,t=f(this),a=t.find("iframe");e=(a.attr("height")!==r?parseInt(a.attr("height")):parseInt(a.css("height")))/(a.attr("width")!==r?parseInt(a.attr("width")):parseInt(a.css("width")))*100,t.css("padding-bottom",e+"%")})}f(o).on("resize",c.debounce(e,250)),e()},c.headerHelper=function(){function e(){i.css("position","fixed"),o.setTimeout(function(){a=parseInt(i.outerHeight()),n.css("padding-top",a)},400)}function t(){f(o).scrollTop()>a/4?i.addClass("header--sticky"):i.hasClass("header--sticky")&&(i.removeClass("header--sticky"),e())}var a,i=f("header"),n=f("body");n.css("padding-top",i.outerHeight()),f(o).on("resize",c.debounce(e,250)),e(),f(o).on("resize",c.debounce(t,250)),f(s).on("scroll",c.debounce(t,15)),t()},c.imgLinksHelper=function(){f(".list-offers__text, .list-au-numero__text, .list-catalogue--dossier .title--3").each(function(){var e=f(this),t=e.find("a"),a=e.siblings("img");a.on("click",function(){return t[0].click(),!1}),a.add(t).hover(function(){t.css("text-decoration","underline")},function(){t.css("text-decoration","none")})})},c.asideAnchors=function(){var i,n=f(".nav-anchors"),r=n.find("a"),s=r.map(function(){var e=f(f(this).attr("href"));if(e.length)return e});r.click(function(e){var t=f(this).attr("href"),a="#"===t?0:f(t).offset().top+1;f("html, body").stop().animate({scrollTop:a-100},400),e.preventDefault()}),r.eq(0).parent().addClass("active"),f(o).on("resize scroll",function(){var e=f(this).scrollTop(),t=s.map(function(){if(f(this).offset().top<e+100)return this}),a=(t=t[t.length-1])&&t.length?t[0].id:"";i!==a&&(i=a,r.parent().removeClass("active").end().filter('[href="#'+a+'"]').parent().addClass("active")),0===n.find(".active").length&&r.eq(0).parent().addClass("active")})},c.formStuff=function(){/*f(".input-number").each(function(){var e=f(this),a=e.find(".input-number__input"),i=parseInt(a.val())||1,t=e.find(".input-number__btn");a.on("blur",function(){isNaN(a.val())&&a.val(i)}),t.each(function(){f(this).on("click",function(e){e.preventDefault();var t=parseInt(a.val());isNaN(t)?a.val(i):f(this).hasClass("input-number__btn--plus")?a.val(t+1):1<t&&a.val(t-1)})})}),*/f(".show-hide-password").each(function(){var e=f(this),t=e.find("input"),a=e.find("button");a.on("click",function(e){e.preventDefault(),a.blur(),"text"===t.attr("type")?(t.attr("type","password"),a.removeClass("active")):"password"===t.attr("type")&&(t.attr("type","text"),a.addClass("active"))})})/*,f(".form--locked").each(function(){function t(e){e.prop("checked")&&i.attr("disabled",!1)}var e=f(this),a=e.find("input[type=radio]"),i=e.find("button[type=submit]");a.each(function(){var e=f(this);t(e),e.on("change",function(){t(e)})})})*/},f.modal.defaults.closeText="Fermer",f.modal.defaults.fadeDuration=150,c.modal=function(){/*f(".modal--no-close").on("click",function(e){e.preventDefault(),f(this).modal({escapeClose:!1,clickClose:!1,showClose:!1})}),*/f("#cookies--reloaded").modal({escapeClose:!1,clickClose:!1,showClose:!1}),f('button[rel="modal:open"]').on("click",function(e){e.preventDefault(),f(f(this).data("href")).modal()}),f('button[rel="modal:ajax"]').on("click",function(e){e.preventDefault(),f(".ajax-modal").remove(),f.get(f(this).data("href"),function(e){f(e).appendTo("body").modal()})})},c.datepicker=function(){var u={previousMonth:"Mois précédent",nextMonth:"Mois suivant",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],weekdays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]};
f(".input--datepicker").each(function(){var e=f(this);if(e.hasClass("input--datepicker-range-start")){function t(){o.setStartRange(i),c.setStartRange(i),c.setMinDate(i)}function a(){o.setEndRange(n),o.setMaxDate(n),c.setEndRange(n)}var i,n,r=e.data("range-id"),s=f('.input--datepicker-range-end[data-range-id="'+r+'"]'),
o=new Pikaday({field:e[0],firstDay:1,i18n:u,toString:function(e,t){return("0"+e.getDate()).slice(-2)+"/"+("0"+(e.getMonth()+1)).slice(-2)+"/"+e.getFullYear()},parse(dateString, format) {const parts = dateString.split('/');const day = parseInt(parts[0], 10);const month = parseInt(parts[1], 10) - 1;const year = parseInt(parts[2], 10);return new Date(year, month, day);},minDate:new Date,onSelect:function(){i=this.getDate(),t()}}),
c=new Pikaday({field:s[0],firstDay:1,i18n:u,toString:function(e,t){return("0"+e.getDate()).slice(-2)+"/"+("0"+(e.getMonth()+1)).slice(-2)+"/"+e.getFullYear()},parse(dateString, format) {const parts = dateString.split('/');const day = parseInt(parts[0], 10);const month = parseInt(parts[1], 10) - 1;const year = parseInt(parts[2], 10);return new Date(year, month, day);},minDate:new Date,onSelect:function(){n=this.getDate(),a()}}),l=o.getDate(),d=c.getDate();l&&(i=l,t()),d&&(n=d,a())}
else {if(e.hasClass("input--datepicker-no-range"))
new Pikaday({field:e[0],firstDay:1,i18n:u,toString:function(e,t){return("0"+e.getDate()).slice(-2)+"/"+("0"+(e.getMonth()+1)).slice(-2)+"/"+e.getFullYear()},parse(dateString, format) {const parts = dateString.split('/');const day = parseInt(parts[0], 10);const month = parseInt(parts[1], 10) - 1;const year = parseInt(parts[2], 10);return new Date(year, month, day);},maxDate:new Date})
else{if(!e.hasClass("input--datepicker-range-end"))
	new Pikaday({field:e[0],firstDay:1,i18n:u,toString:function(e,t){return("0"+e.getDate()).slice(-2)+"/"+("0"+(e.getMonth()+1)).slice(-2)+"/"+e.getFullYear()},parse(dateString, format) {const parts = dateString.split('/');const day = parseInt(parts[0], 10);const month = parseInt(parts[1], 10) - 1;const year = parseInt(parts[2], 10);return new Date(year, month, day);},minDate:new Date})
	}}
})}}(jQuery);
	
	
//# sourceMappingURL=base.min.map