1 2!function(e){"use strict";var t={i18n:{ru:{months:["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"],dayOfWeek:["ÐÑк","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Åubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Ãar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มà¸à¸£à¸²à¸à¸¡","à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹","มีà¸à¸²à¸à¸¡","à¹à¸¡à¸©à¸²à¸¢à¸","à¸à¸¤à¸©à¸ าà¸à¸¡","มิà¸à¸¸à¸à¸²à¸¢à¸","à¸à¸£à¸à¸à¸²à¸à¸¡","สิà¸à¸«à¸²à¸à¸¡","à¸à¸±à¸à¸¢à¸²à¸¢à¸","à¸à¸¸à¸¥à¸²à¸à¸¡","à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸","à¸à¸±à¸à¸§à¸²à¸à¸¡"],dayOfWeek:["à¸à¸².","à¸.","à¸.","à¸.","à¸à¸¤.","ศ.","ส."]},pl:{months:["styczeÅ","luty","marzec","kwiecieÅ","maj","czerwiec","lipiec","sierpieÅ","wrzesieÅ","październik","listopad","grudzieÅ"],dayOfWeek:["nd","pn","wt","År","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["䏿","äºæ","䏿","åæ","äºæ","å æ","䏿","å «æ","乿","åæ","å䏿","åäºæ"],dayOfWeek:["æ¥","ä¸","äº","ä¸","å","äº","å "]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","MÃ¥n","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1ì","2ì","3ì","4ì","5ì","6ì","7ì","8ì","9ì","10ì","11ì","12ì"],dayOfWeek:["ì¼","ì","í","ì","목","ê¸","í "]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","ons","Tor","Fre","lør"]},ja:{months:["1æ","2æ","3æ","4æ","5æ","6æ","7æ","8æ","9æ","10æ","11æ","12æ"],dayOfWeek:["æ¥","æ","ç«","æ°´","æ¨","é","å"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,closeOnDateSelect:!1,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",roundTime:"round",className:"",weekends:[],yearOffset:0};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,a=this.length;a>n;n++)if(this[n]===e)return n;return-1}),e.fn.xdsoftScroller=function(t){return this.each(function(){var n=e(this);if(!e(this).hasClass("xdsoft_scroller_box")){var a=function(e){var t={x:0,y:0};if("touchstart"==e.type||"touchmove"==e.type||"touchend"==e.type||"touchcancel"==e.type){var n=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];t.x=n.pageX,t.y=n.pageY}else"mousedown"!=e.type&&"mouseup"!=e.type&&"mousemove"!=e.type&&"mouseover"!=e.type&&"mouseout"!=e.type&&"mouseenter"!=e.type&&"mouseleave"!=e.type||(t.x=e.pageX,t.y=e.pageY);return t},r=0,o=n.children().eq(0),s=n[0].clientHeight,i=o[0].offsetHeight,d=e('<div class="xdsoft_scrollbar"></div>'),u=e('<div class="xdsoft_scroller"></div>'),c=100,l=!1;d.append(u),n.addClass("xdsoft_scroller_box").append(d),u.on("mousedown.xdsoft_scroller",function(a){s||n.trigger("resize_scroll.xdsoft_scroller",[t]);
2var o=a.pageY,i=parseInt(u.css("margin-top")),l=d[0].offsetHeight;e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function f(){e([document.body,window]).off("mouseup.xdsoft_scroller",f).off("mousemove.xdsoft_scroller",r).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",r=function(e){var t=e.pageY-o+i;0>t&&(t=0),t+u[0].offsetHeight>l&&(t=l-u[0].offsetHeight),n.trigger("scroll_element.xdsoft_scroller",[c?t/c:0])})}),n.on("scroll_element.xdsoft_scroller",function(e,t){s||n.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:0>t||isNaN(t)?0:t,u.css("margin-top",c*t),o.css("marginTop",-parseInt((i-s)*t))}).on("resize_scroll.xdsoft_scroller",function(e,t,a){s=n[0].clientHeight,i=o[0].offsetHeight;var r=s/i,l=r*d[0].offsetHeight;r>1?u.hide():(u.show(),u.css("height",parseInt(l>10?l:10)),c=d[0].offsetHeight-u[0].offsetHeight,a!==!0&&n.trigger("scroll_element.xdsoft_scroller",[t?t:Math.abs(parseInt(o.css("marginTop")))/(i-s)]))}),n.mousewheel&&n.mousewheel(function(e,t,a,r){var d=Math.abs(parseInt(o.css("marginTop")));return n.trigger("scroll_element.xdsoft_scroller",[(d-20*t)/(i-s)]),e.stopPropagation(),!1}),n.on("touchstart",function(e){l=a(e)}),n.on("touchmove",function(e){if(l){var t=a(e),r=Math.abs(parseInt(o.css("marginTop")));n.trigger("scroll_element.xdsoft_scroller",[(r-(t.y-l.y))/(i-s)]),e.stopPropagation(),e.preventDefault()}}),n.on("touchend touchcancel",function(e){l=!1})}n.trigger("resize_scroll.xdsoft_scroller",[t])})},e.fn.datetimepicker=function(n){var a=48,r=57,o=96,s=105,i=17,d=46,u=13,c=27,l=8,f=37,m=38,h=39,g=40,p=9,x=116,v=65,y=67,D=86,T=90,w=89,b=!1,_=e.isPlainObject(n)||!n?e.extend(!0,{},t,n):e.extend({},t),M=0,k=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(n){e.is(":disabled")||e.is(":hidden")||!e.is(":visible")||e.data("xdsoft_datetimepicker")||(clearTimeout(M),M=setTimeout(function(){e.data("xdsoft_datetimepicker")||S(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})},S=function(t){function n(){var e=_.value?_.value:t&&t.val&&t.val()?t.val():"";return e&&W.isValidDate(e=Date.parseDate(e,_.format))?M.data("changed",!0):e="",e||_.startDate===!1||(e=W.strToDateTime(_.startDate)),e?e:0}var M=e("<div "+(_.id?'id="'+_.id+'"':"")+" "+(_.style?'style="'+_.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_noselect '+_.className+'"></div>'),k=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),S=e('<div class="xdsoft_datepicker active"></div>'),O=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span></div><div class="xdsoft_label xdsoft_year"><span></span></div><button type="button" class="xdsoft_next"></button></div>'),F=e('<div class="xdsoft_calendar"></div>'),I=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),C=I.find(".xdsoft_time_box").eq(0),H=e('<div class="xdsoft_time_variant"></div>'),Y=e('<div class="xdsoft_scrollbar"></div>'),P=(e('<div class="xdsoft_scroller"></div>'),e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>')),A=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>');O.find(".xdsoft_month span").after(P),O.find(".xdsoft_year span").after(A),O.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){O.find(".xdsoft_select").hide();var n=e(this).find(".xdsoft_select").eq(0),a=0,r=0;W.currentTime&&(a=W.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n.show();for(var o=n.find("div.xdsoft_option"),s=0;s<o.length&&o.eq(s).data("value")!=a;s++)r+=o[0].offsetHeight;return n.xdsoftScroller(r/(n.children()[0].offsetHeight-n[0].clientHeight)),t.stopPropagation(),!1}),O.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(t){W&&W.currentTime&&W.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),M.trigger("xchange.xdsoft"),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input"))}),M.setOptions=function(n){if(_=e.extend(!0,{},_,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(_.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(_.weekends=e.extend(!0,[],n.weekends)),!_.open&&!_.opened||_.inline||t.trigger("open.xdsoft"),_.inline&&(M.addClass("xdsoft_inline"),t.after(M).hide(),M.trigger("afterOpen.xdsoft")),_.inverseButton&&(_.next="xdsoft_prev",_.prev="xdsoft_next"),_.datepicker?S.addClass("active"):S.removeClass("active"),_.timepicker?I.addClass("active"):I.removeClass("active"),_.value&&(t&&t.val&&t.val(_.value),W.setCurrentTime(_.value)),isNaN(_.dayOfWeekStart)||parseInt(_.dayOfWeekStart)<0||parseInt(_.dayOfWeekStart)>6?_.dayOfWeekStart=0:_.dayOfWeekStart=parseInt(_.dayOfWeekStart),_.timepickerScrollbar||Y.hide(),_.minDate&&/^-(.*)$/.test(_.minDate)&&(_.minDate=W.strToDateTime(_.minDate).dateFormat(_.formatDate)),_.maxDate&&/^\+(.*)$/.test(_.maxDate)&&(_.maxDate=W.strToDateTime(_.maxDate).dateFormat(_.formatDate)),O.find(".xdsoft_today_button").css("visibility",_.todayButton?"visible":"hidden"),_.mask){var k=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();
2return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(n){return 0}},F=function(e,t){var e="string"==typeof e||e instanceof String?document.getElementById(e):e;if(!e)return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd(t),n.moveStart(t),n.select(),!0}return e.setSelectionRange?(e.setSelectionRange(t,t),!0):!1},C=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return RegExp(n).test(t)};switch(t.off("keydown.xdsoft"),!0){case _.mask===!0:_.mask=_.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59");case"string"==e.type(_.mask):C(_.mask,t.val())||t.val(_.mask.replace(/[0-9]/g,"_")),t.on("keydown.xdsoft",function(n){var M=this.value,S=n.which;switch(!0){case S>=a&&r>=S||S>=o&&s>=S||S==l||S==d:var O=k(this),I=S!=l&&S!=d?String.fromCharCode(S>=o&&s>=S?S-a:S):"_";for(S!=l&&S!=d||!O||(O--,I="_");/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;if(M=M.substr(0,O)+I+M.substr(O+1),""==e.trim(M))M=_.mask.replace(/[0-9]/g,"_");else if(O==_.mask.length)break;for(O+=S==l||S==d?0:1;/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;C(_.mask,M)?(this.value=M,F(this,O)):""==e.trim(M)?this.value=_.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft");break;case!!~[v,y,D,T,w].indexOf(S)&&b:case!!~[c,m,g,f,h,x,i,p,u].indexOf(S):return!0}return n.preventDefault(),!1})}}_.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){_.allowBlank&&!e.trim(e(this).val()).length?(e(this).val(null),M.data("xdsoft_datetime").empty()):Date.parseDate(e(this).val(),_.format)?M.data("xdsoft_datetime").setCurrentTime(e(this).val()):(e(this).val(W.now().dateFormat(_.format)),M.data("xdsoft_datetime").setCurrentTime(e(this).val())),M.trigger("changedatetime.xdsoft")}),_.dayOfWeekStartPrev=0==_.dayOfWeekStart?6:_.dayOfWeekStart-1,M.trigger("xchange.xdsoft")},M.data("options",_).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),A.hide(),P.hide(),!1});var N=I.find(".xdsoft_time_box");N.append(H),N.xdsoftScroller(),M.on("afterOpen.xdsoft",function(){N.xdsoftScroller()}),M.append(S).append(I),_.withoutCopyright!==!0&&M.append(k),S.append(O).append(F),e("body").append(M);var W=new function(){var e=this;e.now=function(){var e=new Date;return _.yearOffset&&e.setFullYear(e.getFullYear()+_.yearOffset),e},e.currentTime=this.now(),e.isValidDate=function(e){return"[object Date]"!==Object.prototype.toString.call(e)?!1:!isNaN(e.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strToDateTime(t):e.isValidDate(t)?t:e.now(),M.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var t=e.currentTime.getMonth()+1;return 12==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),t=0),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.prevMonth=function(){var t=e.currentTime.getMonth()-1;return-1==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),t=11),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.strToDateTime=function(t){var n,a,r=[];return(r=/^(\+|\-)(.*)$/.exec(t))&&(r[2]=Date.parseDate(r[2],_.formatDate))?(n=r[2].getTime()-1*r[2].getTimezoneOffset()*6e4,a=new Date(W.now().getTime()+parseInt(r[1]+"1")*n)):a=t?Date.parseDate(t,_.format):e.now(),e.isValidDate(a)||(a=e.now()),a},e.strtodate=function(t){var n=t?Date.parseDate(t,_.formatDate):e.now();return e.isValidDate(n)||(n=e.now()),n},e.strtotime=function(t){var n=t?Date.parseDate(t,_.formatTime):e.now();return e.isValidDate(n)||(n=e.now()),n},e.str=function(){return e.currentTime.dateFormat(_.format)}};O.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){M.data("changed",!0),W.setCurrentTime(0),M.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(W.str()),M.trigger("close.xdsoft")}),O.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1;!function r(e){W.currentTime.getMonth();t.hasClass(_.next)?W.nextMonth():t.hasClass(_.prev)&&W.prevMonth(),!a&&(n=setTimeout(r,e?e:100))}(500),e([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",o)})}),I.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1,r=110;!function o(e){var s=C[0].clientHeight,i=H[0].offsetHeight,d=Math.abs(parseInt(H.css("marginTop")));t.hasClass(_.next)&&i-s-_.timeHeightInTimePicker>=d?H.css("marginTop","-"+(d+_.timeHeightInTimePicker)+"px"):t.hasClass(_.prev)&&d-_.timeHeightInTimePicker>
2=0&&H.css("marginTop","-"+(d-_.timeHeightInTimePicker)+"px"),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(i-s))]),r=r>10?10:r-10,!a&&(n=setTimeout(o,e?e:r))}(500),e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",s)})});var z=0;M.on("xchange.xdsoft",function(t){clearTimeout(z),z=setTimeout(function(){for(var t="",n=new Date(W.currentTime.getFullYear(),W.currentTime.getMonth(),1,12,0,0),a=0,r=W.now();n.getDay()!=_.dayOfWeekStart;)n.setDate(n.getDate()-1);t+="<table><thead><tr>";for(var o=0;7>o;o++)t+="<th>"+_.i18n[_.lang].dayOfWeek[o+_.dayOfWeekStart>6?0:o+_.dayOfWeekStart]+"</th>";t+="</tr></thead>",t+="<tbody><tr>";var s=!1,i=!1;_.maxDate!==!1&&(s=W.strtodate(_.maxDate),s=new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59,999)),_.minDate!==!1&&(i=W.strtodate(_.minDate),i=new Date(i.getFullYear(),i.getMonth(),i.getDate()));for(var d,u,c,l=[];a<W.currentTime.getDaysInMonth()||n.getDay()!=_.dayOfWeekStart||W.currentTime.getMonth()==n.getMonth();)l=[],a++,d=n.getDate(),u=n.getFullYear(),c=n.getMonth(),l.push("xdsoft_date"),(s!==!1&&n>s||i!==!1&&i>n)&&l.push("xdsoft_disabled"),W.currentTime.getMonth()!=c&&l.push("xdsoft_other_month"),(_.defaultSelect||M.data("changed"))&&W.currentTime.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_current"),r.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_today"),(0==n.getDay()||6==n.getDay()||~_.weekends.indexOf(n.dateFormat("d.m.Y")))&&l.push("xdsoft_weekend"),_.beforeShowDay&&"function"==typeof _.beforeShowDay&&l.push(_.beforeShowDay(n)),t+='<td data-date="'+d+'" data-month="'+c+'" data-year="'+u+'" class="xdsoft_date xdsoft_day_of_week'+n.getDay()+" "+l.join(" ")+'"><div>'+d+"</div></td>",n.getDay()==_.dayOfWeekStartPrev&&(t+="</tr>"),n.setDate(d+1);t+="</tbody></table>",F.html(t),O.find(".xdsoft_label span").eq(0).text(_.i18n[_.lang].months[W.currentTime.getMonth()]),O.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear());var f="",m="",c="",h=function(e,t){var n=W.now();n.setHours(e),e=parseInt(n.getHours()),n.setMinutes(t),t=parseInt(n.getMinutes()),l=[],(_.maxTime!==!1&&W.strtotime(_.maxTime).getTime()<n.getTime()||_.minTime!==!1&&W.strtotime(_.minTime).getTime()>n.getTime())&&l.push("xdsoft_disabled"),(_.initTime||_.defaultSelect||M.data("changed"))&&parseInt(W.currentTime.getHours())==parseInt(e)&&(_.step>59||Math[_.roundTime](W.currentTime.getMinutes()/_.step)*_.step==parseInt(t))&&(_.defaultSelect||M.data("changed")?l.push("xdsoft_current"):_.initTime&&l.push("xdsoft_init_time")),parseInt(r.getHours())==parseInt(e)&&parseInt(r.getMinutes())==parseInt(t)&&l.push("xdsoft_today"),f+='<div class="xdsoft_time '+l.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+n.dateFormat(_.formatTime)+"</div>"};if(_.allowTimes&&e.isArray(_.allowTimes)&&_.allowTimes.length)for(var a=0;a<_.allowTimes.length;a++)m=W.strtotime(_.allowTimes[a]).getHours(),c=W.strtotime(_.allowTimes[a]).getMinutes(),h(m,c);else for(var a=0,o=0;a<(_.hours12?12:24);a++)for(o=0;60>o;o+=_.step)m=(10>a?"0":"")+a,c=(10>o?"0":"")+o,h(m,c);H.html(f);var g="",a=0;for(a=parseInt(_.yearStart,10)+_.yearOffset;a<=parseInt(_.yearEnd,10)+_.yearOffset;a++)g+='<div class="xdsoft_option '+(W.currentTime.getFullYear()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+a+"</div>";for(A.children().eq(0).html(g),a=0,g="";11>=a;a++)g+='<div class="xdsoft_option '+(W.currentTime.getMonth()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+_.i18n[_.lang].months[a]+"</div>";P.children().eq(0).html(g),e(this).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(_.timepicker){var e;if(H.find(".xdsoft_current").length?e=".xdsoft_current":H.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e){var t=C[0].clientHeight,n=H[0].offsetHeight,a=H.find(e).index()*_.timeHeightInTimePicker+1;a>n-t&&(a=n-t),H.css("marginTop","-"+parseInt(a)+"px"),C.trigger("scroll_element.xdsoft_scroller",[parseInt(a)/(n-t)])}}});var J=0;F.on("click.xdsoft","td",function(n){n.stopPropagation(),J++;var a=e(this),r=W.currentTime;return a.hasClass("xdsoft_disabled")?!1:(r.setDate(a.data("date")),r.setMonth(a.data("month")),r.setFullYear(a.data("year")),M.trigger("select.xdsoft",[r]),t.val(W.str()),(J>1||_.closeOnDateSelect===!0||0===_.closeOnDateSelect&&!_.timepicker)&&!_.inline&&M.trigger("close.xdsoft"),_.onSelectDate&&_.onSelectDate.call&&_.onSelectDate.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),M.trigger("changedatetime.xdsoft"),void setTimeout(function(){J=0},200))}),H.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),a=W.currentTime;return n.hasClass("xdsoft_disabled")?!1:(a.setHours(n.data("hour")),a.setMinutes(n.data("minute")),M.trigger("select.xdsoft",[a]),M.data("input").val(W.str()),!_.inline&&M.trigger("close.xdsoft"),_.onSelectTime&&_.onSelectTime.call&&_.onSelectTime.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),void M.trigger("changedatetime.xdsoft"))}),M.mousewheel&&S.mousewheel(function(e,t,n,a){return _.scrollMonth?(0>t?W.nextMonth():W.prevMonth(),!1):!0}),M.mousewheel&&C.unmousewheel().mousewheel(function(e,t,n,a){if(!_.scrollTime)return!0;var r=C[0].clientHeight,o=H[0].offsetHeight,s=Math.abs(parseInt(H.css("marginTop"))),i=!0;return 0>t&&o-r-_.timeHeightInTimePicker>=s?(H.css("marginTop","-"+(s+_.timeHeightInTimePicker)+"px"),i=!1):t>0&&s-_.timeHeightInTimePicker>=0&&(H.css("marginTop","-"+(s-_.timeHeightInTimePicker)+"px"),i=!1),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(o-r))]),e.stopPropagation(),i}),M.on("changedatetime.xdsoft",function(){if(_.onChangeDateTime&&_.onChangeDateTime.call){var e=M.data("input");_.onChangeDateTime.call(M,W.currentTime,e),e.trigger("change")}}).on("generate.xdsoft",function(){_.onGenerate&&_.onGenerate.call&&_.onGenerate.call(M,W.currentTime,M.data("input"))});var j=0;t.mousewheel&&t.mousewheel(function(e,n,a,r){return _.scrollInput?!_.datepicker&&_.timepicker?(j=H.find(".xdsoft_current").length?H.find(".xdsoft_current").eq(0).index():0,j+n>=0&&j+n<H.children().length&&(j+=n),H.children().eq(j).length&&H.
2children().eq(j).trigger("mousedown"),!1):_.datepicker&&!_.timepicker?(S.trigger(e,[n,a,r]),t.val&&t.val(W.str()),M.trigger("changedatetime.xdsoft"),!1):void 0:!0});var L=function(){var t=M.data("input").offset(),n=t.top+M.data("input")[0].offsetHeight-1,a=t.left;n+M[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(n=t.top-M[0].offsetHeight+1),0>n&&(n=0),a+M[0].offsetWidth>e(window).width()&&(a=t.left-M[0].offsetWidth+M.data("input")[0].offsetWidth),M.css({left:a,top:n})};M.on("open.xdsoft",function(){var t=!0;_.onShow&&_.onShow.call&&(t=_.onShow.call(M,W.currentTime,M.data("input"))),t!==!1&&(M.show(),M.trigger("afterOpen.xdsoft"),L(),e(window).off("resize.xdsoft",L).on("resize.xdsoft",L),_.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function n(){M.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",n)}))}).on("close.xdsoft",function(e){var t=!0;_.onClose&&_.onClose.call&&(t=_.onClose.call(M,W.currentTime,M.data("input"))),t===!1||_.opened||_.inline||M.hide(),e.stopPropagation()}).data("input",t);var E=0;M.data("xdsoft_datetime",W),M.setOptions(_),W.setCurrentTime(n()),M.trigger("afterOpen.xdsoft"),t.data("xdsoft_datetimepicker",M).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(e){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(clearTimeout(E),E=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(W.setCurrentTime(n()),M.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n=(this.value,t.which);switch(!0){case!!~[u].indexOf(n):var a=e("input:visible,textarea:visible");return M.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1;case!!~[p].indexOf(n):return M.trigger("close.xdsoft"),!0}})},O=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())};return e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode==i&&(b=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode==i&&(b=!1)}),this.each(function(){var t;if(t=e(this).data("xdsoft_datetimepicker")){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"destroy":O(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,_.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(n);return 0}"string"!==e.type(n)&&(!_.lazyInit||_.open||_.inline?S(e(this)):k(e(this)))})}}(jQuery),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){if("unixtime"==e)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[e]&&Date.createNewFormat(e);var t=Date.formatFunctions[e];return this[t]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(e){switch(e){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(e)+"' + "}},Date.parseDate=function(e,t){if("unixtime"==t)return new Date(isNaN(parseInt(e))?0:1e3*parseInt(e));null==Date.parseFunctions[t]&&Date.createParser(t);var n=Date.parseFunctions[t];return Date[n](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i =
2-1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}},Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t<this.getMonth();++t)e+=Date.daysInMonth[t];return e+this.getDate()},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),n=7-t.getDay()+4;return String.leftPad(Math.ceil((e-n)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return 0>e?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return 0>e?e+7:e},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,n){var a=new String(e);for(null==n&&(n=" ");a.length<t;)a=n+a;return a},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
2ay","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1, 3Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"},function(e){"function"==typeof define&&define.amd?define(["jquery.flot.min"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var r,o=t||window.event,s=[].slice.call(arguments,1),i=0,d=0,u=0,c=0,l=0;return t=e.event.fix(o),t.type="mousewheel",o.wheelDelta&&(i=o.wheelDelta),o.detail&&(i=-1*o.detail),o.deltaY&&(u=-1*o.deltaY,i=u),o.deltaX&&(d=o.deltaX,i=-1*d),void 0!==o.wheelDeltaY&&(u=o.wheelDeltaY),void 0!==o.wheelDeltaX&&(d=-1*o.wheelDeltaX),c=Math.abs(i),(!n||n>c)&&(n=c),l=Math.max(Math.abs(u),Math.abs(d)),(!a||a>l)&&(a=l),r=i>0?"floor":"ceil",i=Math[r](i/n),d=Math[r](d/a),u=Math[r](u/a),s.unshift(t,i,d,u),(e.event.dispatch||e.event.handle).apply(this,s)}var n,a,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var s=r.length;s;)e.event.fixHooks[r[--s]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}); 4function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||O,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(D,0)?e.substr(D.length):e}var n=1,r={},s={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if("undefined"==typeof e||"undefined"==typeof e[0])return i;for(s=e[0].attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.is("["+t+i+"]")},setAttr:function(e,t,i,n){e[0].setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+n++},deserializeValue:function(t){var i;try{return t?"true"==t||("false"==t?!1:"null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){r[e]||(r[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){r={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}()},a=s,o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focu
4s:"first",trigger:!1,errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){};l.prototype={asyncSupport:!0,actualizeOptions:function(){return a.attr(this.$element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return this.parent?this.parent.trigger(e,t,i):!0},reset:function(){if("ParsleyForm"!==this.__class__)return this._trigger("reset");for(var e=0;e<this.fields.length;e++)this.fields[e]._trigger("reset");this._trigger("reset")},destroy:function(){if("ParsleyForm"!==this.__class__)return this.$element.removeData("Parsley"),this.$element.removeData("ParsleyFieldMultiple"),void this._trigger("destroy");for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?this.parent.$element.find("["+this.options.namespace+'multiple="'+this.options.multiple+'"]'):this.$element}};var u={string:function(e){return e},integer:function(e){if(isNaN(e))throw'Requirement is not an integer: "'+e+'"';return parseInt(e,10)},number:function(e){if(isNaN(e))throw'Requirement is not a number: "'+e+'"';return parseFloat(e)},reference:function(t){var i=e(t);if(0===i.length)throw'No such reference: "'+t+'"';return i},"boolean":function(e){return"false"!==e},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},d=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},h=function(e,t){var i=u[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';return i(t)},p=function(e,t,i){var n=null,r={};for(var s in e)if(s){var a=i(s);"string"==typeof a&&(a=h(e[s],a)),r[s]=a}else n=h(e[s],t);return[n,r]},f=function(t){e.extend(!0,this,t)};f.prototype={validate:function(t,i){if(this.fn)return arguments.length>3&&(i=[].slice.call(arguments,1,-1)),this.fn.call(this,t,i);if(e.isArray(t)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}if(this.validateNumber)return isNaN(t)?!1:(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return e.isArray(t)?t:[t];var n=this.requirementType;if(e.isArray(n)){for(var r=d(t,n.length),s=0;s<r.length;s++)r[s]=h(n[s],r[s]);return r}return e.isPlainObject(n)?p(n,t,i):[h(n,t)]},requirementType:"string",priority:2};var c=function(e,t){this.__class__="ParsleyValidatorRegistry",this.locale="en",this.init(e||{},t||{})},m={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};m.range=m.number;var y=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0};c.prototype={init:function(t,i){this.catalog=i,this.validators=e.extend({},this.validators);for(var n in t)this.addValidator(n,t[n].fn,t[n].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)}
4,updateValidator:function(e,t,i){return this.validators[e]?this._setValidator(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new f(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"1":n,s=i.base,a=void 0===s?0:s,o=m[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.pow(10,Math.max(y(r),y(a)));if((l*u-a*u)%(r*u)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:{validateNumber:function(e,t){return e>=t},requirementType:"number",priority:30},max:{validateNumber:function(e,t){return t>=e},requirementType:"number",priority:30},range:{validateNumber:function(e,t,i){return e>=t&&i>=e},requirementType:["number","number"],priority:30},equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var g=function(e){this.__class__="ParsleyUI"};g.prototype={listen:function(){var e=this;return window.Parsley.on("form:init",function(t){e.setupForm(t)}).on("field:init",function(t){e.setupField(t)}).on("field:validated",function(t){e.reflow(t)}).on("form:validated",function(t){e.focus(t)}).on("field:reset",function(t){e.reset(t)}).on("form:destroy",function(t){e.destroy(t)}).on("field:destroy",function(t){e.destroy(t)}),this},reflow:function(e){if("undefined"!=typeof e._ui&&!1!==e._ui.active){var t=this._diff(e.validationResult,e._ui.lastValidationResult);e._ui.lastValidationResult=e.validationResult,this.manageStatusClass(e),this.manageErrorsMessages(e,t),this.actualizeTriggers(e),(t.kept.length||t.added.length)&&!0!==e._ui.failedOnce&&this.manageFailingFieldTrigger(e)}},getErrorsMessages:function(e){if(!0===e.validationResult)return[];for(var t=[],i=0;i<e.validationResult.length;i++)t.push(e.validationResult[i].errorMessage||this._getErrorMessage(e,e.validationResult[i].assert));return t},manageStatusClass:function(e){e.hasConstraints()&&e.needsValidation()&&!0===e.validationResult?this._successClass(e):e.validationResult.length>0?this._errorClass(e):this._resetClass(e)},manageErrorsMessages:function(t,i){if("undefined"==typeof t.options.errorsMessagesDisabled){if("undefined"!=typeof t.options.errorMessage)return i.added.length||i.kept.length?(this._insertErrorWrapper(t),0===t._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&t._ui.$errorsWrapper.append(e(t.options.errorTemplate).addClass("parsley-custom-error-message")),t._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(t.options.errorMessage)):t._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var n=0;n<i.removed.length;n++)this.removeError(t,i.removed[n].assert.name,!0);for(n=0;n<i.added.length;n++)this.addError(t,i.added[n].assert.name,i.added[n].errorMessage,i.added[n].assert,!0);for(n=0;n<i.kept.length;n++)this.updateError(t,i.kept[n].assert.name,i.kept[n].errorMessage,i.kept[n].assert,!0)}},addError:function(t,i,n,r,s){this._insertErrorWrapper(t),t._ui.$errorsWrapper.addClass("filled").append(e(t.options.errorTemplate).addClass("parsley-"+i).html(n||this._getErrorMessage(t,r))),!0!==s&&this._errorClass(t)},updateError:function(e,t,i,n,r){e._ui.$errorsWrapper.addClass("filled").find(".parsley-"+t).html(i||this._getErrorMessage(e,n)),!0!==r&&this._errorClass(e)},removeError:function(e,t,i){e._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+t).remove(),!0!==i&&this.manageStatusClass(e)},focus:function(e){if(e._focusedField=null,!0===e.validationResult||"none"===e.options.focus)return null;for(var t=0;t<e.fields.length;t++){var i=e.fields[t];
4if(!0!==i.validationResult&&i.validationResult.length>0&&"undefined"==typeof i.options.noFocus&&(e._focusedField=i.$element,"first"===e.options.focus))break}return null===e._focusedField?null:e._focusedField.focus()},_getErrorMessage:function(e,t){var i=t.name+"Message";return"undefined"!=typeof e.options[i]?window.Parsley.formatMessage(e.options[i],t.requirements):window.Parsley.getErrorMessage(t)},_diff:function(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:this._diff(t,e,!0).added}},setupForm:function(e){e.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),e.$element.on("click.Parsley",'input[type="submit"], button[type="submit"]',function(t){e.onSubmitButton(t)}),!1!==e.options.uiEnabled&&e.$element.attr("novalidate","")},setupField:function(t){var i={active:!1};!1!==t.options.uiEnabled&&(i.active=!0,t.$element.attr(t.options.namespace+"id",t.__id__),i.$errorClassHandler=this._manageClassHandler(t),i.errorsWrapperId="parsley-id-"+(t.options.multiple?"multiple-"+t.options.multiple:t.__id__),i.$errorsWrapper=e(t.options.errorsWrapper).attr("id",i.errorsWrapperId),i.lastValidationResult=[],i.validationInformationVisible=!1,t._ui=i,this.actualizeTriggers(t))},_manageClassHandler:function(t){if("string"==typeof t.options.classHandler&&e(t.options.classHandler).length)return e(t.options.classHandler);var i=t.options.classHandler(t);return"undefined"!=typeof i&&i.length?i:!t.options.multiple||t.$element.is("select")?t.$element:t.$element.parent()},_insertErrorWrapper:function(t){var i;if(0!==t._ui.$errorsWrapper.parent().length)return t._ui.$errorsWrapper.parent();if("string"==typeof t.options.errorsContainer){if(e(t.options.errorsContainer).length)return e(t.options.errorsContainer).append(t._ui.$errorsWrapper);a.warn("The errors container `"+t.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof t.options.errorsContainer&&(i=t.options.errorsContainer(t));if("undefined"!=typeof i&&i.length)return i.append(t._ui.$errorsWrapper);var n=t.$element;return t.options.multiple&&(n=n.parent()),n.after(t._ui.$errorsWrapper)},actualizeTriggers:function(e){var t=this,i=e._findRelated();if(i.off(".Parsley"),!1!==e.options.trigger){var n=e.options.trigger.replace(/^\s+/g,"").replace(/\s+$/g,"");""!==n&&i.on(n.split(" ").join(".Parsley ")+".Parsley",function(i){t.eventValidate(e,i)})}},eventValidate:function(e,t){/key/.test(t.type)&&!e._ui.validationInformationVisible&&e.getValue().length<=e.options.validationThreshold||e.validate()},manageFailingFieldTrigger:function(t){return t._ui.failedOnce=!0,t.options.multiple&&t._findRelated().each(function(){/change/i.test(e(this).parsley().options.trigger||"")||e(this).on("change.ParsleyFailedOnce",function(){t.validate()})}),t.$element.is("select")&&!/change/i.test(t.options.trigger||"")?t.$element.on("change.ParsleyFailedOnce",function(){t.validate()}):/keyup/i.test(t.options.trigger||"")?void 0:t.$element.on("keyup.ParsleyFailedOnce",function(){t.validate()})},reset:function(e){this.actualizeTriggers(e),e.$element.off(".ParsleyFailedOnce"),"undefined"!=typeof e._ui&&"ParsleyForm"!==e.__class__&&(e._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(e),e._ui.lastValidationResult=[],e._ui.val
4idationInformationVisible=!1,e._ui.failedOnce=!1)},destroy:function(e){this.reset(e),"ParsleyForm"!==e.__class__&&("undefined"!=typeof e._ui&&e._ui.$errorsWrapper.remove(),delete e._ui)},_successClass:function(e){e._ui.validationInformationVisible=!0,e._ui.$errorClassHandler.removeClass(e.options.errorClass).addClass(e.options.successClass)},_errorClass:function(e){e._ui.validationInformationVisible=!0,e._ui.$errorClassHandler.removeClass(e.options.successClass).addClass(e.options.errorClass)},_resetClass:function(e){e._ui.$errorClassHandler.removeClass(e.options.successClass).removeClass(e.options.errorClass)}};var v=function(t,i,n){this.__class__="ParsleyForm",this.__id__=a.generateID(),this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},_={pending:null,resolved:!0,rejected:!1};v.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley)return this._$submitSource=this._$submitSource||this.$element.find('input[type="submit"], button[type="submit"]').first(),this._$submitSource.is("[formnovalidate]")?void(this._$submitSource=null):(e.stopImmediatePropagation(),e.preventDefault(),this.whenValidate({event:e}).done(function(){t._submit()}).always(function(){t._$submitSource=null}),this)},onSubmitButton:function(t){this._$submitSource=e(t.target)},_submit:function(){!1!==this._trigger("submit")&&(this.$element.find(".parsley_synthetic_submit_button").remove(),this._$submitSource&&e('<input class="parsley_synthetic_submit_button" type="hidden">').attr("name",this._$submitSource.attr("name")).attr("value",this._$submitSource.attr("value")).appendTo(this.$element),this.$element.trigger(e.extend(e.Event("submit"),{parsley:!0})))},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return _[this.whenValidate(t).state()]},whenValidate:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force,s=i.event;this.submitEvent=s,s&&(this.submitEvent.preventDefault=function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),t.validationResult=!1}),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var o=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValidate({force:r,group:n})})}),l=function(){var i=e.Deferred();return!1===t.validationResult&&i.reject(),i.resolve().promise()};return e.when.apply(e,_toConsumableArray(o)).done(function(){t._trigger("success")}).fail(function(){t.validationResult=!1,t._trigger("error")}).always(function(){t._trigger("validated")}).pipe(l,l)},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return _[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return e.when.apply(e,_toConsumableArray(s))},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);"ParsleyField"!==n.__class__&&"ParsleyFieldMultiple"!==n.__class__||!0===n.options.excluded||"undefined"==typeof t.fieldsMappedById[n.__class__+"-"+n.__id__]&&(t.fieldsMappedById[n.__class__+"-"+n.__id__]=n,t.fields.push(n))}),e(i).not(t.fields).each(function(e,t){t._trigger("reset")})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var w=function(t,i,n,r,s){if(!/ParsleyField/.test(t.__class__))throw new Error("ParsleyField or ParsleyFieldMultiple instance expected");var a=window.Parsley._validatorRegistry.validators[i],o=new f(a);e.extend(this,{validator:o,name:i,requirements:n,priority:r||t.options[i+"Priority"]||o.priority,isDomConstraint:!0===s}),this._parseRequirements(t.options)},b=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};w.prototype={validate:function(e,t){var i=this.requirementList.slice(0);return i.unshift(e),i.push(t),this.validator.validate.apply(this.validator,i)},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+b(i)]})}};var F=function(t,i,n,r){this.__class__="ParsleyField",this.__id__=a.generateID(),this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=[],this._bindConstraints()},$={pending:null,resolved:!0,rejected:!1};F.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;
4switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=t.force,n=t.group;return this.refreshConstraints(),!n||this._isInGroup(n)?(this.value=this.getValue(),this._trigger("validate"),this.whenValid({force:i,value:this.value,_refreshed:!0}).done(function(){e._trigger("success")}).fail(function(){e._trigger("error")}).always(function(){e._trigger("validated")})):void 0},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return e.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return s?$[s.state()]:!0},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0===n?!1:n,s=i.value,a=i.group,o=i._refreshed;if(o||this.refreshConstraints(),!a||this._isInGroup(a)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if("undefined"!=typeof s&&null!==s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var l=this._getGroupedConstraints(),u=[];return e.each(l,function(i,n){var r=e.when.apply(e,_toConsumableArray(e.map(n,function(e){return t._validateConstraint(s,e)})));return u.push(r),"rejected"===r.state()?!1:void 0}),e.when.apply(e,u)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),e.when(r).fail(function(e){!0===n.validationResult&&(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new w(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){(this.$element.hasClass("required")||this.$element.attr("required"))&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),"undefined"!=typeof this.$element.attr("min")&&"undefined"!=typeof this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):"undefined"!=typeof this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):"undefined"!=typeof this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0),"undefined"!=typeof this.$element.attr("minlength")&&"undefined"!=typeof this.$element.attr("maxlength")?this.addConstraint("length",[this.$element.attr("minlength"),this.$element.attr("maxlength")],void 0,!0):"undefined"!=typeof this.$element.attr("minlength")?this.addConstraint("minlength",this.$element.attr("minlength"),void 0,!0):"undefined"!=typeof this.$element.attr("maxlength")&&this.addConstraint("maxlength",this.$element.attr("maxlength"),void 0,!0);var e=this.$element.attr("type");return"undefined"==typeof e?this:"number"===e?this.addConstraint("type",["number",{step:this.$element.attr("step"),base:this.$element.attr("min")||this.$element.attr("value")}],void 0,!0):/^(email|url|range)$/i.test(e)?this.addConstraint("type",e,void 0,!0):this},_isRequired:function(){return"undefined"==typeof this.constraintsByName.required?!1:!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=a.trimString(e)),e},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var C=F,P=function(){this.__class__="ParsleyFieldMultiple"};P.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("ParsleyFieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)value=this.options.value(this);else if("undefined"!=typeof this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return this._findRelated().filter(":checked").val()||"";if(this.$element.is("input[type=checkbox]")){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}return this.$element.is("select")&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var x=function(t,i,n){this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"ParsleyForm"!==n.__class__)throw new Error("Parent instance must be a ParsleyForm instance");return this.parent=n||window.Parsley,this.init(i)};x.prototype={init:function(e){return this.__class__="Parsley",this.__version__="@@version",this.__id__=a.generateID(),this._resetOptions(e),this.$element.is("form")||a.checkAttr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")||this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple||("undefined"!=typeof this.$element.attr("name")&&this.$element.attr("name").length?this.options.multiple=t=this.$element.attr("name"):"undefined"!=typeof this.$element.attr("id")&&this.$element.attr("id").length&&(this.options.multiple=this.$element.attr("id"))),this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),"undefined"!=typeof t&&e('input[name="'+t+'"]').each(function(t,i){e(i).is("input[type=radio], input[type=checkbox]")&&e(i).attr(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("ParsleyFieldMultiple")||i.addElement(this.$element); 5break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new v(this.$element,this.domOptions,this.options),window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new C(this.$element,this.domOptions,this.options,this.parent),window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new C(this.$element,this.domOptions,this.options,this.parent),new P,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.$element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("ParsleyFieldMultiple",n),n):(this.$element.data("Parsley",n),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";
5V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=e.extend(new l,{$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:x,version:"@@version"});e.extend(C.prototype,l.prototype),e.extend(v.prototype,l.prototype),e.extend(x.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new x(this,t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=e.extend(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,window.ParsleyUtils=a;var M=window.Parsley._validatorRegistry=new c(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(t,i){window.Parsley[i]=e.proxy(M,i),window.ParsleyValidator[i]=function(){var e;return a.warnOnce("Accessing the method '"+i+"' through ParsleyValidator is deprecated. Simply call 'window.Parsley."+i+"(...)'"),(e=window.Parsley)[i].apply(e,arguments)}}),window.ParsleyUI="function"==typeof window.ParsleyConfig.ParsleyUI?(new window.ParsleyConfig.ParsleyUI).listen():(new g).listen(),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var O=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:";e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof C||e instanceof v))throw new Error("Mu
5st give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof C||e instanceof v))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof C||t instanceof v,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,E,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return E.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof E.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=E.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.$element.attr("name")||r.$element.attr("id")]=t;var u=e.extend(!0,n.options||{},E.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof E._remoteCache&&(E._remoteCache={});var d=E._remoteCache[a]=E._remoteCache[a]||e.ajax(s),h=function(){var t=E.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),window.ParsleyExtend.addAsyncValidator=function(){return ParsleyUtils.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en");var q=E;return q}); 6function PowermailForm(e){"use strict";this.initialize=function(){a(),t(),i(),r(),o(),n(),s(),l()};var a=function(){e.fn.powermailTabs&&e(".powermail_morestep").each(function(){e(this).powermailTabs()})},t=function(){e("form[data-powermail-ajax]").length&&p()},i=function(){if(e('*[data-powermail-location="prefill"]').length&&navigator.geolocation){e(this);navigator.geolocation.getCurrentPosition(function(a){var t=a.coords.latitude,i=a.coords.longitude,r=x()+"/index.php?eID=powermailEidGetLocation";jQuery.ajax({url:r,data:"lat="+t+"&lng="+i,cache:!1,success:function(a){a&&e('*[data-powermail-location="prefill"]').val(a)}})})}},r=function(){e.fn.datetimepicker&&e(".powermail_date").each(function(){var a=e(this);if("date"===a.prop("type")||"datetime-local"===a.prop("type")||"time"===a.prop("type")){if(!a.data("datepicker-force")){if(e(this).data("date-value")){var t=w(e(this).data("date-value"),e(this).data("datepicker-format"),a.prop("type"));null!==t&&e(this).val(t)}return}a.prop("type","text")}var i=!0,r=!0;"date"===a.data("datepicker-settings")?r=!1:"time"===a.data("datepicker-settings")&&(i=!1),a.datetimepicker({format:a.data("datepicker-format"),timepicker:r,datepicker:i,lang:"en",i18n:{en:{months:a.data("datepicker-months").split(","),dayOfWeek:a.data("datepicker-days").split(",")}}})})},o=function(){e(".powermail_all_type_password.powermail_all_value").html("********")},n=function(){e.fn.parsley&&e(".powermail_reset").on("click","",function(){e('form[data-parsley-validate="data-parsley-validate"]').parsley().reset()})},l=function(){window.Parsley&&(g(),y())},p=function(){var a,t=!1;e(document).on("submit","form[data-powermail-ajax]",function(i){var r=e(this);r.data("powermail-ajax-uri")&&(a=r.data("powermail-ajax-uri"));var o=r.data("powermail-form");t||(e.ajax({type:"POST",url:r.prop("action"),data:new FormData(r.get(0)),c
6ontentType:!1,processData:!1,beforeSend:function(){e(".powermail_submit",r).parent().append(h()),e('*[data-powermail-form-ajax="confirmation"], *[data-powermail-form-ajax="submit"]',r).closest(".powermail_confirmation").append(h())},complete:function(){e(".powermail_fieldwrap_submit",r).find(".powermail_progressbar").remove(),s()},success:function(i){var n=e('*[data-powermail-form="'+o+'"]:first',i);n.length?(e('*[data-powermail-form="'+o+'"]:first').closest(".tx-powermail").html(n),e.fn.powermailTabs&&e(".powermail_morestep").powermailTabs(),e.fn.parsley&&e('form[data-parsley-validate="data-parsley-validate"]').parsley(),f()):(a?window.location=a:r.submit(),t=!0)}}),i.preventDefault())})},s=function(){e(".powermail_fieldwrap_file").find(".deleteAllFiles").each(function(){d(e(this).closest(".powermail_fieldwrap_file").find('input[type="file"]'))}),e(".deleteAllFiles").click(function(){c(e(this).closest(".powermail_fieldwrap_file").find('input[type="hidden"]')),e(this).closest("ul").fadeOut(function(){e(this).remove()})})},d=function(e){e.prop("disabled","disabled").addClass("hide").prop("type","hidden")},c=function(e){e.prop("disabled",!1).removeClass("hide").prop("type","file")},f=function(){e("img.powermail_captchaimage").each(function(){var a=m(e(this).prop("src"));e(this).prop("src",a+"?hash="+u(5))})},m=function(e){var a=e.split("?");return a[0]},u=function(e){for(var a="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;e>i;i++)a+=t.charAt(Math.floor(Math.random()*t.length));return a},w=function(e,a,t){var i=Date.parseDate(e,a);if(null===i)return null;var r=new Date(i),o=r.getFullYear()+"-";o+=("0"+(r.getMonth()+1)).slice(-2)+"-",o+=("0"+r.getDate()).slice(-2);var n=("0"+r.getHours()).slice(-2)+":"+("0"+r.getMinutes()).slice(-2),l=o+"T"+n;return"date"===t?o:"datetime-local"===t?l:"time"===t?n:null},h=function(){return e("<div />").addClass("powermail_progressbar").html(e("<div />").addClass("powermail_progress").html(e("<div />").addClass("powermail_progess_inner")))},v=function(e){for(var a=e.get(0),t=0,i=0;i<a.files.length;i++){var r=a.files[i];r.size>t&&(t=r.size)}return parseInt(t)},g=function(){window.Parsley.addValidator("powermailfilesize",function(a,t){if(-1!==t.indexOf(",")){var i=t.split(","),r=parseInt(i[0]),o=e('*[name="tx_powermail_pi1[field]['+i[1]+'][]"]');if(o.length&&v(o)>r)return!1}return!0},32).addMessage("en","powermailfilesize","Error")},y=function(){window.Parsley.addValidator("powermailfileextensions",function(a,t){var i=e('*[name="tx_powermail_pi1[field]['+t+'][]"]');return i.length?_(b(a),i.prop("accept")):!0},32).addMessage("en","powermailfileextensions","Error")},_=function(e,a){return-1!==a.indexOf("."+e)},b=function(e){return e.split(".").pop().toLowerCase()},x=function(){var a;return a=e("base").length>0?jQuery("base").prop("href"):"https:"!=window.location.protocol?"http://"+window.location.hostname:"https://"+window.location.hostname}}jQuery(document).ready(function(e){"use strict";var a=new window.PowermailForm(e);a.initialize()}); 7$(document).ready(function () { 8 $('img[data-htmlarea-clickenlarge="1"]').each(function () { 9 var src = $(this).attr('src'); 10 var contentUid = $(this).parents('.csc-default').attr('id'); 11 $(this).wrap('<a href="'+src+'" data-lightbox="lightbox_'+contentUid+'" />'); 12 }); 13}); 14/** 15 * Lightbox v2.7.1 16 * by Lokesh Dhakar - http://lokeshdhakar.com/projects/lightbox2/ 17 * 18 * @license http://creativecommons.org/licenses/by/2.5/ 19 * - Free for use in both personal and commercial projects 20 * - Attribution requires leaving author name, author link, and the license info intact 21 */ 22(function(){var a=jQuery,b=function(){function a(){this.fadeDuration=500,this.fitImagesInViewport=!0,this.resizeDuration=700,this.positionFromTop=50,this.showImageNumberLabel=!0,this.alwaysShowNavOnTouchDevices=!1,this.wrapAround=!1}return a.prototype.albumLabel=function(a,b){return"Image "+a+" sur "+b},a}(),c=function(){function b(a){this.options=a,this.album=[],this.currentImageIndex=void 0,this.init()}return b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a("<div id='lightboxOverlay' class='lightboxOverlay'></div><div id='lightbox' class='lightbox'><div class='lb-outerContainer'><div class='lb-container'><img class='lb-image' src='' /><div class='lb-nav'><a class='lb-prev' href='' ></a><a class='lb-next' href='' ></a></div><div class='lb-loader'><a class='lb-cancel'></a></div></div></div><div class='lb-dataContainer'><div class='lb-data'><div class='lb-details'><span class='lb-caption'></span><span class='lb-number'></span></div><div class='lb-closeContainer'><a class='lb-close'></a></div></div></div></div>").appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return b.changeImage(0===b.currentImageIndex?b.album.length-1:b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.changeImage(b.currentImageIndex===b.album.length-1?0:b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k,l;d.attr("src",c.album[b].link),f=a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(l=a(window).width(),k=a(window).height(),j=l-c.containerLeftPadding-c.containerRightPadding-20,i=k-c.containerTopPadding-c.containerBottomPadding-120,(e.width>j||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(window).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").
22css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;"undefined"!=typeof this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title&&this.$lightbox.find(".lb-caption").html(this.album[this.currentImageIndex].title).fadeIn("fast").find("a").on("click",function(){location.href=a(this).attr("href")}),this.album.length>1&&this.options.showImageNumberLabel?this.$lightbox.find(".lb-number").text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn("fast"):this.$lightbox.find(".lb-number").hide(),this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"})},b}();a(function(){{var a=new b;new c(a)}})}).call(this); 23/** 24 * bl-jquery-image-center jQuery Plugin 25 * 26 * @copyright Boxlight Media Ltd. 2012 27 * @license MIT License 28 * @description Centers an image by moving, cropping and filling spaces inside it's parent container. Call 29 * this on a set of images to have them fill their parent whilst maintaining aspect ratio 30 * @author Robert Cambridge 31 * 32 * Usage: See documentation at http://boxlight.github.com/bl-jquery-image-center 33 */ 34(function($) { 35 $.fn.centerImage = function(method, callback) { 36 callback = callback || function() {}; 37 var els = this; 38 var remaining = $(this).length; 39 method = method == 'inside'; 40 41 // execute this on an individual image element once it's loaded 42 var fn = function(img) { 43 var $img = $(img); 44 var $div = $img.parent(); 45 // parent CSS should be in stylesheet, but to reinforce: 46 $div.css({ 47 overflow: 'hidden', 48 position: $div.css('position') == 'absolute' ? 'absolute' : 'relative' 49 }); 50 51 // temporarily set the image size naturally so we can get the aspect ratio 52 $img.css({ 53 'position': 'static', 54 'width': 'auto', 55 'height': 'auto', 56 'max-width': '100%', 57 'max-height': '100%' 58 }); 59 60 // now resize 61 var div = { w: $div.width(), h: $div.height(), r: $div.width() / $div.height() }; 62 var img = { w: $img.width(), h: $img.height(), r: $img.width() / $img.height() }; 63 $img.css({ 64 'max-width': 'none', 65 'max-height': 'none', 66 'width': Math.round((div.r > img.r) ^ method ? '100%' : div.h / img.h * img.w), 67 'height': Math.round((div.r < img.r) ^ method ? '100%' : div.w / img.w * img.h) 68 }); 69 70 // now center - but portrait images need to be centered slightly above halfway (33%) 71 var div = { w: $div.width(), h: $div.height() }; 72 var img = { w: $img.width(), h: $img.height() }; 73 $img.css({ 74 'position': 'absolute', 75 'left': Math.round((div.w - img.w) / 2), 76 'top': Math.round((div.h - img.h) / 3) 77 }); 78 79 callbackWrapped(img) 80 }; 81 82 var callbackWrapped = function(img) { 83 remaining--; 84 callback.apply(els, [ img, remaining ]); 85 }; 86 87 // iterate through elements 88 return els.each(function(i) { 89 if (this.complete || this.readyState === 'complete') { 90 // loaded already? run fn 91 // when binding, we can tell whether image loaded or not. 92 // not if it's already failed though :( 93 (function(el) { 94 // use setTimeout to prevent browser locking up 95 setTimeout(function() { fn(el) }, 1); 96 })(this); 97 } else { 98 // not loaded? bind to load 99 (function(el) { 100 $(el) 101 .one('load', function() { 102 // use setTimeout to prevent browser locking up 103 setTimeout(function() { 104 fn(el); 105 }, 1); 106 }) 107 .one('error', function() {
108 // the image did not load 109 callbackWrapped(el) 110 }) 111 .end(); 112 113 // IE9/10 won't always trigger the load event. fix it. 114 if (navigator.userAgent.indexOf("Trident/5") >= 0 || navigator.userAgent.indexOf("Trident/6")) { 115 el.src = el.src; 116 } 117 })(this); 118 } 119 }); 120 }; 121 // Alias functions which often better describe the use case 122 $.fn.imageCenterResize = function(callback) { 123 return $(this).centerImage('inside', callback); 124 }; 125 $.fn.imageCropFill = function(callback) { 126 return $(this).centerImage('outside', callback); 127 }; 128})(jQuery); 129var matched,browser;jQuery.uaMatch=function(b){b=b.toLowerCase();var a=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||b.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||[];return{browser:a[1]||"",version:a[2]||"0"}};matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version}if(browser.chrome){browser.webkit=true}else{if(browser.webkit){browser.safari=true}}jQuery.browser=browser; 130/*! 131 * jQuery Cookiebar Plugin 132 * https://github.com/carlwoodhouse/jquery.cookieBar 133 * 134 * Copyright 2012, Carl Woodhouse 135 * Disclaimer: if you still get fined for not complying with the eu cookielaw, it's not our fault. 136 */ 137 138(function( $ ){ 139 $.fn.cookieBar = function( options ) { 140 var settings = $.extend( { 141 'closeButton' : 'none', 142 'secure' : false, 143 'path' : '/', 144 'domain' : '' 145 }, options); 146 147 return this.each(function() { 148 var cookiebar = $(this); 149 150 // just in case they didnt hide it by default. 151 cookiebar.hide(); 152 153 // if close button not defined. define it! 154 if(settings.closeButton == 'none') 155 { 156 cookiebar.append('<a class="cookiebar-close">Fermer</a>'); 157 settings = $.extend( { 158 'closeButton' : '.cookiebar-close' 159 }, options); 160 } 161 162 if ($.cookie('cookiebar') != 'hide') { 163 cookiebar.show(); 164 } 165 166 cookiebar.find(settings.closeButton).click(function() { 167 cookiebar.hide(); 168 $.cookie('cookiebar', 'hide', { path: settings.path, secure: settings.secure, domain: settings.domain, expires: 30 }); 169 return false; 170 }); 171 }); 172 }; 173 174 // self injection init 175 $.cookieBar = function( options ) { 176 $('body').prepend('<div class="ui-widget"><div style="display: none;" class="cookie-message ui-widget-header blue"><p>By using this website you allow us to place cookies on your computer. They are harmless and never personally identify you.</p></div></div>'); 177 $('.cookie-message').cookieBar(options); 178 }; 179})( jQuery ); 180 181/*! 182 * Dependancy: 183 * jQuery Cookie Plugin 184 * https://github.com/carhartl/jquery-cookie 185 * 186 * Copyright 2011, Klaus Hartl 187 * Dual licensed under the MIT or GPL Version 2 licenses. 188 * http://www.opensource.org/licenses/mit-license.php 189 * http://www.opensource.org/licenses/GPL-2.0 190 */ 191(function($) { 192 $.cookie = function(key, value, options) { 193 // key and at least value given, set cookie... 194 if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { 195 options = $.extend({}, options); 196 197 if (value === null || value === undefined) { 198 options.expires = -1; 199 } 200 201 if (typeof options.expires === 'number') { 202 var days = options.expires, t = options.expires = new Date(); 203 t.setDate(t.getDate() + days); 204 } 205 206 value = String(value); 207 208 return (document.cookie = [ 209 encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), 210 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 211 options.path ? '; path=' + options.path : '', 212 options.domain ? '; domain=' + options.domain : '', 213 options.secure ? '; secure' : '' 214 ].join('')); 215 } 216 217 // key and possibly options given, get cookie... 218 options = value || {}; 219 var decode = options.raw ? function(s) { return s; }
vendor: 4,823 bytes, lines 219-238
219 : decodeURIComponent; 220 221 var pairs = document.cookie.split('; '); 222 for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { 223 // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined 224 if (decode(pair[0]) === key) return decode(pair[1] || ''); 225 } 226 return null; 227 }; 228})(jQuery); 229/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */ 230(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate, 231v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true"); 232g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap(); 233f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i"; 234_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c= 235f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this, 236b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='<div class="'+l+'" '+(u?'role="'+c[_type]+'" ':"");u&&z.each(function(){h+= 237'aria-labelledby="';this.id?h+=this.id:(this.id=y,h+=y);h+='"'});h=a.wrap(h+"/>")[_callback]("ifCreated").parent().append(e.insert);d=f('<ins class="'+C+'"/>').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return; 238A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;
238if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d= 239b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto); 240 241/*! http://mths.be/placeholder v2.0.7 by @mathias */ 242;(function(window, document, $) { 243 244 var isInputSupported = 'placeholder' in document.createElement('input'); 245 var isTextareaSupported = 'placeholder' in document.createElement('textarea'); 246 var prototype = $.fn; 247 var valHooks = $.valHooks; 248 var propHooks = $.propHooks; 249 var hooks; 250 var placeholder; 251 252 if (isInputSupported && isTextareaSupported) { 253 254 placeholder = prototype.placeholder = function() { 255 return this; 256 }; 257 258 placeholder.input = placeholder.textarea = true; 259 260 } else { 261 262 placeholder = prototype.placeholder = function() { 263 var $this = this; 264 $this 265 .filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]') 266 .not('.placeholder') 267 .bind({ 268 'focus.placeholder': clearPlaceholder, 269 'blur.placeholder': setPlaceholder 270 }) 271 .data('placeholder-enabled', true) 272 .trigger('blur.placeholder'); 273 return $this; 274 }; 275 276 placeholder.input = isInputSupported; 277 placeholder.textarea = isTextareaSupported; 278 279 hooks = { 280 'get': function(element) { 281 var $element = $(element); 282 283 var $passwordInput = $element.data('placeholder-password'); 284 if ($passwordInput) { 285 return $passwordInput[0].value; 286 } 287 288 return $element.data('placeholder-enabled') && $element.hasClass('placeholder') ? '' : element.value; 289 }, 290 'set': function(element, value) { 291 var $element = $(element); 292 293 var $passwordInput = $element.data('placeholder-password'); 294 if ($passwordInput) { 295 return $passwordInput[0].value = value; 296 } 297 298 if (!$element.data('placeholder-enabled')) { 299 return element.value = value; 300 } 301 if (value == '') { 302 element.value = value; 303 // Issue #56: Setting the placeholder causes problems if the element continues to have focus. 304 if (element != document.activeElement) { 305 // We can't use `triggerHandler` here because of dummy text/password inputs :( 306 setPlaceholder.call(element); 307 } 308 } else if ($element.hasClass('placeholder')) { 309 clearPlaceholder.call(element, true, value) || (element.value = value); 310 } else { 311 element.value = value; 312 } 313 // `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363 314 return $element; 315 } 316 }; 317 318 if (!isInputSupported) { 319 valHooks.input = hooks; 320 propHooks.value = hooks; 321 } 322 if (!isTextareaSupported) { 323 valHooks.textarea = hooks; 324 propHooks.value = hooks; 325 } 326 327 $(function() { 328 // Look for forms 329 $(document).delegate('form', 'submit.placeholder', function() { 330 // Clear the placeholder values so they don't get submitted 331 var $inputs = $('.placeholder', this).each(clearPlaceholder); 332 setTimeout(function() { 333 $inputs.each(setPlaceholder); 334 }, 10); 335 }); 336 }); 337 338 // Clear placeholder values upon page reload 339 $(window).bind('beforeunload.placeholder', function() { 340 $('.placeholder').each(function() { 341 this.value = ''; 342 }); 343 }); 344 345 } 346 347 function args(elem) { 348 // Return an object of element attributes 349 var newAttrs = {}; 350 var rinlinejQuery = /^jQuery\d+$/; 351 $.each(elem.attributes, function(i, attr) { 352 if (attr.specified && !rinlinejQuery.test(attr.name)) { 353 newAttrs[attr.name] = attr.value; 354 } 355 }); 356 return newAttrs; 357 } 358 359 function clearPlaceholder(event, value) { 360 var input = this; 361 var $input = $(input); 362 if (input.value == $input.attr('placeholder') && $input.hasClass('placeholder')) { 363 if ($input.data('placeholder-password')) { 364 $input = $input.hide().next().show().attr('id', $input.removeAttr('id').data('placeholder-id')); 365 // If `clearPlaceholder` was called from `$.valHooks.input.set` 366 if (event === true) { 367 return $input[0].value = value; 368 } 369 $input.focus(); 370 } else { 371 input.value = ''; 372 $input.removeClass('placeholder'); 373 input == document.activeElement && input.select(); 374 } 375 } 376 } 377 378 function setPlaceholder() { 379 var $replacement; 380 var input = this; 381 var $input = $(input); 382 var id = this.id; 383 if (input.value == '') { 384 if (input.type == 'password') { 385 if (!$input.data('placeholder-textinput')) { 386 try { 387 $replacement = $input.clone().attr({ 'type': 'text' }); 388 } catch(e) { 389 $replacement = $('<input>').attr($.extend(args(this), { 'type': 'text' })); 390 } 391 $replacement 392 .removeAttr('name') 393 .data({ 394 'placeholder-password': $input, 395 'placeholder-id': id 396 }) 397 .bind('focus.placeholder', clearPlaceholder); 398 $input 399 .data({ 400 'placeholder-textinput': $replacement, 401 'placeholder-id': id 402 }) 403 .before($replacement); 404 } 405 $input = $input.removeAttr('id').hide().prev().attr('id', id).show(); 406 // Note: `$input[0] != input` now! 407 } 408 $input.addClass('placeholder'); 409 $input[0].value = $input.attr('placeholder'); 410 } else { 411 $input.removeClass('placeholder'); 412 } 413 } 414 415}(this, document, jQuery)); 416/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ 417 418window.matchMedia || (window.matchMedia = function() { 419 "use strict"; 420 421 // For browsers that support matchMedium api such as IE 9 and webkit 422 var styleMedia = (window.styleMedia || window.media); 423 424 // For those that don't support matchMedium 425 if (!styleMedia) { 426 var style = document.createElement('style'), 427 script = document.getElementsByTagName('script')[0], 428 info = null; 429 430 style.type = 'text/css'; 431 style.id = 'matchmediajs-test'; 432 433 script.parentNode.insertBefore(style, script); 434 435 // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 436 info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle; 437 438 styleMedia = { 439 matchMedium: function(media) { 440 var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; 441 442 // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 443 if (style.styleSheet) { 444 style.styleSheet.cssText = text; 445 } else { 446 style.textContent = text; 447 } 448 449 // Test if media query is true or false 450 return info.width === '1px'; 451 } 452 }; 453 } 454 455 return function(media) { 456 return { 457 matches: styleMedia.matchMedium(media || 'all'), 458 media: media || 'all'
459 }; 460 }; 461}()); 462/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */ 463(function(){ 464 // Bail out for browsers that have addListener support 465 if (window.matchMedia && window.matchMedia('all').addListener) { 466 return false; 467 } 468 469 var localMatchMedia = window.matchMedia, 470 hasMediaQueries = localMatchMedia('only all').matches, 471 isListening = false, 472 timeoutID = 0, // setTimeout for debouncing 'handleChange' 473 queries = [], // Contains each 'mql' and associated 'listeners' if 'addListener' is used 474 handleChange = function(evt) { 475 // Debounce 476 clearTimeout(timeoutID); 477 478 timeoutID = setTimeout(function() { 479 for (var i = 0, il = queries.length; i < il; i++) { 480 var mql = queries[i].mql, 481 listeners = queries[i].listeners || [], 482 matches = localMatchMedia(mql.media).matches; 483 484 // Update mql.matches value and call listeners 485 // Fire listeners only if transitioning to or from matched state 486 if (matches !== mql.matches) { 487 mql.matches = matches; 488 489 for (var j = 0, jl = listeners.length; j < jl; j++) { 490 listeners[j].call(window, mql); 491 } 492 } 493 } 494 }, 30); 495 }; 496 497 window.matchMedia = function(media) { 498 var mql = localMatchMedia(media), 499 listeners = [], 500 index = 0; 501 502 mql.addListener = function(listener) { 503 // Changes would not occur to css media type so return now (Affects IE <= 8) 504 if (!hasMediaQueries) { 505 return; 506 } 507 508 // Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8) 509 // There should only ever be 1 resize listener running for performance 510 if (!isListening) { 511 isListening = true; 512 window.addEventListener('resize', handleChange, true); 513 } 514 515 // Push object only if it has not been pushed already 516 if (index === 0) { 517 index = queries.push({ 518 mql : mql, 519 listeners : listeners 520 }); 521 } 522 523 listeners.push(listener); 524 }; 525 526 mql.removeListener = function(listener) { 527 for (var i = 0, il = listeners.length; i < il; i++){ 528 if (listeners[i] === listener){ 529 listeners.splice(i, 1); 530 } 531 } 532 }; 533 534 return mql; 535 }; 536}()); 537/*! 538 * enquire.js v2.1.0 - Awesome Media Queries in JavaScript 539 * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/enquire.js 540 * License: MIT (http://www.opensource.org/licenses/mit-license.php) 541 */ 542 543;(function (name, context, factory) { 544 var matchMedia = window.matchMedia; 545 546 if (typeof module !== 'undefined' && module.exports) { 547 module.exports = factory(matchMedia); 548 } 549 else if (typeof define === 'function' && define.amd) { 550 define(function() { 551 return (context[name] = factory(matchMedia)); 552 }); 553 } 554 else { 555 context[name] = factory(matchMedia); 556 } 557}('enquire', this, function (matchMedia) { 558 559 'use strict'; 560 561 /*jshint unused:false */ 562 /** 563 * Helper function for iterating over a collection 564 * 565 * @param collection 566 * @param fn 567 */ 568 function each(collection, fn) { 569 var i = 0, 570 length = collection.length, 571 cont; 572 573 for(i; i < length; i++) { 574 cont = fn(collection[i], i); 575 if(cont === false) { 576 break; //allow early exit 577 } 578 } 579 } 580 581 /** 582 * Helper function for determining whether target object is an array 583 * 584 * @param target the object under test 585 * @return {Boolean} true if array, false otherwise 586 */ 587 function isArray(target) { 588 return Object.prototype.toString.apply(target) === '[object Array]'; 589 } 590 591 /** 592 * Helper function for determining whether target object is a function 593 * 594 * @param target the object under test 595 * @return {Boolean} true if function, false otherwise 596 */ 597 function isFunction(target) { 598 return typeof target === 'function'; 599 } 600 601 /** 602 * Delegate to handle a media query being matched and unmatched. 603 * 604 * @param {object} options 605 * @param {function} options.match callback for when the media query is matched 606 * @param {function} [options.unmatch] callback for when the media query is unmatched 607 * @param {function} [options.setup] one-time callback triggered the first time a query is matched 608 * @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched? 609 * @constructor 610 */ 611 function QueryHandler(options) { 612 this.options = options; 613 !options.deferSetup && this.setup(); 614 } 615 QueryHandler.prototype = { 616 617 /** 618 * coordinates setup of the handler 619 * 620 * @function 621 */ 622 setup : function() { 623 if(this.options.setup) { 624 this.options.setup(); 625 }
626 this.initialised = true; 627 }, 628 629 /** 630 * coordinates setup and triggering of the handler 631 * 632 * @function 633 */ 634 on : function() { 635 !this.initialised && this.setup(); 636 this.options.match && this.options.match(); 637 }, 638 639 /** 640 * coordinates the unmatch event for the handler 641 * 642 * @function 643 */ 644 off : function() { 645 this.options.unmatch && this.options.unmatch(); 646 }, 647 648 /** 649 * called when a handler is to be destroyed. 650 * delegates to the destroy or unmatch callbacks, depending on availability. 651 * 652 * @function 653 */ 654 destroy : function() { 655 this.options.destroy ? this.options.destroy() : this.off(); 656 }, 657 658 /** 659 * determines equality by reference. 660 * if object is supplied compare options, if function, compare match callback 661 * 662 * @function 663 * @param {object || function} [target] the target for comparison 664 */ 665 equals : function(target) { 666 return this.options === target || this.options.match === target; 667 } 668 669 }; 670 /** 671 * Represents a single media query, manages it's state and registered handlers for this query 672 * 673 * @constructor 674 * @param {string} query the media query string 675 * @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design 676 */ 677 function MediaQuery(query, isUnconditional) { 678 this.query = query; 679 this.isUnconditional = isUnconditional; 680 this.handlers = []; 681 this.mql = matchMedia(query); 682 683 var self = this; 684 this.listener = function(mql) { 685 self.mql = mql; 686 self.assess(); 687 }; 688 this.mql.addListener(this.listener); 689 } 690 MediaQuery.prototype = { 691 692 /** 693 * add a handler for this query, triggering if already active 694 * 695 * @param {object} handler 696 * @param {function} handler.match callback for when query is activated 697 * @param {function} [handler.unmatch] callback for when query is deactivated 698 * @param {function} [handler.setup] callback for immediate execution when a query handler is registered 699 * @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched? 700 */ 701 addHandler : function(handler) { 702 var qh = new QueryHandler(handler); 703 this.handlers.push(qh); 704 705 this.matches() && qh.on(); 706 }, 707 708 /** 709 * removes the given handler from the collection, and calls it's destroy methods 710 * 711 * @param {object || function} handler the handler to remove 712 */ 713 removeHandler : function(handler) { 714 var handlers = this.handlers; 715 each(handlers, function(h, i) { 716 if(h.equals(handler)) { 717 h.destroy(); 718 return !handlers.splice(i,1); //remove from array and exit each early 719 } 720 }); 721 }, 722 723 /** 724 * Determine whether the media query should be considered a match 725 * 726 * @return {Boolean} true if media query can be considered a match, false otherwise 727 */ 728 matches : function() { 729 return this.mql.matches || this.isUnconditional; 730 }, 731 732 /** 733 * Clears all handlers and unbinds events 734 */ 735 clear : function() { 736 each(this.handlers, function(handler) { 737 handler.destroy(); 738 }); 739 this.mql.removeListener(this.listener); 740 this.handlers.length = 0; //clear array 741 }, 742 743 /* 744 * Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match 745 */ 746 assess : function() { 747 var action = this.matches() ? 'on' : 'off'; 748 749 each(this.handlers, function(handler) { 750 handler[action](); 751 }); 752 } 753 }; 754 /** 755 * Allows for registration of query handlers. 756 * Manages the query handler's state and is responsible for wiring up browser events 757 * 758 * @constructor 759 */ 760 function MediaQueryDispatch () { 761 if(!matchMedia) {
762 throw new Error('matchMedia not present, legacy browsers require a polyfill'); 763 } 764 765 this.queries = {}; 766 this.browserIsIncapable = !matchMedia('only all').matches; 767 } 768 769 MediaQueryDispatch.prototype = { 770 771 /** 772 * Registers a handler for the given media query 773 * 774 * @param {string} q the media query 775 * @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers 776 * @param {function} options.match fired when query matched 777 * @param {function} [options.unmatch] fired when a query is no longer matched 778 * @param {function} [options.setup] fired when handler first triggered 779 * @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched 780 * @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers 781 */ 782 register : function(q, options, shouldDegrade) { 783 var queries = this.queries, 784 isUnconditional = shouldDegrade && this.browserIsIncapable; 785 786 if(!queries[q]) { 787 queries[q] = new MediaQuery(q, isUnconditional); 788 } 789 790 //normalise to object in an array 791 if(isFunction(options)) { 792 options = { match : options }; 793 } 794 if(!isArray(options)) { 795 options = [options]; 796 } 797 each(options, function(handler) { 798 queries[q].addHandler(handler); 799 }); 800 801 return this; 802 }, 803 804 /** 805 * unregisters a query and all it's handlers, or a specific handler for a query 806 * 807 * @param {string} q the media query to target 808 * @param {object || function} [handler] specific handler to unregister 809 */ 810 unregister : function(q, handler) { 811 var query = this.queries[q]; 812 813 if(query) { 814 if(handler) { 815 query.removeHandler(handler); 816 } 817 else { 818 query.clear(); 819 delete this.queries[q]; 820 } 821 } 822 823 return this; 824 } 825 }; 826 827 return new MediaQueryDispatch(); 828 829})); 830 831function addEvent(evnt, elem, func) { 832 if (elem.addEventListener) // W3C DOM 833 elem.addEventListener(evnt,func,false); 834 else if (elem.attachEvent) { // IE DOM 835 elem.attachEvent("on"+evnt, func); 836 } 837 else { // No much to do 838 elem[evnt] = func; 839 } 840} 841$(document).ready(function(){ 842 jQuery('input, textarea').placeholder(); 843 844 /**** COOKIES BAR ****/ 845 jQuery('.cookie-message').cookieBar({ 846 domain: window.location.host 847 }); 848 /**** COOKIES BAR ****/ 849 850 $('#block-access ul li.link-public, #block-access ul li.link-program, #block-access ul li.link-contact, #block-access ul li.link-plan').remove(); 851 852 $(document).on('focusin', '#search-top input', function(){ 853 $('#search-top').addClass('active'); 854 }); 855 $(document).on('focusout', '#search-top input', function(){ 856 if($(this).val() == ''){ 857 $('#search-top').removeClass('active'); 858 } 859 }); 860 861 enquire.register("screen and (min-width: 480px)", { 862 match : function() { 863 $('#main-content form .layout2').each(function(e){ 864 if(e%2){ 865 $(this).css({paddingRight: 0}); 866 } 867 else{ 868 $(this).css({paddingLeft: 0}); 869 } 870 }); 871 var indice = 0; 872 $('#main-content form .layout3').each(function(e){ 873 if(indice == 0){ 874 $(this).css({paddingLeft: 0}); 875 } 876 if(indice == 2){ 877 $(this).css({paddingRight: 0}); 878 } 879 indice++; 880 if(indice == 3){indice = 0;} 881 }); 882 } 883 }); 884 885 var isIE11 = !!navigator.userAgent.match(/Trident.*rv[ :]*11\./) 886 if(jQuery.browser['msie']){ 887 jQuery('html').addClass('ie'); 888 } 889 890 jQuery('#main-menu ul li').each(function(){ 891 if(jQuery(this).find('>ul').length > 0){ 892 jQuery(this).addClass('submenu'); 893 } 894 }); 895 positionSubMenu($('#main-menu')); 896 897 898 /**** SCROLL MENU FIXED ****/ 899 var positionMenu = $('#main-menu').offset().top; 900 var menuPosition = $(window).height()/3; 901 $(window).scroll(function(e){
902 var st = $(this).scrollTop(); 903 if($(window).scrollTop() > positionMenu){ 904 $('body').addClass('scrolled'); 905 } 906 else{ 907 $('body').removeClass('scrolled'); 908 } 909 if($(window).scrollTop() > menuPosition){ 910 $('#main-menu').addClass('submenu-top'); 911 } 912 else{ 913 $('#main-menu').removeClass('submenu-top'); 914 } 915 }); 916 /**** FIN SCROLL MENU FIXED ****/ 917 918 919 /****** SELECT JQUERY UI ******/ 920 $('select').selectmenu({ 921 transferClasses: true, 922 create: function( event, ui ) { 923 $(this).after($('#'+$(this).attr('id')+'-menu').parent()); 924 }, 925 change: function(event, ui){ 926 if($(this).attr('name') == "date-menu"){ 927 if(ui.item.value != 0){ 928 document.location.href=ui.item.value; 929 } 930 } 931 } 932 }); 933 /****** SELECT JQUERY UI ******/ 934 935 936 if($('select[name="date-menu"]').length > 0){ 937 $(document).on('click', '.news-menu-view .ui-selectmenu-optgroup', function(){ 938 document.location.href=ui.item.value; 939 }); 940 } 941 942 943 disponibilitesSalle = new Array(); 944 $('#booking-left #reservation_1 li').each(function(){ 945 disponibilitesSalle.push( { dateStart: new Date($(this).attr('dateStart')), dateEnd: new Date($(this).attr('dateEnd')), type: $(this).attr('class') } ); 946 }); 947 948 /*disponibilitesSalle2 = new Array(); 949 $('#booking-left #reservation_2 li').each(function(){ 950 disponibilitesSalle2.push( { Date: new Date($(this).html()), type: $(this).attr('class') } ); 951 });*/ 952 953 954 var currentYear = (new Date).getFullYear(); 955 $('.calendar, .datepicker').datepicker({ 956 autoSize: false, 957 dayNames: [ "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ], 958 dayNamesMin: [ "D", "L", "M", "M", "J", "V", "S" ], 959 monthNames: [ "Janvier", "Fevrier", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre" ], 960 monthNamesShort: [ "Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jui", "Aoû", "Sep", "Oct", "Nov", "Dec" ], 961 showOtherMonths: false, 962 firstDay: 1, 963 minDate: new Date(), 964 maxDate: new Date(currentYear+1, 11,31), 965 dateFormat: 'dd MM yy', 966 beforeShowDay: function(date) { 967 return datePickerBeforeShowDay(date, disponibilitesSalle); 968 }, 969 onSelect: function(dateText, inst ) { 970 var input = $(this); 971 datePickerOnSelect(dateText, inst, disponibilitesSalle, input ); 972 } 973 }); 974 $('#datepickerDateStart').datepicker({ 975 autoSize: false, 976 dayNames: [ "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ], 977 dayNamesMin: [ "D", "L", "M", "M", "J", "V", "S" ], 978 monthNames: [ "Janvier", "Fevrier", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre" ], 979 monthNamesShort: [ "Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jui", "Aoû", "Sep", "Oct", "Nov", "Dec" ], 980 showOtherMonths: false, 981 firstDay: 1, 982 minDate: new Date(), 983 maxDate: new Date(currentYear+1, 11,31), 984 dateFormat: 'dd MM yy', 985 //altField: "#dateStart", 986 altFormat: "yy-mm-dd", 987 beforeShowDay: function(date) { 988 return datePickerBeforeShowDay(date, disponibilitesSalle); 989 }, 990 onSelect: function(dateText, inst ) { 991 var input = $(this); 992 datePickerOnSelect(dateText, inst, disponibilitesSalle, input ); 993 } 994 }); 995 $('#datepickerDateEnd').datepicker({ 996 autoSize: false, 997 dayNames: [ "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ], 998 dayNamesMin: [ "D", "L", "M", "M", "J", "V", "S" ], 999 monthNames: [ "Janvier", "Fevrier", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre" ], 1000 monthNamesShort: [ "Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jui", "Aoû", "Sep", "Oct", "Nov", "Dec" ], 1001 showOtherMonths: false, 1002 firstDay: 1, 1003 minDate: new Date(), 1004 maxDate: new Date(currentYear+1, 11,31), 1005 dateFormat: 'dd MM yy', 1006 //altField: "#dateEnd", 1007 altFormat: "yy-mm-dd", 1008 beforeShowDay: function(date) { 1009 return datePickerBeforeShowDay(date, disponibilitesSalle); 1010 }, 1011 onSelect: function(dateText, inst ) { 1012 var input = $(this); 1013 datePickerOnSelect(dateText, inst, disponibilitesSalle, input ); 1014 } 1015 }); 1016 $(document).on("mouseenter", ".form-booking .ui-datepicker-calendar .unvailable", function() { 1017 $('.form-booking .ui-datepicker-calendar .unvailable .tooltip-calendar').remove(); 1018 $(this).append('<div class="tooltip-calendar"><p>Réservé</p></div>'); 1019 }); 1020 $(document).on("mouseleave", ".form-booking .ui-datepicker-calendar .unvailable", function() { 1021 $('.form-booking .ui-datepicker-calendar .unvailable .tooltip-calendar').remove(); 1022 }); 1023 1024 $('.ui-datepicker').on('mousemove', 'tr', function () { 1025 $(this).find('td a').addClass('ui-state-hover'); 1026 }); 1027 $('.ui-datepicker').on('mouseleave', 'tr', function () { 1028 $(this).find('td a').removeClass('ui-state-hover'); 1029 }); 1030 1031 /****** DATEPICKER JQUERY UI ******/ 1032 1033 /****** JQUERY SELECT RESERVATION ******/ 1034 $('.form-booking .input-select select.list-salles').selectmenu( "destroy" ); 1035 $('.form-booking .input-select select.list-salles').selectmenu({ 1036 create: function( event, ui ) { 1037 $(this).after($('#'+$(this).attr('id')+'-menu').parent()); 1038 }, 1039 change: function( event, ui ) { 1040 var value = ui.item.value; 1041 var date = $('#booking-left #reservation_'+value); 1042 disponibilitesSalle = []; 1043 date.find('li').each(function(){ 1044 disponibilitesSalle.push( { dateStart: new Date($(this).attr('dateStart')), dateEnd: new Date($(this).attr('dateEnd')), type: $(this).attr('class') } ); 1045 }); 1046 resetDatepicker($('.calendar, .datepicker'), 'dd MM yy', disponibilitesSalle); 1047 resetDatepicker($('#datepickerDateStart'), 'dd MM yy', disponibilitesSalle, '#dateStart', 'yy-mm-dd'); 1048 resetDatepicker($('#datepickerDateEnd'), 'dd MM yy', disponibilitesSalle, '#dateEnd', 'yy-mm-dd'); 1049 1050 $('.form-booking .input-select select.list-salles').val(value); 1051 $('.form-booking .input-select select.list-salles').selectmenu( "refresh" ); 1052 } 1053 }); 1054 /****** FIN JQUERY SELECT RESERVATION ******/ 1055 1056 jQuery('#newResa').submit(function(e){
1057 e.preventDefault(); 1058 1059 //vérification des champs obligatoires 1060 if($("#newResa input[name='tx_reservationsalle_reservation[lastName]']").val()==''){ 1061 swal("Erreur !", "Merci de saisir votre nom !", "error"); 1062 return false; 1063 } 1064 if($("#newResa input[name='tx_reservationsalle_reservation[firstName]']").val()==''){ 1065 swal("Erreur !", "Merci de saisir votre prénom !", "error"); 1066 return false; 1067 } 1068 if($("#newResa input[name='tx_reservationsalle_reservation[email]']").val()==''){ 1069 swal("Erreur !", "Merci de saisir votre email !", "error"); 1070 return false; 1071 } 1072 if($("#newResa input[name='tx_reservationsalle_reservation[telephone]']").val()==''){ 1073 swal("Erreur !", "Merci de saisir votre téléphone !", "error"); 1074 return false; 1075 } 1076 1077 //appel ajax 1078 var postData = $(this).serializeArray(); 1079 var formURL = $(this).attr("action"); 1080 1081 $.ajax({
1082 type: "POST", 1083 url: formURL, 1084 dataType: 'json', 1085 data: postData, 1086 success: function(result) { 1087 //on supprime le loader 1088 //removeLoader(); 1089 if(result['status'] == 'ok'){ 1090 1091 swal({ 1092 title: "Enregistré!", 1093 text : "Votre réservation a bien été prise en compte !", 1094 type : "success", 1095 }, 1096 function(){ 1097 location.reload(); 1098 }); 1099 }else{ 1100 swal("Erreur !", result['msg'], "error"); 1101 } 1102 }, 1103 error: function(jqXHR, textStatus, errorThrown) 1104 { 1105 swal("Erreur !", "Une erreur s'est produite !", "error"); 1106 1107 //on supprime le loader 1108 //removeLoader(); 1109//console.log("passe dans le error ==>"+textStatus+" "+errorThrown); 1110 } 1111 }); 1112 1113 return false; 1114 }); 1115 1116 1117 /**** TOOLTIPS ANNURAIRE ****/ 1118 $('.detail-directory .table-std tr').each(function(){ 1119 if($(this).find('.td-hidden').length > 0){ 1120 var left = ($(this).outerWidth(true) - $(this).find('.td-hidden').outerWidth(true))/2; 1121 $(this).find('.td-hidden').css({ 1122 left: $(this).position().left+left+"px", 1123 top: $(this).position().top - $(this).find('.td-hidden').outerHeight(true)+"px" 1124 }) 1125 } 1126 }); 1127 /**** FIN TOOLTIPS ANNURAIRE ****/ 1128 1129 1130 /****** SLIDER ACCUEIL ******/ 1131 if($("#slideshow-home ul").length > 0){ 1132 slideshow_home = $("#slideshow-home ul").owlCarousel({ 1133 items : 1, 1134 autoplay: true, 1135 autoplayTimeout: 5000, 1136 navigation: true, // Show next and prev buttons 1137 singleItem: false, 1138 autoplayHoverPause: true, 1139 addClassActive: true, 1140 autoHeight: false, 1141 nav: true, 1142 pagination: true, 1143 autoplaySpeed: 1000, 1144 slideSpeed: 1000, 1145 navSpeed: 1000, 1146 dotsSpeed: 1000, 1147 dragEndSpeed: 1000, 1148 loop: true, 1149 mouseDrag: true, 1150 onInitialized: function(){ 1151 $('#slideshow-home ul li').each(function(){ 1152 $(this).find('img').centerImage(); 1153 }); 1154 } 1155 }); 1156 slideshow_home.on('resized.owl.carousel', function(event) { 1157 $('#slideshow-home ul li').each(function(){ 1158 $(this).find('img').centerImage(); 1159 }); 1160 }) 1161 } 1162 /****** FIN SLIDER ACCUEIL ******/ 1163 1164 1165 1166 $('.link-dialog').click(function(){ 1167 dialog($(this)); 1168 return false; 1169 }); 1170 1171 jQuery(document).on('click', '.ui-widget-overlay', function(){ 1172 jQuery('.ui-dialog .lightbox-dialog, .ui-dialog .csc-textpic-imagewrap').dialog('destroy'); 1173 }); 1174 1175 1176 var isMobile = false; //initiate as false 1177 // device detection 1178 if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) 1179 || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1179sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) isMobile = true; 1180 1181 if(isMobile){ 1182 jQuery(document).on('click', '#main-menu ul li a', function(e){ 1183 if(jQuery(this).parent().find('>ul').length > 0){ 1184 return false; 1185 } 1186 }); 1187 } 1188}); 1189 1190$(window).on('load', function (e) { 1191 1192 if($('#main-content #right #content-right >div').length <= 0){ 1193 $('#main-content #right #content-right').remove(); 1194 } 1195 if($('#main-content #right >div').length <= 0){ 1196 $('#main-content #left').addClass('center'); 1197 $('#main-content #right').addClass('hidden'); 1198 } 1199 else{ 1200 enquire.register("screen and (min-width: 951px)", { 1201 match : function() { 1202 $('#main-content #left').css({minHeight: $('#main-content #right').outerHeight(true)+"px"}); 1203 $('#main-content #right').css({minHeight: $('#main-content #left').outerHeight(true)+"px"}); 1204 } 1205 }); 1206 } 1207 1208 /****** SLIDER NEWS ******/ 1209 if($("#wrap-top #news .list-news").length > 0){ 1210 slideshow_news = $("#wrap-top #news .list-news").owlCarousel({ 1211 items : 1, 1212 autoplay: true, 1213 autoplayTimeout: 5000, 1214 navigation : true, // Show next and prev buttons 1215 singleItem:false, 1216 autoplayHoverPause: true, 1217 addClassActive: true, 1218 autoHeight: true, 1219 nav: true, 1220 pagination: true, 1221 autoplaySpeed: 1000, 1222 slideSpeed: 1000, 1223 navSpeed: 1000, 1224 dotsSpeed: 1000, 1225 dragEndSpeed: 1000, 1226 loop: true, 1227 mouseDrag: true 1228 }); 1229 } 1230 /****** FIN SLIDER NEWS ******/ 1231 1232 /****** SLIDER NEWS DETAIL ******/ 1233 if($(".slideshow-image").length > 0){ 1234 if($(".slideshow-image img").length > 1){ 1235 $(".slideshow-image .content-image").addClass('slider-image'); 1236 slideshow_image = $(".slideshow-image .image").owlCarousel({ 1237 items : 1, 1238 autoplay: true, 1239 autoplayTimeout: 5000, 1240 navigation: true, // Show next and prev buttons 1241 singleItem: false, 1242 autoplayHoverPause: true, 1243 addClassActive: true, 1244 autoHeight: false, 1245 nav: true, 1246 pagination: true, 1247 autoplaySpeed: 1000, 1248 slideSpeed: 1000, 1249 navSpeed: 1000, 1250 dotsSpeed: 1000, 1251 dragEndSpeed: 1000, 1252 loop: true, 1253 mouseDrag: true, 1254 onInitialized: function(){ 1255 // $('.slideshow-image .image').each(function(){ 1256 // $(this).find('img').centerImage(); 1257 // }); 1258 } 1259 }); 1260 slideshow_image.on('resized.owl.carousel', function(event) { 1261 // $('.slideshow-image .image').each(function(){ 1262 // $(this).find('img').centerImage(); 1263 // }); 1264 }) 1265 } 1266 } 1267 /****** FIN SLIDER NEWS DETAIL ******/ 1268 1269 /****** MAZONRY ANNUAIRE ******/ 1270 if($('#directory .list-directory').length > 0){ 1271 $('#directory').removeClass('loading-img'); 1272 var msnry = new Masonry( '#directory .list-directory', { 1273 "columnWidth": '.directory', 1274 "itemSelector": '.directory', 1275 "gutter": 0, 1276 "isOriginTop": true, 1277 "isOriginLeft": true 1278 }); 1279 } 1280 /****** FIN MAZONRY ANNUAIRE ******/ 1281 1282 1283 $('.loading-img').each(function(){ 1284 $(this).removeClass('loading-img'); 1285 }); 1286 1287 /****** POSITION FOOTER ******/ 1288 if($('footer').offset().top + $('footer').outerHeight(true) < $(window).height()){ 1289 $('footer').addClass('fixed'); 1290 } 1291 /****** FIN POSITION FOOTER ******/ 1292 1293 1294 if ( window.addEventListener ) { 1295 window.addEventListener( 'resize', redimensionnement, false ); 1296 } else if ( window.attachEvent ) { 1297 window.attachEvent( 'onresize', redimensionnement ); 1298 1299 } else { 1300 window['onresize']=redimensionnement; 1301 } 1302 redimensionnement(); 1303}); 1304 1305 1306function redimensionnement(e){ 1307 $('#agenda .list-agenda .agenda').each(function(){ 1308 $(this).find('img').centerImage(); 1309 }); 1310 //console.log(document.documentElement.clientWidth); 1311} 1312 1313function dialog(div){ 1314 if($('.ui-dialog').is(':visible')){$('.lightbox').addClass('hidden');} 1315 if($('.ui-widget-overlay')){$('.ui-widget-overlay').hide();} 1316 $('#'+div.attr('data-dialog')).removeClass('hidden'); 1317 $('#'+div.attr('data-dialog')).dialog({ 1318 modal: true, 1319 autoOpen: true, 1320 resizable: false, 1321 draggable: false, 1322 show: { effect: "fadeIn", duration: 200 }, 1323 open: function(){ 1324 } 1325 }); 1326 return false; 1327} 1328 1329function positionSubMenu(div){ 1330 $(div).on('mouseenter click', '.content-menu >ul >li', function(){ 1331 var position_submenu = $(this).offset().left + $(this).find('>ul').outerWidth(true); 1332 if(position_submenu > $(window).width()){ 1333 $(this).addClass('submenu-right'); 1334 } 1335 else{ 1336 $(this).removeClass('submenu-right'); 1337 } 1338 }); 1339 $(div).on('mouseenter click', '.content-menu >ul >li >ul >li', function(){ 1340 var position_submenu = $(this).offset().left + $(this).outerWidth(true) + $(this).find('>ul').outerWidth(true); 1341 if(position_submenu > $(window).width()){ 1342 $(this).addClass('submenu-right'); 1343 } 1344 else{ 1345 $(this).removeClass('submenu-right'); 1346 } 1347 }); 1348} 1349 1350function resetDatepicker(div, dateFormat, disponibilite, altField, altFormat){ 1351 div.datepicker( "destroy" ); 1352 div.datepicker({ 1353 autoSize: false, 1354 dayNames: [ "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ], 1355 dayNamesMin: [ "D", "L", "M", "M", "J", "V", "S" ], 1356 monthNames: [ "Janvier", "Fevrier", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre" ], 1357 monthNamesShort: [ "Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jui", "Aoû", "Sep", "Oct", "Nov", "Dec" ],
1358 showOtherMonths: false, 1359 firstDay: 1, 1360 minDate: new Date(), 1361 dateFormat: dateFormat, 1362 //altField: altField, 1363 altFormat: altFormat, 1364 beforeShowDay: function(date) { 1365 return datePickerBeforeShowDay(date, disponibilite); 1366 }, 1367 onSelect: function(dateText, inst ) { 1368 var input = $(this); 1369 datePickerOnSelect(dateText, inst, disponibilitesSalle, input ); 1370 } 1371 }); 1372} 1373 1374var monthNames = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", 1375 "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Decembre" 1376]; 1377function datePickerOnSelect(dateText, inst, disponibilites, input ) { 1378 var date, 1379 selectedDate = $('#'+inst.id).datepicker('getDate'), 1380 i = 0, 1381 disponibilite = []; 1382 var day = selectedDate.getDay(); 1383 1384 // Automatique set date end 1385 var newDate = new Date(selectedDate); 1386 var startDay = 1; 1387 var d = newDate.getDay(); 1388 var weekStart = new Date(newDate.valueOf() - (d<=0 ? 7-startDay:d-startDay)*86400000); //rewind to start day 1389 var weekEnd = new Date(weekStart.valueOf() + 7*86400000); //add 6 days to get last day 1390 var weekEndHidden = new Date(weekStart.valueOf() + 6*86400000); //add 6 days to get last day 1391 weekStart = new Date(newDate.valueOf() - (d<=0 ? 7-5:d-5)*86400000); 1392 var dateFormat = inst.settings.dateFormat; 1393 $('#datepickerDateStart').val($.datepicker.formatDate( dateFormat, weekStart, inst.settings )); 1394 $('#txt-dateEnd').val($.datepicker.formatDate( dateFormat, weekEnd, inst.settings )); 1395 $('#dateStart').val($.datepicker.formatDate( 'yy-mm-dd', weekStart, inst.settings )); 1396 $('#dateEnd').val($.datepicker.formatDate( 'yy-mm-dd', weekEndHidden, inst.settings )); 1397 1398 $( ".selector" ).datepicker( "option", "minDate", new Date(2007, 1 - 1, 1) ); 1399 1400 if(day != 5 && day != 6 && day != 0){ 1401 disponibilites.push( { dateStart: new Date(selectedDate), dateEnd: new Date(selectedDate), type: 'date-no-week' } ); 1402 } 1403 1404 /* Determine if the user clicked an disponibilite: */ 1405 while (i < disponibilites.length) { 1406 dateStart = disponibilites[i].dateStart; 1407 dateEnd = disponibilites[i].dateEnd; 1408 // if (selectedDate.valueOf() === dateStart.valueOf()) { 1409 1410 if (selectedDate.valueOf() >= dateStart.valueOf() && selectedDate.valueOf() <= dateEnd.valueOf()) { 1411 disponibilite.push(disponibilites[i]); 1412 if(disponibilites[i].type != "available"){ 1413 swal("Erreur !", "Jour indisponible", "error"); 1414 $('#datepickerDateStart, #txt-dateEnd, #dateStart, #dateEnd').val(''); 1415 } 1416 } 1417 i++; 1418 } 1419 1420 1421 if (disponibilite.length > 0) { 1422 1423 for(k=0; k<disponibilite.length; k++){ 1424 // Contenu de la lightbox 1425 } 1426 } 1427 else{ 1428 } 1429} 1430 1431function datePickerBeforeShowDay(date, disponibilites) { 1432 var result = [true, '', null]; 1433 var day = date.getDay(); 1434 var dateNew, 1435 selectedDate = new Date(date), 1436 i = 0, 1437 j = 0, 1438 disponibilite = []; 1439 if(day != 5 && day != 6 && day != 0){ 1440 disponibilite.push( { dateStart: new Date(date), dateEnd: new Date(date), type: 'date-no-week' } ); 1441 } 1442 1443 var matching = $.grep(disponibilites, function(disponibilite) {
1444 return disponibilite.dateStart.valueOf() === date.valueOf(); 1445 }); 1446 1447 // Récupération des éléments du tableau disponibilite (type) 1448 while (i < disponibilites.length) { 1449 dateStart = disponibilites[i].dateStart; 1450 dateEnd = disponibilites[i].dateEnd; 1451 1452 // if (selectedDate.valueOf() === dateNew.valueOf()) { 1453 if (selectedDate.valueOf() >= dateStart.valueOf() && selectedDate.valueOf() <= dateEnd.valueOf()) { 1454 disponibilite.push(disponibilites[i]); 1455 } 1456 i++; 1457 j++; 1458 } 1459 1460 var type = []; 1461 for(k=0; k<disponibilite.length; k++){ 1462 if($.inArray(disponibilite[k].type,type)<0){ 1463 type.push(disponibilite[k].type); 1464 } 1465 } 1466 1467 1468 result = [true, type, null]; 1469 return result; 1470} 1471$(document).ready(function(){ 1472 1473 enquire.register("screen and (min-width: 320px) and (max-width: 949px)", { 1474 match : function() { 1475 menu_mobile(); 1476 $('#main-menu .content-menu').append($('#sidebar-menu')); 1477 $('#booking-left').parent().after($('#booking').parent()); 1478 $('#go-top span').click(function(){ 1479 $('html, body').stop().animate({scrollTop: 0}); 1480 if($('body').scrollTop() == 0){ 1481 $(this).parent().stop().fadeOut(); 1482 } 1483 }); 1484 $(window).scroll(function(e){ 1485 var st = $(this).scrollTop(); 1486 if($('body').scrollTop() > 0){ 1487 $('#go-top').stop().fadeIn(); 1488 } 1489 else{ 1490 $('#go-top').stop().fadeOut(); 1491 } 1492 }); 1493 }, 1494 unmatch : function() { 1495 jQuery(document).unbind('click'); 1496 $('#header-bottom').before($('#main-menu .content-menu #sidebar-menu')); 1497 $('#booking-left').parent().before($('#booking').parent()); 1498 } 1499 }); 1500 1501 enquire.register("screen and (min-width: 320px) and (max-width: 890px)", { 1502 match : function() { 1503 $('footer').before($('#right-header')); 1504 }, 1505 unmatch: function(){ 1506 $('#header-top #logo').after($('#right-header')); 1507 } 1508 }); 1509 1510 enquire.register("screen and (max-width: 800px)", { 1511 match : function() { 1512 $('#left #list-news .news').each(function(){ 1513 $(this).find('.info').before($(this).find('.image')); 1514 }); 1515 }, 1516 unmatch : function() { 1517 $('#left #list-news .news').each(function(){ 1518 $(this).find('.info').after($(this).find('.image')); 1519 }); 1520 } 1521 }); 1522 1523}); 1524 1525function menu_mobile(){ 1526 1527 jQuery('#main-menu ul li:first >a').text('Accueil'); 1528 1529 jQuery(document).on('click', '#main-menu .mobile-menu', function(e){ 1530 if(!jQuery(this).parents('#main-menu').find('.content-menu').is(':visible')){ 1531 jQuery(this).addClass('active'); 1532 jQuery(this).parents('#main-menu').find('.content-menu').stop().slideDown('normal'); 1533 jQuery(this).parents('#main-menu').find('.content-menu').css({maxHeight: $(window).height() - $('#main-menu').outerHeight(true)+"px"}); 1534 } 1535 else{ 1536 jQuery(this).removeClass('active'); 1537 jQuery(this).parents('#main-menu').find('.content-menu').stop().slideUp('normal'); 1538 } 1539 jQuery('#main-menu >ul >li .content-menu, #main-menu >ul >li ul').stop().slideUp('normal'); 1540 jQuery('#main-menu >ul >li').removeClass('active'); 1541 return false; 1542 }); 1543 1544 jQuery(document).on('click', '#main-menu .content-menu >ul >li >a', function(e){ 1545 jQuery('#main-menu .content-menu >ul >li, #main-menu .content-menu >ul >li >ul >li').removeClass('active'); 1546 1547 if(!jQuery(this).find('>ul').is(':visible')){ 1548 jQuery('#main-menu .content-menu >ul >li >ul, #main-menu .content-menu >ul >li >ul >li >ul').stop().slideUp('normal'); 1549 jQuery(this).parent().addClass('active'); 1550 } 1551 jQuery(this).parent().find('>ul').stop().slideToggle('normal', function(){ 1552 jQuery(this).height("auto"); 1553 }); 1554 1555 if(jQuery(this).parent().find('>ul').size() > 0){ 1556 return false; 1557 } 1558 }); 1559 1560 jQuery(document).on('click', '#main-menu .content-menu >ul >li >ul >li >a', function(e){ 1561 jQuery('#main-menu .content-menu >ul >li >ul >li').removeClass('active'); 1562 1563 if(!jQuery(this).find('>ul').is(':visible')){ 1564 jQuery('#main-menu .content-menu >ul >li >ul >li >ul').stop().slideUp('normal'); 1565 jQuery(this).parent().addClass('active'); 1566 } 1567 1568 jQuery(this).parent().find('>ul').stop().slideToggle('normal', function(){ 1569 jQuery(this).height("auto"); 1570 }); 1571 1572 if(jQuery(this).parent().find('>ul').size() > 0){ 1573 return false; 1574 } 1575 }); 1576}
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.