!function(c,h,n){"use strict";function s(t,e){this.elem=t,this.options=e,this.metadata=this.elem.getAttribute("data-plugin-options")?JSON.parse(this.elem.getAttribute("data-plugin-options")):{}}s.defaults=(s.prototype={public:function(){return{startDate:moment().startOf("day"),endDate:moment().startOf("day"),format:"L",dateSeparator:" - ",calendarCount:2,mobileBreakpoint:760,isHotelBooking:!1,inline:!1,minDate:null,maxDate:null,showHeader:!0,showFooter:!0,rangeOrientation:"horizontal",verticalRangeWidth:180,showButtons:!1,startOnMonday:!1,container:"body",oneCalendarWidth:230,enableKeyboard:!0,showOn:"bottom",arrowOn:"left",autoAlign:!0,locale:moment.locale(),singleDate:!1,target:null,autoCloseOnSelect:!1,startEmpty:!1,isRTL:!1,ranges:[{title:"Today",startDate:moment(),endDate:moment()},{title:"3 Days",startDate:moment(),endDate:moment().add(2,"days")},{title:"5 Days",startDate:moment(),endDate:moment().add(4,"days")},{title:"1 Week",startDate:moment(),endDate:moment().add(6,"days")},{title:"Till Next Week",startDate:moment(),endDate:moment().endOf("week")},{title:"Till Next Month",startDate:moment(),endDate:moment().endOf("month")}],rangeLabel:"Ranges: ",cancelLabel:"Cancel",applyLabel:"Apply",nextMonthIcon:"",prevMonthIcon:"",rangeIcon:"",headerSeparator:"",onbeforeselect:function(){return!0},onafterselect:function(){},onbeforeshow:function(){},onbeforehide:function(){},onaftershow:function(){},onafterhide:function(){},onfirstselect:function(){},onrangeselect:function(){},onbeforemonthchange:function(){return!0},onaftermonthchange:function(){},onafteryearchange:function(){},ondraw:function(){},onBeforeInit:function(){},onBeforeDestroy:function(){return!0},oninit:function(){},ondestroy:function(){},validateClick:function(){return!0},onCancel:function(){return!0},disableDays:function(){return!1},disabledRanges:[],continuous:!1,disableOnlyStart:!1,disableOnlyEnd:!1,minSelectedDays:0,enableMonthSwitcher:!0,enableYearSwitcher:!0,enableSwipe:!0,numericMonthSwitcher:!1,monthSwitcherFormat:"MMMM",showWeekNumbers:!1,hideOutOfRange:!1,DOBCalendar:!1}},private:function(){return{startSelected:!1,currentDate:moment().startOf("day"),endSelected:!0,hoverDate:null,keyboardHoverDate:null,headerStartDay:null,headerStartDate:null,headerStartWeekday:null,headerEndDay:null,headerEndDate:null,headerEndWeekday:null,swipeX:0,swipeY:0,swipeStart:0,swipeTimeout:null,isMobile:!1,valElements:["BUTTON","OPTION","INPUT","LI","METER","PROGRESS","PARAM"],dontHideOnce:!1,initiator:null,initComplete:!1,startDateBackup:null,startDateInitial:null,endDateInitial:null,firstValueSelected:!1,throttleTimeout:null,instanceId:null,documentEvent:null,delayInputUpdate:!1,lastScrollX:0,lastScrollY:0,isTicking:!1,parentScrollEventsAttached:!1,rafID:0,disabledDays:{}}},init:function(){return this.config=this.extend(this.extend(this.public(),this.options),this.metadata),this.globals=this.private(),this.globals.isMobile=this.checkMobile(),this.globals.instanceId=Math.round(+new Date+100*Math.random()),this.events=this.eventsPrototype(),this.events.init(this.globals.instanceId),this.config.onBeforeInit(this),this.applyConfig(),this.fetchInputs(),this.drawUserInterface(),this.drawOverlay(),this.addInitialEvents(),this.addKeyboardEvents(),(this.elem.caleran=this).config.oninit(this),this.globals.initComplete=!0,this.globals.lastScrollX=0,this.globals.lastScrollY=0,this.events.dispatch(c,"resize"),this},validateDates:function(){var t;(moment.isMoment(this.config.startDate)&&this.config.startDate.isValid()||moment(this.config.startDate,this.config.format).isValid())&&(moment.isMoment(this.config.endDate)&&this.config.endDate.isValid()||moment(this.config.endDate,this.config.format).isValid())?(this.config.startDate=moment(this.config.startDate,this.config.format).middleOfDay().locale(this.config.locale),this.config.endDate=moment(this.config.endDate,this.config.format).middleOfDay().locale(this.config.locale),this.config.startDate.isAfter(this.config.endDate,"day")&&(t=this.config.startDate.clone(),this.config.startDate=this.config.endDate.clone(),this.config.endDate=t.clone(),t=null)):(this.config.startDate=moment().middleOfDay().locale(this.config.locale),this.config.endDate=moment().middleOfDay().locale(this.config.locale)),this.globals.currentDate=moment(this.config.startDate,this.config.format),null!==this.config.minDate&&moment(this.config.minDate,this.config.format).isValid()?this.config.minDate=moment(this.config.minDate,this.config.format).middleOfDay():this.config.minDate=null,null!==this.config.maxDate&&moment(this.config.maxDate,this.config.format).isValid()?this.config.maxDate=moment(this.config.maxDate,this.config.format).middleOfDay():this.config.maxDate=null,null!==this.config.minDate&&null!==this.config.maxDate&&this.config.minDate.isAfter(this.config.maxDate,"day")&&(t=this.config.minDate.clone(),this.config.minDate=this.config.maxDate.clone(),this.config.maxDate=t.clone(),t=null),null!==this.config.minDate&&null!==this.config.startDate&&this.config.minDate.isAfter(this.config.startDate,"day")&&(this.config.startDate=this.config.minDate.clone()),null!==this.config.minDate&&null!==this.config.endDate&&this.config.minDate.isAfter(this.config.endDate,"day")&&(this.config.endDate=this.config.minDate.clone()),null!==this.config.maxDate&&null!==this.config.startDate&&this.config.maxDate.isBefore(this.config.startDate,"day")&&(this.config.startDate=this.config.maxDate.clone()),null!==this.config.maxDate&&null!==this.config.endDate&&this.config.maxDate.isBefore(this.config.endDate,"day")&&(this.config.endDate=this.config.maxDate.clone()),(!1===this.checkRangeContinuity()||1==this.config.disableOnlyStart&&this.isDisabled(this.config.startDate,this.config.isHotelBooking)||!1===this.config.singleDate&&this.config.disableOnlyEnd&&this.isDisabled(this.config.endDate,this.config.isHotelBooking)||this.config.startEmpty&&0==this.globals.firstValueSelected)&&this.clearInput()},applyConfig:function(){null===this.config.target&&(this.config.target=this.elem),!0===this.config.inline&&(this.config.DOBCalendar=!1),1==this.config.DOBCalendar&&(this.config.singleDate=!0),"string"==typeof this.config.container&&(this.config.container=h.querySelector(this.config.container));for(var t=["startDate","endDate","minDate","maxDate"],e=0;e .caleran-container-mobile");if(0