jtsage-datebox-bootstrap4
Advanced tools
Comparing version 4.2.2 to 4.2.3
@@ -1,3 +0,3 @@ | ||
/*! JTSage-DateBox-4.2.2 |2017-06-20T22:49:58Z | (c) 2010, 2017 JTSage | https://github.com/jtsage/jquery-mobile-datebox/blob/master/LICENSE.txt */ | ||
!function(a){a.widget("jtsage.datebox",{initSelector:"input[data-role='datebox']",options:{version:"4.2.2",jqmVersion:"1.4.5",bootstrapVersion:"3.3.7",bootstrap4Version:"4.0.0a6",jqmuiWidgetVersion:"1.11.4",theme:!1,themeDefault:"a",themeHeader:"a",themeSetButton:"a",themeCloseButton:"secondary",mode:!1,transition:"fade",useAnimation:!0,hideInput:!1,hideContainer:!1,lockInput:!0,zindex:"1100",clickEvent:"click",clickEventAlt:"click",useKinetic:!0,defaultValue:!1,showInitialValue:!1,linkedField:!1,linkedFieldFormat:"%J",popupPosition:!1,popupButtonPosition:"left",popupForceX:!1,popupForceY:!1,useModal:!0,useModalTheme:"b",useInline:!1,useInlineBlind:!1,useHeader:!0,useImmediate:!1,useButton:!0,buttonIcon:!1,useFocus:!1,useSetButton:!0,useCancelButton:!1,useTodayButton:!1,useTomorrowButton:!1,useClearButton:!1,useCollapsedBut:!1,usePlaceholder:!1,beforeOpenCallback:!1,beforeOpenCallbackArgs:[],openCallback:!1,openCallbackArgs:[],closeCallback:!1,closeCallbackArgs:[],startOffsetYears:!1,startOffsetMonths:!1,startOffsetDays:!1,afterToday:!1,beforeToday:!1,notToday:!1,maxDays:!1,minDays:!1,maxYear:!1,minYear:!1,blackDates:!1,blackDatesRec:!1,blackDays:!1,whiteDates:!0,minHour:!1,maxHour:!1,minTime:!1,maxTime:!1,maxDur:!1,minDur:!1,minuteStep:1,minuteStepRound:0,twoDigitYearCutoff:38,rolloverMode:{m:!0,d:!0,h:!0,i:!0,s:!0},useLang:"default",lang:{"default":{setDateButtonLabel:"Set Date",setTimeButtonLabel:"Set Time",setDurationButtonLabel:"Set Duration",todayButtonLabel:"Jump to Today",tomorrowButtonLabel:"Jump to Tomorrow",titleDateDialogLabel:"Set Date",titleTimeDialogLabel:"Set Time",daysOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysOfWeekShort:["Su","Mo","Tu","We","Th","Fr","Sa"],monthsOfYear:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsOfYearShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],durationLabel:["Days","Hours","Minutes","Seconds"],durationDays:["Day","Days"],timeFormat:24,headerFormat:"%A, %B %-d, %Y",tooltip:"Open Date Picker",nextMonth:"Next Month",prevMonth:"Previous Month",dateFieldOrder:["m","d","y"],timeFieldOrder:["h","i","a"],slideFieldOrder:["y","m","d"],dateFormat:"%Y-%m-%d",useArabicIndic:!1,isRTL:!1,calStartDay:0,clearButton:"Clear",cancelButton:"Cancel",durationOrder:["d","h","i","s"],meridiem:["AM","PM"],timeOutput:"%k:%M",durationFormat:"%Dd %DA, %Dl:%DM:%DS",calDateListLabel:"Other Dates",calHeaderFormat:"%B %Y"}},themeDateToday:"info",themeDayHigh:"warning",themeDatePick:"info",themeDateHigh:"warning",themeDateHighAlt:"danger",themeDateHighRec:"warning",themeDate:"secondary",themeButton:"secondary",themeInput:"default",themeClearButton:"secondary",themeCancelButton:"secondary",themeTomorrowButton:"secondary",themeTodayButton:"secondary",buttonIconDate:"calendar",buttonIconTime:"clock-o",disabledState:"disabled",bootstrapDropdown:!0,bootstrapDropdownRight:!0,bootstrapModal:!1,bootstrapResponsive:!0,calNextMonthIcon:"plus",calPrevMonthIcon:"minus",useInlineAlign:"left",btnCls:" btn btn-sm btn-",icnCls:" fa fa-",s:{cal:{prevMonth:"<span title='{text}' class='fa fa-{icon}'></span>",nextMonth:"<span title='{text}' class='fa fa-{icon}'></span>",botButton:"<a href='#' class='{cls}' role='button'><span class='{icon}'></span> {text}</a>"}},tranDone:"webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",calHighToday:!0,calHighPick:!0,calShowDays:!0,calOnlyMonth:!1,calWeekMode:!1,calWeekModeDay:1,calControlGroup:!1,calShowWeek:!1,calUsePickers:!1,calNoHeader:!1,calFormatter:!1,calAlwaysValidateDates:!1,calYearPickMin:-6,calYearPickMax:6,calYearPickRelative:!0,calBeforeAppendFunc:function(a){return a},highDays:!1,highDates:!1,highDatesRec:!1,highDatesAlt:!1,enableDates:!1,calDateList:!1,calShowDateList:!1,validHours:!1,repButton:!0,durationStep:1,durationSteppers:{d:1,h:1,i:1,s:1},flen:{y:25,m:24,d:40,h:24,i:30,s:30},slen:{y:9,m:14,d:16,h:16,i:30}},_getLongOptions:function(a){var b,c,d={},e="datebox",f=7;for(b in a.data())b.substr(0,f)===e&&b.length>f&&(c=b.substr(f),c=c.charAt(0).toLowerCase()+c.slice(1),"options"!==c&&(d[c]=a.data(b)));return d},_setOption:function(){a.Widget.prototype._setOption.apply(this,arguments),this.refresh()},getOption:function(a){var b=this.__(a);return"Err:NotFound"!==b?b:this.options[a]},baseMode:"bootstrap4",_stdBtn:{cancel:function(){var b=this,c=this.options;return a("<a href='#' role='button' class='btn btn-"+c.themeCancelButton+"'><span class='"+c.icnCls+"remove'></span> "+b.__("cancelButton")+"</a>").on(c.clickEventAlt,function(a){a.preventDefault(),b._t({method:"close",closeCancel:!0})})},clear:function(){var b=this,c=this.options;return a("<a href='#' role='button' class='btn btn-"+c.themeClearButton+"'><span class='"+c.icnCls+"eraser'></span> "+b.__("clearButton")+"</a>").on(c.clickEventAlt,function(a){a.preventDefault(),b.d.input.val(""),b._t({method:"clear"}),b._t({method:"close",closeCancel:!0})})},close:function(b,c){var d=this,e=this.options;return"undefined"==typeof c&&(c=!1),a("<a href='#' role='button' class='btn btn-"+e.themeCloseButton+"'><span class='"+e.icnCls+"check'></span> "+b+"</a>").addClass(""+(d.dateOK===!0?"":"disabled")).on(e.clickEventAlt,function(a){a.preventDefault(),d.dateOK===!0&&(c===!1?d._t({method:"set",value:d._formatter(d.__fmt(),d.theDate),date:d.theDate}):d._t(c),d._t({method:"close"}))})},today:function(){var b=this,c=this.options;return a("<a href='#' role='button' class='btn btn-"+c.themeTodayButton+"'><span class='"+c.icnCls+"send'></span> "+b.__("todayButtonLabel")+"</a>").on(c.clickEventAlt,function(a){a.preventDefault(),b.theDate=b._pa([0,0,0],new b._date),b.calBackDate=!1,b._t({method:"doset"})})},tomorrow:function(){var b=this,c=this.options;return a("<a href='#' role='button' class='btn btn-"+c.themeTomorrowButton+"'><span class='"+c.icnCls+"send'></span> "+b.__("tomorrowButtonLabel")+"</a>").on(c.clickEventAlt,function(a){a.preventDefault(),b.theDate=b._pa([0,0,0],new b._date).adj(2,1),b.calBackDate=!1,b._t({method:"doset"})})}},_destroy:function(){var b=this,c=this.options,d=this.d.wrap.find(".input-group-addon");c.useButton===!0&&(d.remove(),b.d.input.unwrap()),c.lockInput&&b.d.input.removeAttr("readonly"),b.d.input.off("datebox").off("focus.datebox").off("blur.datebox").off("change.datebox"),a(document).off(b.drag.eMove).off(b.drag.eEnd).off(b.drag.eEndA)},_create:function(){a(document).trigger("dateboxcreate");var b=this,c=a.extend(this.options,this._getLongOptions(this.element),this.element.data("options")),d=c.theme===!1?"default":c.theme,e={input:this.element,wrap:this.element.parent(),mainWrap:a("<div>",{"class":"ui-datebox-container"}).css("zIndex",c.zindex),intHTML:!1},f=".datebox"+this.uuid,g="undefined"!=typeof window.ontouchstart,h={eStart:"touchstart"+f+" mousedown"+f,eMove:"touchmove"+f+" mousemove"+f,eEnd:"touchend"+f+" mouseup"+f,eEndA:["mouseup","touchend","touchcanel","touchmove"].join(f+" ")+f,move:!1,start:!1,end:!1,pos:!1,target:!1,delta:!1,tmp:!1};a.extend(b,{d:e,drag:h,touch:g}),c.usePlaceholder!==!1&&(c.usePlaceholder===!0&&""!==b._grabLabel()&&b.d.input.attr("placeholder",b._grabLabel()),"string"==typeof c.usePlaceholder&&b.d.input.attr("placeholder",c.usePlaceholder)),c.theme=d,b.cancelClose=!1,b.calBackDate=!1,b.calDateVisible=!0,b.disabled=!1,b.runButton=!1,b._date=window.Date,b._enhanceDate(),b.baseID=b.d.input.attr("id"),b.initDate=new b._date,b.initDate.setMilliseconds(0),b.theDate=c.defaultValue?b._makeDate():""!==b.d.input.val()?b._makeDate(b.d.input.val()):new b._date,""===b.d.input.val()&&b._startOffset(b.theDate),b.initDone=!1,c.showInitialValue&&b.d.input.val(b._formatter(b.__fmt(),b.theDate)),b.d.wrap=b.d.input.wrap("<div class='input-group'>").parent(),c.mode!==!1&&c.buttonIcon===!1&&("time"===c.mode.substr(0,4)||"dur"===c.mode.substr(0,3)?c.buttonIcon=c.buttonIconTime:c.buttonIcon=c.buttonIconDate),c.useButton?a("<div class='input-group-addon' style='border-right:1px solid rgba(0,0,0,0.15);border-radius: 0px 4px 4px 0px;'><span class='"+c.icnCls+c.buttonIcon+"'></span></div>").attr("title",b.__("tooltip")).on(c.clickEvent,function(a){a.preventDefault(),c.useFocus?b.d.input.focus():b.disabled||b._t({method:"open"})}).appendTo(b.d.wrap):b.d.wrap.css("width","100%"),c.hideInput&&b.d.wrap.hide(),c.hideContainer&&b.d.wrap.parent().hide(),c.hideContainer&&!c.useInline&&(c.bootstrapModal=!0,c.bootstrapResponsive=!1),b.d.input.on("focus.datebox",function(){b.d.input.addClass("ui-focus"),b.disabled===!1&&c.useFocus&&b._t({method:"open"})}).on("blur.datebox",function(){b.d.input.removeClass("ui-focus")}).on("change.datebox",function(){b.theDate=b._makeDate(b.d.input.val()),b.refresh()}).on("datebox",b._event),c.lockInput&&b.d.input.attr("readonly","readonly"),"undefined"!=typeof a.event.special.mousewheel&&(b.wheelExists=!0),b.d.input.is(":disabled")&&b.disable(),b.applyMinMax(!1,!1),(c.useInline||c.useInlineBlind)&&b.open(),a(document).trigger("dateboxaftercreate")},open:function(){var b=this,c=this.options,d={};if(c.useFocus&&b.fastReopen===!0)return b.d.input.blur(),!1;if(b.theDate=b._makeDate(b.d.input.val()),b.calBackDate=!1,""===b.d.input.val()&&b._startOffset(b.theDate),b.d.input.blur(),"undefined"==typeof b._build[c.mode]?b._build["default"].apply(b,[]):b._build[c.mode].apply(b,[]),"undefined"!=typeof b._drag[c.mode]&&b._drag[c.mode].apply(b,[]),b._t({method:"refresh"}),b.__("useArabicIndic")===!0&&b._doIndic(),(c.useInline||c.useInlineBlind)&&b.initDone===!1){switch(b.d.mainWrap.append(b.d.intHTML),c.hideContainer?(c.useHeader&&b.d.mainWrap.prepend(a(b._spf("<div class='{c1}'><h4 class='{c2}'>{text}</h4></div>",{c1:"modal-header",c2:"modal-title text-center",text:b.d.headerText}))),b.d.wrap.parent().after(b.d.mainWrap)):b.d.wrap.parent().append(b.d.mainWrap),c.useInlineAlign){case"right":b.d.mainWrap.css({marginRight:0,marginLeft:"auto"});break;case"left":b.d.mainWrap.css({marginLeft:0,marginRight:"auto"});break;case"center":case"middle":b.d.mainWrap.css({marginLeft:"auto",marginRight:"auto"})}if(b.d.mainWrap.removeClass("ui-datebox-hidden ui-overlay-shadow"),c.useInline)return b.d.mainWrap.addClass("ui-datebox-inline").css("zIndex","auto"),c.hideInput||c.hideContainer||b.d.mainWrap.addClass("ui-datebox-inline-has-input"),setTimeout(function(a){return function(){a._t({method:"postrefresh"})}}(b),100),!0;b.d.mainWrap.addClass("ui-datebox-inline ui-datebox-inline-has-input").css("zIndex","auto"),b.d.mainWrap.hide(),b.initDone=!1,b._t({method:"postrefresh"})}return c.useInlineBlind?(b.initDone?(b.refresh(),b.d.mainWrap.slideDown(),b._t({method:"postrefresh"})):b.initDone=!0,!0):b.d.intHTML.is(":visible")?!1:(b.d.mainWrap.empty(),c.useHeader&&b.d.mainWrap.append(a(b._spf("<div class='{c1}'><h5 class='{c2}'>{text}</h5><button type='button' class='btn btn-sm btn-secondary closer'><span aria-hidden='true'>×</span></button></div>",{c1:"modal-header",c2:"modal-title",c3:"closer"+c.icnCls+"remove pull-"+c.popupButtonPosition,text:b.d.headerText}))).find(".closer").on(c.clickEventAlt,function(a){a.preventDefault(),b._t({method:"close",closeCancel:!0})}),b.d.mainWrap.append(b.d.intHTML).css("zIndex",c.zindex),b._t({method:"postrefresh"}),c.openCallback!==!1?(a.isFunction(c.openCallback)||"function"==typeof window[c.openCallback]&&(c.openCallback=window[c.openCallback]),d.afteropen=function(){b._t({method:"postrefresh"}),c.openCallback.apply(b,a.merge([{custom:b.customCurrent,initDate:b.initDate,date:b.theDate,duration:b.lastDuration}],c.openCallbackArgs))===!1&&b._t({method:"close"})}):d.afteropen=function(){b._t({method:"postrefresh"})},c.beforeOpenCallback!==!1&&(a.isFunction(c.beforeOpenCallback)||"function"==typeof window[c.beforeOpenCallback]&&(c.beforeOpenCallback=window[c.beforeOpenCallback]),c.beforeOpenCallback.apply(b,a.merge([{custom:b.customCurrent,initDate:b.initDate,date:b.theDate,duration:b.lastDuration}],c.beforeOpenCallbackArgs))===!1)?!1:(c.bootstrapResponsive===!0?a(window).width()>768?(c.bootstrapModal=!1,c.bootstrapDropdown=!0):(c.bootstrapModal=!0,c.bootstrapDropdown=!1):c.bootstrapModal===!0&&(c.bootstrapDropdown=!1),c.bootstrapDropdown===!1&&c.bootstrapModal===!0&&(b.d.mainWrap.addClass("w-100"),b.d.modalWrap=a('<div id="jtdb-'+this.uuid+'" class="modal fade"><div class="modal-dialog" role="document"><div class="modal-content"></div></div></div>').addClass(c.useAnimation?c.transition:""),b.d.modalWrap.find(".modal-content").append(b.d.mainWrap),b.d.modalWrap.appendTo(a("body")).on("shown.bs.modal",function(){d.afteropen.call()}).modal({backdrop:"static"}),b.d.modalWrap.modal("show")),void(c.bootstrapDropdown===!0&&c.bootstrapModal===!1&&(b.d.mainWrap.removeClass("w-100").addClass("dropdown-menu").addClass(c.useAnimation?c.transition:"").addClass(c.bootstrapDropdownRight===!0?"dropdown-menu-right":"").appendTo(b.d.wrap).on(c.tranDone,function(){b.d.mainWrap.is(":visible")?d.afteropen.call():(d.afterclose.call(),b.d.wrap.removeClass("show"))}),b.d.wrap.addClass("show"),b.d.backdrop=a("<div class='jtsage-datebox-backdrop-div'></div>").css({position:"fixed",left:0,top:0,bottom:0,right:0}).appendTo("body").on(c.clickEvent,function(a){a.preventDefault(),b._t({method:"close",closeCancel:!0})}),window.setTimeout(function(){b.d.mainWrap.addClass("show")},0)))))},close:function(){var b=this,c=this.options,d={};return b.calBackDate=!1,c.useInlineBlind?(b.d.mainWrap.slideUp(),!0):c.useInline||b.d.intHTML===!1?!0:(c.closeCallback!==!1?(a.isFunction(c.closeCallback)||"function"==typeof window[c.closeCallback]&&(c.closeCallback=window[c.closeCallback]),d.afterclose=function(){c.closeCallback.apply(b,a.merge([{custom:b.customCurrent,initDate:b.initDate,date:b.theDate,duration:b.lastDuration,cancelClose:b.cancelClose}],c.closeCallbackArgs))}):d.afterclose=function(){return!0},c.bootstrapDropdown===!1&&c.bootstrapModal===!0&&(b.d.modalWrap.on("hidden.bs.modal",function(){d.afterclose.call(),b.d.modalWrap.remove()}),b.d.modalWrap.modal("hide")),c.bootstrapDropdown===!0&&c.bootstrapModal===!1&&(c.useAnimation===!0?(b.d.mainWrap.removeClass("show"),b.d.backdrop.remove(),a(".jtsage-datebox-backdrop-div").remove(),window.setTimeout(function(){b.d.wrap.removeClass("show"),d.afterclose.call()},0)):(b.d.wrap.removeClass("show"),b.d.backdrop.remove(),a(".jtsage-datebox-backdrop-div").remove(),d.afterclose.call())),a(document).off(b.drag.eMove).off(b.drag.eEnd).off(b.drag.eEndA),void(c.useFocus&&(b.fastReopen=!0,setTimeout(function(a){return function(){a.fastReopen=!1}}(b),300))))},disable:function(){var a=this;a.d.input.attr("disabled",!0),a.disabled=!0,a._t({method:"disable"})},enable:function(){var a=this;a.d.input.attr("disabled",!1),a.disabled=!1,a._t({method:"enable"})},_controlGroup:function(a){var b=this.options;return b.useCollapsedBut?(a.find("a").css({width:"auto"}),a.addClass("btn-group btn-group-justified")):a.addClass("btn-group-vertical"),a},_enhanceDate:function(){a.extend(this._date.prototype,{copy:function(b,c){return b=a.extend([0,0,0,0,0,0,0],b),c=a.extend([0,0,0,0,0,0,0],c),new Date(c[0]>0?c[0]:this.get(0)+b[0],c[1]>0?c[1]:this.get(1)+b[1],c[2]>0?c[2]:this.get(2)+b[2],c[3]>0?c[3]:this.get(3)+b[3],c[4]>0?c[4]:this.get(4)+b[4],c[5]>0?c[5]:this.get(5)+b[5],c[6]>0?c[5]:this.get(6)+b[6])},adj:function(a,b){if("number"!=typeof b||"number"!=typeof a)throw new Error("Invalid Arguments");switch(a){case 0:this.setD(0,this.get(0)+b);break;case 1:this.setD(1,this.get(1)+b);break;case 2:this.setD(2,this.get(2)+b);break;case 3:b*=60;case 4:b*=60;case 5:b*=1e3;case 6:this.setTime(this.getTime()+b)}return this},setD:function(a,b){switch(a){case 0:this.setFullYear(b);break;case 1:this.setMonth(b);break;case 2:this.setDate(b);break;case 3:this.setHours(b);break;case 4:this.setMinutes(b);break;case 5:this.setSeconds(b);break;case 6:this.setMilliseconds(b)}return this},get:function(a){switch(a){case 0:return this.getFullYear();case 1:return this.getMonth();case 2:return this.getDate();case 3:return this.getHours();case 4:return this.getMinutes();case 5:return this.getSeconds();case 6:return this.getMilliseconds()}return!1},get12hr:function(){return 0===this.get(3)?12:this.get(3)<13?this.get(3):this.get(3)-12},iso:function(){var a=[0,0,0],b=0;for(b=0;3>b;b++)a[b]=this.get(b),1===b&&a[b]++,a[b]<10&&(a[b]="0"+String(a[b]));return a.join("-")},comp:function(){return parseInt(this.iso().replace(/-/g,""),10)},getEpoch:function(){return Math.floor(this.getTime()/1e3)},getArray:function(){var a=[0,0,0,0,0,0],b=0;for(b=0;6>b;b++)a[b]=this.get(b);return a},setFirstDay:function(a){return this.setD(2,1).adj(2,a-this.getDay()),this.get(2)>10&&this.adj(2,7),this},setDWeek:function(a,b){return 4===a?this.setD(1,0).setD(2,1).setFirstDay(4).adj(2,-3).adj(2,7*(b-1)):this.setD(1,0).setD(2,1).setFirstDay(a).adj(2,7*(b-1))},getDWeek:function(a){var b,c;switch(a){case 0:return b=this.copy([0,-1*this.getMonth()]).setFirstDay(0),Math.floor((this.getTime()-(b.getTime()+6e4*(this.getTimezoneOffset()-b.getTimezoneOffset())))/6048e5)+1;case 1:return b=this.copy([0,-1*this.getMonth()]).setFirstDay(1),Math.floor((this.getTime()-(b.getTime()+6e4*(this.getTimezoneOffset()-b.getTimezoneOffset())))/6048e5)+1;case 4:return 11===this.getMonth()&&this.getDate()>28?1:(b=this.copy([0,-1*this.getMonth()],!0).setFirstDay(4).adj(2,-3),c=Math.floor((this.getTime()-(b.getTime()+6e4*(this.getTimezoneOffset()-b.getTimezoneOffset())))/6048e5)+1,1>c?(b=this.copy([-1,-1*this.getMonth()]).setFirstDay(4).adj(2,-3),Math.floor((this.getTime()-b.getTime())/6048e5)+1):c);default:return 0}}})},_ord:{"default":function(a){var b=a%10;return a>9&&21>a||b>3?"th":["th","st","nd","rd"][b]}},_customformat:{"default":function(){return!1}},_formatter:function(a,b,c){var d,e=this,f=this.options,g=0;return"undefined"==typeof c&&(c=!0),"dura"===f.mode.substr(0,4)&&(g=e._dur(this.theDate.getTime()-this.initDate.getTime()),a.match(/%Dd/)||(g[1]+=24*g[0]),a.match(/%Dl/)||(g[2]+=60*g[1]),a.match(/%DM/)||(g[3]+=60*g[2])),a=a.replace(/%(D|X|0|-)*([1-9a-zA-Z])/g,function(a,c,h){if("X"===c)return"undefined"!=typeof e._customformat[f.mode]?e._customformat[f.mode](h,b,f):a;if("D"===c)switch(h){case"d":return g[0];case"l":return e._zPad(g[1]);case"M":return e._zPad(g[2]);case"S":return e._zPad(g[3]);case"A":return e.__("durationDays")[1===g[0]?0:1];default:return a}switch(h){case"a":return e.__("daysOfWeekShort")[b.getDay()];case"A":return e.__("daysOfWeek")[b.getDay()];case"b":return e.__("monthsOfYearShort")[b.getMonth()];case"B":return e.__("monthsOfYear")[b.getMonth()];case"C":return parseInt(b.getFullYear()/100);case"d":return e._zPad(b.getDate(),c);case"H":case"k":return e._zPad(b.getHours(),c);case"I":case"l":return e._zPad(b.get12hr(),c);case"m":return e._zPad(b.getMonth()+1,c);case"M":return e._zPad(b.getMinutes(),c);case"p":case"P":return d=e.__("meridiem")[b.get(3)<12?0:1].toUpperCase(),"P"===h?d.toLowerCase():d;case"s":return b.getEpoch();case"S":return e._zPad(b.getSeconds(),c);case"u":return e._zPad(b.getDay()+1,c);case"w":return b.getDay();case"y":return e._zPad(b.getFullYear()%100);case"Y":return b.getFullYear();case"E":return b.getFullYear()+543;case"V":return e._zPad(b.getDWeek(4),c);case"U":return e._zPad(b.getDWeek(0),c);case"W":return e._zPad(b.getDWeek(1),c);case"o":return"undefined"!=typeof e._ord[f.useLang]?e._ord[f.useLang](b.getDate()):e._ord["default"](b.getDate());case"j":return d=new Date(b.getFullYear(),0,1),d="000"+String(Math.ceil((b-d)/864e5)+1),d.slice(-3);case"J":return b.toJSON();case"G":return d=b.getFullYear(),1===b.getDWeek(4)&&b.getMonth()>0?d+1:b.getDWeek(4)>51&&b.getMonth()<11?d-1:d;case"g":return d=b.getFullYear%100,1===b.getDWeek(4)&&b.getMonth()>0&&++d,b.getDWeek(4)>51&&b.getMonth()<11&&--d,e._zpad(d);default:return a}}),e.__("useArabicIndic")===!0&&c===!0&&(a=e._dRep(a)),a},_minStepFix:function(){var a=this.theDate.get(4),b=this.options.minuteStep,c=this.options.minStepRound,d=a%b;b>1&&d>0&&(0>c?a-=d:c>0?a+=b-d:b/2>a%b?a-=d:a+=b-d,this.theDate.setMinutes(a))},_check:function(){var b,c,d,e,f,g,h=this,i=this.options,j=this.theDate;if(h.dateOK=!0,"undefined"==typeof i.mode)return!0;if(i.afterToday&&(b=new h._date,b>j&&(j=b)),i.beforeToday&&(b=new h._date,j>b&&(j=b)),i.maxDays!==!1&&(b=new h._date,b.adj(2,i.maxDays),j>b&&(j=b)),i.minDays!==!1&&(b=new h._date,b.adj(2,-1*i.minDays),b>j&&(j=b)),i.minHour!==!1&&j.get(3)<i.minHour&&j.setD(3,i.minHour),i.maxHour!==!1&&j.get(3)>i.maxHour&&j.setD(3,i.maxHour),i.minTime!==!1&&(b=new h._date,g=i.minTime.split(":"),b.setD(3,g[0]).setD(4,g[1]),b>j&&(j=b)),i.maxTime!==!1&&(b=new h._date,g=i.maxTime.split(":"),b.setD(3,g[0]).setD(4,g[1]),j>b&&(j=b)),i.maxYear!==!1&&(b=new h._date(i.maxYear,11,31),j>b&&(j=b)),i.minYear!==!1&&(b=new h._date(i.minYear,0,1),b>j&&(j=b)),"time"===i.mode.substr(0,4)||"dur"===i.mode.substr(0,3))"timeflipbox"===i.mode&&i.validHours!==!1&&a.inArray(j.get(3),i.validHours)<0&&(h.dateOK=!1);else{if(i.blackDatesRec!==!1)for(c=j.get(0),d=j.get(1),e=j.get(2),f=0;f<i.blackDatesRec.length;f++)-1!==i.blackDatesRec[f][0]&&i.blackDatesRec[f][0]!==c||-1!==i.blackDatesRec[f][1]&&i.blackDatesRec[f][1]!==d||-1!==i.blackDatesRec[f][2]&&i.blackDatesRec[f][2]!==e||(h.dateOK=!1);i.blackDates!==!1&&a.inArray(j.iso(),i.blackDates)>-1&&(h.dateOK=!1),i.blackDays!==!1&&a.inArray(j.getDay(),i.blackDays)>-1&&(h.dateOK=!1),i.whiteDates!==!1&&a.inArray(h.theDate.iso(),i.whiteDates)>-1&&(h.dateOK=!0,j=h.theDate)}h.theDate=j},_fixstepper:function(b){var c=this.options.durationSteppers,d=this.options.durationStep;a.inArray("d",b)>-1&&(c.d=d),a.inArray("h",b)>-1&&(c.d=1,c.h=d),a.inArray("i",b)>-1&&(c.h=1,c.i=d),a.inArray("s",b)>-1&&(c.i=1,c.s=d)},_parser:{"default":function(){return!1}},_makeDate:function(b){var c,d,e,f,g=this,h=this.options,i=this.options.defaultValue,j=g.__fmt(),k=null,l=[],m=new g._date,n={year:-1,mont:-1,date:-1,hour:-1,mins:-1,secs:-1,week:!1,wtyp:4,wday:!1,yday:!1,meri:0};if(b=a.trim(g.__("useArabicIndic")===!0&&"undefined"!=typeof b?g._dRep(b,-1):b),"undefined"==typeof h.mode)return m;if("undefined"!=typeof g._parser[h.mode])return g._parser[h.mode].apply(g,[b]);if("durationbox"===h.mode||"durationflipbox"===h.mode){if(j=j.replace(/%D([a-z])/gi,function(a,b){switch(b){case"d":case"l":case"M":case"S":return"("+a+"|[0-9]+)";default:return".+?"}}),j=new RegExp("^"+j+"$"),k=j.exec(b),e=j.exec(g.__fmt()),null===k||k.length!==e.length)return"number"==typeof i&&i>0?new g._date(1e3*(g.initDate.getEpoch()+parseInt(i,10))):new g._date(g.initDate.getTime());for(d=g.initDate.getEpoch(),c=1;c<k.length;c++)f=parseInt(k[c],10),e[c].match(/^%Dd$/i)&&(d+=86400*f),e[c].match(/^%Dl$/i)&&(d+=3600*f),e[c].match(/^%DM$/i)&&(d+=60*f),e[c].match(/^%DS$/i)&&(d+=f);return new g._date(1e3*d)}if("%J"===j)return m=new g._date(b),isNaN(m.getDate())&&(m=new g._date),m;if(j=j.replace(/%(0|-)*([a-z])/gi,function(a,b,c){switch(l.push(c),c){case"p":case"P":case"b":case"B":return"("+a+"|.+?)";case"H":case"k":case"I":case"l":case"m":case"M":case"S":case"V":case"U":case"u":case"W":case"d":return"("+a+"|[0-9]{"+("-"===b?"1,":"")+"2})";case"j":return"("+a+"|[0-9]{3})";case"s":return"("+a+"|[0-9]+)";case"g":case"y":return"("+a+"|[0-9]{2})";case"E":case"G":case"Y":return"("+a+"|[0-9]{1,4})";default:return l.pop(),".+?"}}),j=new RegExp("^"+j+"$"),k=j.exec(b),e=j.exec(g.__fmt()),null===k||k.length!==e.length){if(i!==!1&&""!==i)switch(typeof i){case"object":a.isFunction(i.getDay)?m=i:3===i.length&&(m=g._pa(i,"time"===h.mode.substr(0,4)?m:!1));break;case"number":m=new g._date(1e3*i);break;case"string":"time"===h.mode.substr(0,4)?(d=a.extend([0,0,0],i.split(":")).slice(0,3),m=g._pa(d,m)):(d=a.extend([0,0,0],i.split("-")).slice(0,3),d[1]--,m=g._pa(d,!1))}isNaN(m.getDate())&&(m=new g._date)}else{for(c=1;c<k.length;c++)switch(f=parseInt(k[c],10),l[c-1]){case"s":return new g._date(1e3*parseInt(k[c],10));case"Y":case"G":n.year=f;break;case"E":n.year=f-543;break;case"y":case"g":h.afterToday||f<h.twoDigitYearCutoff?n.year=2e3+f:n.year=1900+f;break;case"m":n.mont=f-1;break;case"d":n.date=f;break;case"H":case"k":case"I":case"l":n.hour=f;break;case"M":n.mins=f;break;case"S":n.secs=f;break;case"u":n.wday=f-1;break;case"w":n.wday=f;break;case"j":n.yday=f;break;case"V":n.week=f,n.wtyp=4;break;case"U":n.week=f,n.wtyp=0;break;case"W":n.week=f,n.wtyp=1;break;case"p":case"P":f=new RegExp("^"+k[c]+"$","i"),n.meri=f.test(g.__("meridiem")[0])?-1:1;break;case"b":d=a.inArray(k[c],g.__("monthsOfYearShort")),d>-1&&(n.mont=d);break;case"B":d=a.inArray(k[c],g.__("monthsOfYear")),d>-1&&(n.mont=d)}if(0!==n.meri&&(-1===n.meri&&12===n.hour&&(n.hour=0),1===n.meri&&12!==n.hour&&(n.hour=n.hour+12)),m=new g._date(g._n(n.year,0),g._n(n.mont,0),g._n(n.date,1),g._n(n.hour,0),g._n(n.mins,0),g._n(n.secs,0),0),n.year<100&&-1!==n.year&&m.setFullYear(n.year),n.mont>-1&&n.date>-1||n.hour>-1&&n.mins>-1&&n.secs>-1)return m;n.week!==!1&&(m.setDWeek(n.wtyp,n.week),n.date>-1&&m.setDate(n.date)),n.yday!==!1&&m.setD(1,0).setD(2,1).adj(2,n.yday-1),n.wday!==!1&&m.adj(2,n.wday-m.getDay())}return m},_event:function(b,c){var d,e=a(this).data("jtsage-datebox"),f=a(this).data("jtsage-datebox").options;if(!b.isPropagationStopped())switch(c.method){case"close":"undefined"==typeof c.closeCancel&&(c.closeCancel=!1),e.cancelClose=c.closeCancel,e.close();break;case"open":e.open();break;case"set":"object"==typeof c.value?(e.theDate=c.value,e._t({method:"doset"})):(a(this).val(c.value),f.linkedField!==!1&&a(f.linkedField).val(e.callFormat(f.linkedFieldFormat,e.theDate,!1)),a(this).trigger("change"));break;case"doset":d="_"+e.options.mode+"DoSet",a.isFunction(e[d])?e[d].apply(e,[]):e._t({method:"set",value:e._formatter(e.__fmt(),e.theDate),date:e.theDate});break;case"dooffset":c.type&&e._offset(c.type,c.amount,!0);break;case"dorefresh":e.refresh();break;case"doclear":a(this).val("").trigger("change");break;case"clear":a(this).trigger("change")}},_build:{"default":function(){this.d.headerText="Error",this.d.intHTML!==!1&&this.d.intHTML.remove().empty(),this.d.intHTML=a("<div class='ui-body-b'><h2 style='text-align:center' class='bg-danger'>Unknown Mode</h2></div>")},calbox:function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=this,q=this.options,r=q.calDateList,s="ui-datebox-",t=p.calBackDate!==!1&&p.theDate.get(0)===p.calBackDate.get(0)&&p.theDate.get(1)===p.calBackDate.get(1)?new p._date(p.calBackDate.getTime()):p.theDate,u=!1,v={},w=p.initDate.copy(),x=p.initDate.copy(),y=(t.copy([0],[0,0,1]).getDay()-p.__("calStartDay")+7)%7,z=t.get(1),A=t.get(0),B=t.getArray(),C=""===p.d.input.val()?p._startOffset(p._makeDate(p.d.input.val())):p._makeDate(p.d.input.val()),D=-1,E=new p._date,F=E.getArray(),G=t.copy([0],[0,0,1]).adj(2,-1*y+(0===p.__("calStartDay")?1:0)).getDWeek(4),H=0,I=!1,J=!1,K=32-p.theDate.copy([0],[0,0,32,13]).getDate(),L=32-p.theDate.copy([0,-1],[0,0,32,13]).getDate(),M=q.afterToday||q.beforeToday||q.notToday||q.calAlwaysValidateDates||q.maxDays||q.minDays||q.blackDays||q.blackDates?!0:!1;if(p.calBackDate!==!1&&p.theDate.get(0)===p.calBackDate.get(0)&&p.theDate.get(1)===p.calBackDate.get(1)&&(p.theDate=new p._date(p.calBackDate.getTime()),p.calBackDate=!1),"boolean"!=typeof p.d.intHTML&&(p.d.intHTML.remove(),p.d.intHTML=null),p.d.headerText=p._grabLabel()!==!1?p._grabLabel():p.__("titleDateDialogLabel"),p.d.intHTML=a("<span>"),a(p._spf("<div class='{cl1}'><div class='{cl2}'><h4>{content}</h4></div></div>",{cl1:s+"gridheader",cl2:s+"gridlabel",content:p._formatter(p.__("calHeaderFormat"),p.theDate)})).appendTo(p.d.intHTML),p._cal_prev_next(p.d.intHTML.find("."+s+"gridheader")),q.calNoHeader&&(q.calUsePickersIcons?(p.d.intHTML.find("."+s+"gridlabel").hide(),p.d.intHTML.find("."+s+"gridplus").find(".ui-btn-inline").addClass(s+"nomargbtn"),p.d.intHTML.find("."+s+"gridminus").find(".ui-btn-inline").addClass(s+"nomargbtn")):p.d.intHTML.find("."+s+"gridheader").remove()),p.calNext=!0,p.calPrev=!0,Math.floor(E.comp()/100)===Math.floor(t.comp()/100)&&(I=!0),Math.floor(E.comp()/1e4)===Math.floor(t.comp()/1e4)&&(J=!0),C.comp()===t.comp()&&(D=C.get(2)),q.afterToday&&(I||J&&F[1]>=B[1])&&(p.calPrev=!1),q.beforeToday&&(I||J&&F[1]<=B[1])&&(p.calNext=!1),q.minDays!==!1&&(w.adj(2,-1*q.minDays),b=w.getArray(),B[0]===b[0]&&B[1]<=b[1]&&(p.calPrev=!1)),q.maxDays!==!1&&(x.adj(2,q.maxDays),b=x.getArray(),B[0]===b[0]&&B[1]>=b[1]&&(p.calNext=!1)),q.calUsePickers&&p._cal_pickers(z,A,F),c=a("<div class='"+s+"grid'>").appendTo(p.d.intHTML),q.calShowDays)for(p._cal_days=p.__("daysOfWeekShort").concat(p.__("daysOfWeekShort")),e=a("<div>",{"class":s+"gridrow"}).appendTo(c),q.calControlGroup&&e.addClass(s+"gridrow-last"),p.__("isRTL")===!0&&e.css("direction","rtl"),q.calShowWeek&&a("<div>").addClass(s+"griddate "+s+"griddate-label").appendTo(e),k=0;6>=k;k++)a("<div>").text(p._cal_days[(k+p.__("calStartDay"))%7]).addClass(s+"griddate "+s+"griddate-label").appendTo(e);for(v={i:w,x:x,t:E,p:D},d=p._cal_gen(y,L,K,!q.calOnlyMonth,t.get(1)),!a.isFunction(q.calFormatter)&&q.calFormatter!==!1&&a.isFunction(window[q.calFormatter])&&(q.calFormatter=window[q.calFormatter]),!a.isFunction(q.calBeforeAppendFunc)&&q.calBeforeAppendFunc!==!1&&a.isFunction(window[q.calBeforeAppendFunc])&&(q.calBeforeAppendFunc=window[q.calBeforeAppendFunc]),n=new Date(p.theDate.get(0),d[0][0][1],d[0][0][0],0,0,0,0),o=new Date(p.theDate.get(0),d[d.length-1][6][1],d[d.length-1][6][0],0,0,0,0),p.calBackDate===!1?p.calDateVisible=!0:q.calOnlyMonth?p.calDateVisible=!1:p.calBackDate.comp()<n.comp()||p.calBackDate.comp()>o.comp()?p.calDateVisible=!1:p.calDateVisible=!0,f=0,h=d.length;h>f;f++){for(j=a("<div>",{"class":s+"gridrow"}),p.__("isRTL")&&j.css("direction","rtl"),q.calShowWeek&&(a("<div>",{"class":s+"griddate "+s+"griddate-empty"}).text("W"+G).addClass("bootstrap"===p.baseMode?"pull-left":"").css(q.calControlGroup?{"float":"left"}:{}).appendTo(j),G++,G>52&&"undefined"!=typeof d[f+1]&&(G=new p._date(B[0],B[1],0===p.__("calStartDay")?d[f+1][1][0]:d[f+1][0][0],0,0,0,0).getDWeek(4))),g=0,i=d[f].length;i>g;g++)q.calWeekMode&&(H=d[f][q.calWeekModeDay][0]),"boolean"==typeof d[f][g]?a("<div>",{"class":s+"griddate "+s+"griddate-empty"}).appendTo(j):(u=p._cal_check(M,B[0],d[f][g][1],d[f][g][0],v),d[f][g][0]&&(a.isFunction(q.calFormatter)?(m={Year:d[f][g][1]>11?A+1:d[f][g][1]<0?A-1:A,Month:12===d[f][g][1]?0:-1===d[f][g][1]?11:d[f][g][1],Date:d[f][g][0]},m.Arr=[m.Year,p._zPad(m.Month+1),p._zPad(m.Date)],m.ISO=m.Arr.join("-"),m.Comp=m.Arr.join(""),m.curMonth=t.get(1),m.curYear=A,m.dateVisible=p.calDateVisible,b=q.calFormatter(m),l="object"!=typeof b?{text:b,"class":""}:{text:b.text,"class":b["class"]}):l={text:d[f][g][0],"class":""},q.calBeforeAppendFunc(a("<div>").html(l.text).addClass(s+"griddate").addClass(""+(z===d[f][g][1]||u.force?u.ok||"jqm"!==p.baseMode?q.btnCls+u.theme:q.btnCls+" "+u.theme:s+"griddate-empty"+("bootstrap"===p.baseMode?q.btnCls+"default":"")+(q.calOnlyMonth===!0?" "+q.disabledState:""))).addClass(l["class"]).css(z===d[f][g][1]||q.calOnlyMonth?{}:{cursor:"pointer"}).data("date",q.calWeekMode?H:d[f][g][0]).data("enabled",u.ok).data("month",d[f][q.calWeekMode?q.calWeekModeDay:g][1])).appendTo(j)));switch(p.baseMode){case"jqm":q.calControlGroup&&(j.find("."+s+"griddate-empty").addClass("ui-btn"),q.calOnlyMonth&&j.find("."+s+"griddate-empty").addClass("ui-state-disabled"),j.controlgroup({type:"horizontal"}));break;case"bootstrap":j.addClass("btn-group");break;case"jqueryui":j.find("."+s+"griddate").removeClass("ui-corner-all").not("."+s+"griddate-empty").first().addClass("ui-corner-left").end().last().addClass("ui-corner-right")}f===h-1&&j.addClass(s+"gridrow-last"),j.appendTo(c)}q.calShowWeek&&c.find("."+s+"griddate").addClass(s+"griddate-week"),q.calShowDateList&&r!==!1&&p._cal_date_list(c),(q.useTodayButton||q.useTomorrowButton||q.useClearButton||q.useCancelButton)&&(j=a("<div>",{"class":s+"controls"}),q.useTodayButton&&j.append(p._stdBtn.today.apply(p)),q.useTomorrowButton&&j.append(p._stdBtn.tomorrow.apply(p)),q.useClearButton&&j.append(p._stdBtn.clear.apply(p)),q.useCancelButton&&j.append(p._stdBtn.cancel.apply(p)),p._controlGroup(j).appendTo(c)), | ||
p.d.intHTML.on(q.clickEventAlt,"div."+s+"griddate",function(b){b.preventDefault(),a(this).data("enabled")&&(p.calBackDate=!1,p.theDate.setD(2,1).setD(1,a(this).data("month")).setD(2,a(this).data("date")),p._t({method:"set",value:p._formatter(p.__fmt(),p.theDate),date:p.theDate}),p._t({method:"close"}))}),p.d.intHTML.on("swipeleft",function(){p.calNext&&(p.calBackDate===!1&&(p.calBackDate=new Date(p.theDate.getTime())),p._offset("m",1))}).on("swiperight",function(){p.calPrev&&(p.calBackDate===!1&&(p.calBackDate=new Date(p.theDate.getTime())),p._offset("m",-1))}),p.wheelExists&&p.d.intHTML.on("mousewheel",function(a,b){a.preventDefault(),b>0&&p.calNext&&(p.calBackDate===!1&&(p.calBackDate=new Date(p.theDate.getTime())),p.theDate.setD(2,1),p._offset("m",1)),0>b&&p.calPrev&&(p.calBackDate===!1&&(p.calBackDate=new Date(p.theDate.getTime())),p.theDate.setD(2,1),p._offset("m",-1))})},timebox:function(){this._build.datebox.apply(this,[])},durationbox:function(){this._build.datebox.apply(this,[])},datebox:function(){var b,c,d,e,f,g,h=this,i=this.drag,j=this.options,k="durationbox"===j.mode?!0:!1,l=0,m=["d","h","i","s"],n="ui-datebox-";for("boolean"!=typeof h.d.intHTML&&h.d.intHTML.empty().remove(),h.d.headerText=h._grabLabel()!==!1?h._grabLabel():"datebox"===j.mode?h.__("titleDateDialogLabel"):h.__("titleTimeDialogLabel"),h.d.intHTML=a("<span>"),h.fldOrder="datebox"===j.mode?h.__("dateFieldOrder"):k?h.__("durationOrder"):h.__("timeFieldOrder"),k?(h.dateOK=!0,h._fixstepper(h.fldOrder)):(h._check(),h._minStepFix(),h._dbox_vhour("undefined"!=typeof h._dbox_delta?h._dbox_delta:1)),"datebox"===j.mode&&a(h._spf("<div class='{cls}'><h4>{text}</h4></div>",{cls:n+"header",text:h._formatter(h.__("headerFormat"),h.theDate)})).appendTo(h.d.intHTML),e=a("<div>").addClass(n+"datebox-groups"),c=0;c<h.fldOrder.length;c++)f=a("<div>").addClass(n+"datebox-group"),"jqm"===h.baseMode&&f.addClass("ui-block-"+["a","b","c","d","e"][l]),b=k?j.durationSteppers[h.fldOrder[c]]:"i"===h.fldOrder[c]?j.minuteStep:1,("a"!==h.fldOrder[c]||12===h.__("timeFormat"))&&(h._dbox_button(1,h.fldOrder[c],b).appendTo(f),k&&a(h._spf("<div><label>{text}</label></div>",{text:h.__("durationLabel")[a.inArray(h.fldOrder[c],m)]})).addClass(n+"datebox-label ui-body-"+j.themeInput).appendTo(f),a("<div><input class='form-control w-100' type='text'></div>").addClass(function(){switch(h.baseMode){case"jqm":return"ui-input-text ui-body-"+j.themeInput+" ui-mini";case"bootstrap":case"bootstrap4":return j.themeInput;default:return null}}).appendTo(f).find("input").data({field:h.fldOrder[c],amount:b}),h._dbox_button(-1,h.fldOrder[c],b).appendTo(f),f.appendTo(e),l++);switch(h.baseMode){case"jqm":e.addClass("ui-grid-"+[0,0,"a","b","c","d","e"][l]);break;case"bootstrap":e.addClass("row"),e.find("."+n+"datebox-group").each(function(){a(this).addClass("col-xs-"+12/l)});break;case"bootstrap4":e.addClass("row"),e.find("."+n+"datebox-group").each(function(){a(this).addClass("px-0 col-sm-"+12/l)});break;case"jqueryui":e.find("."+n+"datebox-group").each(function(){a(this).css("width",100/l+"%")})}e.appendTo(h.d.intHTML),h.d.divIn=e,h._dbox_run_update(!0),(j.useSetButton||j.useClearButton||j.useCancelButton||j.useTodayButton||j.useTomorrowButton)&&(g=a("<div>",{"class":n+"controls"}),j.useSetButton&&(h.setBut=h._stdBtn.close.apply(h,["datebox"===j.mode?h.__("setDateButtonLabel"):k?h.__("setDurationButtonLabel"):h.__("setTimeButtonLabel")]),h.setBut.appendTo(g)),j.useTodayButton&&g.append(h._stdBtn.today.apply(h)),j.useTomorrowButton&&g.append(h._stdBtn.tomorrow.apply(h)),j.useClearButton&&g.append(h._stdBtn.clear.apply(h)),j.useCancelButton&&g.append(h._stdBtn.cancel.apply(h)),h._controlGroup(g).appendTo(h.d.intHTML)),j.repButton||h.d.intHTML.on(j.clickEvent,"."+n+"datebox-button",function(b){e.find(":focus").blur(),b.preventDefault(),h._dbox_delta=a(this).data("amount")>1?1:-1,h._offset(a(this).data("field"),a(this).data("amount"))}),e.on("change","input",function(){h._dbox_enter(a(this))}),e.on("keypress","input",function(b){13===b.which&&h.dateOK===!0&&(h._dbox_enter(a(this)),h._t({method:"set",value:h._formatter(h.__fmt(),h.theDate),date:h.theDate}),h._t({method:"close"}))}),h.wheelExists&&e.on("mousewheel","input",function(b,c){b.preventDefault(),h._dbox_delta=0>c?-1:1,h._offset(a(this).data("field"),(0>c?-1:1)*a(this).data("amount"))}),j.repButton&&(h.d.intHTML.on(i.eStart,"."+n+"datebox-button",function(b){b.preventDefault(),e.find(":focus").blur(),d=[a(this).data("field"),a(this).data("amount")],i.move=!0,i.cnt=0,h._dbox_delta=a(this).data("amount")>1?1:-1,h._offset(d[0],d[1],!1),h._dbox_run_update(),h.runButton||(i.target=d,h.runButton=setTimeout(function(){h._dbox_run()},500))}),h.d.intHTML.on(i.eEndA,"."+n+"datebox-button",function(a){i.move&&(a.preventDefault(),clearTimeout(h.runButton),h.runButton=!1,i.move=!1)}))},timeflipbox:function(){this._build.flipbox.apply(this)},durationflipbox:function(){this._build.flipbox.apply(this)},flipbox:function(){var b,c,d,e,f,g,h,i,j,k=this,l=this.options,m=this.drag,n={},o=["d","h","i","s"],p="durationflipbox"===l.mode?!0:!1,q="ui-datebox-",r=a("<div class='ui-overlay-shadow'><ul></ul></div>"),s=a("<div>",{"class":q+"flipcontent"}),t=k.theDate.getTime()-k.initDate.getTime(),u=""+("jqm"===k.baseMode?"ui-body-":"")+("bootstrap"===k.baseMode||"bootstrap4"===k.baseMode?"bg-":""),v=k._dur(0>t?0:t);if(0>t?(k.lastDuration=0,p&&k.theDate.setTime(k.initDate.getTime())):p&&(k.lastDuration=t/1e3),"boolean"!=typeof k.d.intHTML?k.d.intHTML.empty().remove():k.d.input.on("datebox",function(a,b){"postrefresh"===b.method&&k._fbox_pos()}),k.d.headerText=k._grabLabel()!==!1?k._grabLabel():"flipbox"===l.mode?k.__("titleDateDialogLabel"):k.__("titleTimeDialogLabel"),k.d.intHTML=a("<span>"),a(document).one("popupafteropen",function(){k._fbox_pos()}),k.fldOrder="flipbox"===l.mode?k.__("dateFieldOrder"):p?k.__("durationOrder"):k.__("timeFieldOrder"),p?(l.minDur!==!1&&k.theDate.getEpoch()-k.initDate.getEpoch()<l.minDur&&(k.theDate=new Date(k.initDate.getTime()+1e3*l.minDur),k.lastDuration=l.minDur,v=k._dur(1e3*l.minDur)),l.maxDur!==!1&&k.theDate.getEpoch()-k.initDate.getEpoch()>l.maxDur&&(k.theDate=new Date(k.initDate.getTime()+1e3*l.maxDur),k.lastDuration=l.maxDur,v=k._dur(1e3*l.maxDur))):(k._check(),k._minStepFix()),"flipbox"===l.mode&&a(k._spf("<div class='{cls}'><h4>{text}</h4></div>",{cls:q+"header",text:k._formatter(k.__("headerFormat"),k.theDate)})).appendTo(k.d.intHTML),p){for(k._fixstepper(k.fldOrder),e=a(k._spf("<div class='{cls}'></div>",{cls:q+"header ui-grid-"+["a","b","c","d","e"][k.fldOrder.length-2]+" row"})),c=0;c<k.fldOrder.length;c++)a(k._spf("<div class='{cls}'>{text}</div>",{text:k.__("durationLabel")[a.inArray(k.fldOrder[c],o)],cls:q+"fliplab ui-block-"+["a","b","c","d","e"][c]+" col-xs-"+12/k.fldOrder.length})).appendTo(e);for(e.appendTo(k.d.intHTML),k.dateOK=!0,n.d=k._fbox_series(v[0],64,"d",!1),n.h=k._fbox_series(v[1],64,"h",v[0]>0),n.i=k._fbox_series(v[2],60,"i",v[0]>0||v[1]>0),n.s=k._fbox_series(v[3],60,"s",v[0]>0||v[1]>0||v[2]>0),s.addClass(q+"flipcontentd"),c=0;c<k.fldOrder.length;c++){g=k.fldOrder[c],i=v[a.inArray(g,o)],d=r.clone().data({field:g,amount:l.durationSteppers[g]}),f=d.find("ul");for(b in n[g])a(k._spf("<li class='{cls}'><span>{text}</span></li>",{text:n[g][b][0],cls:u+(n[g][b][1]!==i?l.themeDate:l.themeDatePick)})).appendTo(f);d.appendTo(s)}}else 4===k.fldOrder.length&&s.addClass(q+"flipcontentd");for(c=0;c<k.fldOrder.length&&!p;c++){if(i=k.fldOrder[c],d=r.clone().data({field:i,amount:"i"===i?l.minuteStep:1}),f=d.find("ul"),"function"==typeof k._fbox_mktxt[i]){for(b=-1*l.flen[i];b<l.flen[i]+1;b++)a(k._spf("<li class='{cls}'><span>{text}</span></li>",{cls:u+(0!==b?l.themeDate:l.themeDatePick),text:k._fbox_mktxt[i].apply(k,["i"===i?b*l.minuteStep:b])})).appendTo(f);d.appendTo(s)}if("a"===i&&12===k.__("timeFormat")){for(j=a("<li class='"+u+l.themeDate+"'><span></span></li>"),e=k.theDate.get(3)>11?[l.themeDate,l.themeDatePick,2,5]:[l.themeDatePick,l.themeDate,2,3],b=-1*e[2];b<e[3];b++)0>b||b>1?j.clone().appendTo(f):a(k._spf("<li class='{cls}'><span>{text}</span></li>",{cls:u+e[b],text:k.__("meridiem")[b]})).appendTo(f);d.appendTo(s)}}k.d.intHTML.append(s),a("<div>",{"class":q+"flipcenter ui-overlay-shadow"}).css("pointerEvents","none").appendTo(k.d.intHTML),(l.useSetButton||l.useClearButton||l.useCancelButton||l.useTodayButton||l.useTomorrowButton)&&(h=a("<div>",{"class":q+"controls"}),l.useSetButton&&h.append(k._stdBtn.close.apply(k,["flipbox"===l.mode?k.__("setDateButtonLabel"):p?k.__("setDurationButtonLabel"):k.__("setTimeButtonLabel")])),l.useTodayButton&&h.append(k._stdBtn.today.apply(k)),l.useTomorrowButton&&h.append(k._stdBtn.tomorrow.apply(k)),l.useClearButton&&h.append(k._stdBtn.clear.apply(k)),l.useCancelButton&&h.append(k._stdBtn.cancel.apply(k)),k._controlGroup(h).appendTo(k.d.intHTML)),k.wheelExists&&k.d.intHTML.on("mousewheel",".ui-overlay-shadow",function(b,c){b.preventDefault(),k._offset(a(this).data("field"),(0>c?1:-1)*a(this).data("amount"))}),k.d.intHTML.on(m.eStart,"ul",function(b,c){m.move||("undefined"!=typeof c&&(b=c),m.move=!0,m.target=a(this).find("li").first(),m.pos=parseInt(m.target.css("marginTop").replace(/px/i,""),10),m.start="touch"===b.type.substr(0,5)?b.originalEvent.changedTouches[0].pageY:b.pageY,m.end=!1,m.direc=p?-1:1,m.velocity=0,m.time=Date.now(),b.stopPropagation(),b.preventDefault())})},slidebox:function(){var b,c,d,e,f,g,h=this,i=this.options,j=this.drag,k="ui-datebox-",l=a("<div class='"+k+"sliderow-int'></div>"),m=a("<div>"),n=a("<div>",{"class":k+"slide"});for("boolean"!=typeof h.d.intHTML?h.d.intHTML.remove().empty():h.d.input.on("datebox",function(a,b){"postrefresh"===b.method&&h._sbox_pos()}),h.d.headerText=h._grabLabel()!==!1?h._grabLabel():h.__("titleDateDialogLabel"),h.d.intHTML=a("<span class='"+k+"nopad'>"),h.fldOrder=h.__("slideFieldOrder"),h._check(),h._minStepFix(),a("<div class='"+k+"header'><h4>"+h._formatter(h.__("headerFormat"),h.theDate)+"</h4></div>").appendTo(h.d.intHTML),h.d.intHTML.append(n),c=0;c<h.fldOrder.length;c++)if(f=h.fldOrder[c],e=m.clone().addClass(k+"sliderow").data("rowtype",f),d=l.clone().data("rowtype",f).appendTo(e),h.__("isRTL")===!0&&d.css("direction","rtl"),"function"==typeof h._sbox_mktxt[f]){for(b=-1*i.slen[f];b<i.slen[f]+1;b++)g=h._sbox_mktxt[f].apply(h,[b]),a("<div>",{"class":k+"slidebox "+k+g[0]+i.btnCls+(0===b?i.themeDatePick:i.themeDate)}).html(g[1]).data("offset",b).appendTo(d);"bootstrap"===h.baseMode&&e.find(".btn-sm").removeClass("btn-sm").addClass("btn-xs"),e.appendTo(n)}(i.useSetButton||i.useClearButton||i.useCancelButton||i.useTodayButton||i.useTomorrowButton)&&(c=a("<div>",{"class":k+"controls "+k+"repad"}),i.useSetButton&&c.append(h._stdBtn.close.apply(h,[h.__("setDateButtonLabel")])),i.useTodayButton&&c.append(h._stdBtn.today.apply(h)),i.useTomorrowButton&&c.append(h._stdBtn.tomorrow.apply(h)),i.useClearButton&&c.append(h._stdBtn.clear.apply(h)),i.useCancelButton&&c.append(h._stdBtn.cancel.apply(h)),h._controlGroup(c).appendTo(h.d.intHTML)),h.wheelExists&&h.d.intHTML.on("mousewheel",".ui-datebox-sliderow-int",function(b,c){b.preventDefault(),h._offset(a(this).data("rowtype"),(0>c?-1:1)*("i"===a(this).data("rowtype")?i.minuteStep:1))}),h.d.intHTML.on(i.clickEvent,".ui-datebox-sliderow-int>div",function(b){b.preventDefault(),h._offset(a(this).parent().data("rowtype"),parseInt(a(this).data("offset"),10))}),h.d.intHTML.on(j.eStart,".ui-datebox-sliderow-int",function(b){j.move||(j.move=!0,j.target=a(this),j.pos=parseInt(j.target.css("marginLeft").replace(/px/i,""),10),j.start="touch"===b.type.substr(0,5)?b.originalEvent.changedTouches[0].pageX:b.pageX,j.end=!1,j.velocity=0,j.time=Date.now(),b.stopPropagation(),b.preventDefault())})}},_drag:{"default":function(){return!1},timeflipbox:function(){this._drag.flipbox.apply(this)},durationflipbox:function(){this._drag.flipbox.apply(this)},flipbox:function(){var b=this,c=this.options,d=this.drag;a(document).on(d.eMove,function(a){return d.move&&"flipbox"===c.mode.slice(-7)?(d.end="touch"===a.type.substr(0,5)?a.originalEvent.changedTouches[0].pageY:a.pageY,d.target.css("marginTop",d.pos+d.end-d.start+"px"),d.elapsed=Date.now()-d.time,d.velocity=.8*(100*(d.end-d.start)/(1+d.elapsed))+.2*d.velocity,a.preventDefault(),a.stopPropagation(),!1):void 0}),a(document).on(d.eEnd,function(a){var e,f,g,h,i,j,k;d.move&&"flipbox"===c.mode.slice(-7)&&(d.velocity<15&&d.velocity>-15||!c.useKinetic?(d.move=!1,d.end!==!1&&(a.preventDefault(),a.stopPropagation(),d.tmp=d.target.parent().parent(),b._offset(d.tmp.data("field"),parseInt((d.start-d.end)/(d.target.outerHeight()-2),10)*d.tmp.data("amount")*d.direc)),d.start=!1,d.end=!1):(d.move=!1,d.start=!1,d.end=!1,d.tmp=d.target.parent().parent(),e=d.target.outerHeight(),f=-(.8*d.velocity)*Math.exp(-d.elapsed/325)*8*-1,g=parseInt(d.target.css("marginTop").replace(/px/i,""),10),h=parseInt(g+f,10),i=d.pos-h,j=Math.round(i/e),k=j*d.tmp.data("amount")*d.direc,d.target.animate({marginTop:h},parseInt(1e4/d.velocity)+1e3,function(){b._offset(d.tmp.data("field"),k)}),a.preventDefault(),a.stopPropagation()))})},slidebox:function(){var b=this,c=this.options,d=this.drag;a(document).on(d.eMove,function(a){return d.move&&"slidebox"===c.mode?(d.end="touch"===a.type.substr(0,5)?a.originalEvent.changedTouches[0].pageX:a.pageX,d.target.css("marginLeft",d.pos+d.end-d.start+"px"),d.elapsed=Date.now()-d.time,d.velocity=.8*(100*(d.end-d.start)/(1+d.elapsed))+.2*d.velocity,a.preventDefault(),a.stopPropagation(),!1):void 0}),a(document).on(d.eEnd,function(a){var e,f,g,h,i,j,k;d.move&&"slidebox"===c.mode&&(d.velocity<15&&d.velocity>-15||!c.useKinetic?(d.move=!1,d.end!==!1&&(a.preventDefault(),a.stopPropagation(),d.tmp=d.target.find("div").first(),b._offset(d.target.data("rowtype"),(b.__("isRTL")?-1:1)*parseInt((d.start-d.end)/d.tmp.innerWidth(),10)*("i"===d.target.data("rowtype")?c.minuteStep:1))),d.start=!1,d.end=!1):(d.move=!1,d.start=!1,d.end=!1,d.tmp=d.target.find("div").first(),e=d.tmp.innerWidth(),f=-(.8*d.velocity)*Math.exp(-d.elapsed/325)*8*-1,g=parseInt(d.target.css("marginLeft").replace(/px/i,""),10),h=parseInt(g+f,10),i=d.pos-h,j=Math.round(i/e),k=j*("i"===d.target.data("rowtype")?c.minuteStep:1),d.target.animate({marginLeft:h},parseInt(1e4/d.velocity)+1e3,function(){b._offset(d.target.data("rowtype"),k)}),a.preventDefault(),a.stopPropagation()))})}},_offset:function(b,c,d){var e,f=this,g=this.options,h=this.theDate,i=!1,j=!1,k=32-f.theDate.copy([0],[0,0,32,13]).getDate(),l=!1;if(b=(b||"").toLowerCase(),l=a.inArray(b,["y","m","d","h","i","s"]),"undefined"==typeof d&&(d=!0),"a"===b||"undefined"!=typeof g.rolloverMode[b]&&g.rolloverMode[b]!==!0)switch(b){case"y":i=0;break;case"m":f._btwn(h.get(1)+c,-1,12)?i=1:(e=h.get(1)+c,j=0>e?[1,12+e]:[1,e%12]);break;case"d":f._btwn(h.get(2)+c,0,k+1)?i=2:(e=h.get(2)+c,j=1>e?[2,k+e]:[2,e%k]);break;case"h":f._btwn(h.get(3)+c,-1,24)?i=3:(e=h.get(3)+c,j=0>e?[3,24+e]:[3,e%24]);break;case"i":f._btwn(h.get(4)+c,-1,60)?i=4:(e=h.get(4)+c,j=0>e?[4,59+e]:[4,e%60]);break;case"s":f._btwn(h.get(5)+c,-1,60)?i=5:(e=h.get(5)+c,j=0>e?[5,59+e]:[5,e%60]);break;case"a":f._offset("h",12*(c>0?1:-1),!1)}else i=l;i!==!1?f.theDate.adj(i,c):f.theDate.setD(j[0],j[1]),d===!0&&f.refresh(),g.useImmediate&&f._t({method:"doset"}),f.calBackDate!==!1&&f._t({method:"displayChange",selectedDate:f.calBackDate,shownDate:f.theDate,thisChange:b,thisChangeAmount:c}),f._t({method:"offset",type:b,amount:c,newDate:f.theDate})},_startOffset:function(a){var b=this.options;return b.startOffsetYears!==!1&&a.adj(0,b.startOffsetYears),b.startOffsetMonths!==!1&&a.adj(1,b.startOffsetMonths),b.startOffsetDays!==!1&&a.adj(2,b.startOffsetDays),a},getTheDate:function(){return this.calBackDate!==!1?this.calBackDate:this.theDate},getLastDur:function(){return this.lastDuration},dateVisible:function(){return this.calDateVisible},setTheDate:function(a){"object"==typeof a?this.theDate=a:this.theDate=this._makeDate(a),this.refresh(),this._t({method:"doset"})},parseDate:function(a,b){var c,d=this;return d.fmtOver=a,c=d._makeDate(b),d.fmtOver=!1,c},callFormat:function(a,b,c){return"undefined"==typeof c&&(c=!1),this._formatter(a,b,c)},refresh:function(){var a=this,b=this.options;"undefined"==typeof a._build[b.mode]?a._build["default"].apply(a,[]):a._build[b.mode].apply(a,[]),a.__("useArabicIndic")===!0&&a._doIndic(),a.d.mainWrap.append(a.d.intHTML),a._t({method:"postrefresh"})},applyMinMax:function(a,b){var c,d,e,f,g=this,h=this.options,i=new this._date,j=864e5;c=g._pa([0,0,0],i),"undefined"==typeof a&&(a=!0),"undefined"==typeof b&&(b=!0),b!==!0&&h.minDays!==!1||"undefined"==typeof g.d.input.attr("min")||(d=g.d.input.attr("min").split("-"),e=new g._date(d[0],d[1]-1,d[2],0,0,0,0),f=(e.getTime()-c.getTime())/j,h.minDays=parseInt(-1*f,10)),b!==!0&&h.maxDays!==!1||"undefined"==typeof g.d.input.attr("max")||(d=g.d.input.attr("max").split("-"),e=new g._date(d[0],d[1]-1,d[2],0,0,0,0),f=(e.getTime()-c.getTime())/j,h.maxDays=parseInt(f,10)),a===!0&&g._t({method:"refresh"})},_dur:function(b){var c=[b/864e5,b/36e5%24,b/6e4%60,b/1e3%60];return a.each(c,function(a,b){0>b?c[a]=0:c[a]=Math.floor(b)}),c},__:function(a){var b=this.options,c=b.lang[b.useLang],d=b[b.mode+"lang"],e="override"+a.charAt(0).toUpperCase()+a.slice(1);return"undefined"!=typeof b[e]?b[e]:"undefined"!=typeof c&&"undefined"!=typeof c[a]?c[a]:"undefined"!=typeof d&&"undefined"!=typeof d[a]?d[a]:"undefined"!=typeof b.lang["default"][a]?b.lang["default"][a]:"Err:NotFound"},__fmt:function(){var a=this,b=this.options;if("undefined"!=typeof a.fmtOver&&a.fmtOver!==!1)return a.fmtOver;switch(b.mode){case"timebox":case"timeflipbox":return a.__("timeOutput");case"durationbox":case"durationflipbox":return a.__("durationFormat");default:return a.__("dateFormat")}},_zPad:function(a,b){return"undefined"!=typeof b&&"-"===b?String(a):(10>a?"0":"")+String(a)},_dRep:function(a,b){var c,d,e=48,f=57,g=1584,h="";for(-1===b&&(e+=g,f+=g,g=-1584),d=0;d<a.length;d++)c=a.charCodeAt(d),h+=c>=e&&f>=c?String.fromCharCode(c+g):String.fromCharCode(c);return h},_doIndic:function(){var b=this;b.d.intHTML.find("*").each(function(){a(this).children().length<1?a(this).text(b._dRep(a(this).text())):a(this).hasClass("ui-datebox-slideday")&&a(this).html(b._dRep(a(this).html()))}),b.d.intHTML.find("input").each(function(){a(this).val(b._dRep(a(this).val()))})},_n:function(a,b){return 0>a?b:a},_pa:function(a,b){return"boolean"==typeof b?new this._date(a[0],a[1],a[2],0,0,0,0):new this._date(b.get(0),b.get(1),b.get(2),a[0],a[1],a[2],0)},_btwn:function(a,b,c){return a>b&&c>a},_grabLabel:function(){var b,c,d=this,e=this.options,f=!1;return"undefined"==typeof e.overrideDialogLabel?(b=d.d.input.attr("placeholder"),c=d.d.input.attr("title"),"undefined"!=typeof b?b:"undefined"!=typeof c?c:(f=a(document).find("label[for='"+d.d.input.attr("id")+"']").text(),""===f?!1:f)):e.overrideDialogLabel},_t:function(a){this.d.input.trigger("datebox",a)},_spf:function(b,c){return a.isArray(c)||a.isPlainObject(c)?b.replace(/{(.+?)}/g,function(a,b){return c[b]}):b},_cal_gen:function(a,b,c,d,e){var f=0,g=0,h=1,i=1,j=[],k=[],l=!1;for(f=0;5>=f;f++)if(l===!1){for(k=[],g=0;6>=g;g++)0===f&&a>g?d===!0?k.push([b+(g-a)+1,e-1]):k.push(" "):f>3&&h>c?(d===!0?(k.push([i,e+1]),i++):k.push(" "),l=!0):(k.push([h,e]),h++,h>c&&(l=!0));j.push(k)}return j},_cal_check:function(b,c,d,e,f){var g,h=this,i=this.options,j=f.x,k=f.i,l=f.t,m=f.p,n=new this._date(c,d,e,12,0,0,0).getDay(),o=i.blackDatesRec,p=i.highDatesRec,q={ok:!0,iso:c+"-"+h._zPad(d+1)+"-"+h._zPad(e),theme:i.themeDate,force:!1,recok:!0,rectheme:!1};if(12===d&&(q.iso=c+1+"-01-"+h._zPad(e)),-1===d&&(q.iso=c-1+"-12-"+h._zPad(e)),q.comp=parseInt(q.iso.replace(/-/g,""),10),o!==!1)for(g=0;g<o.length;g++)-1!==o[g][0]&&o[g][0]!==c||-1!==o[g][1]&&o[g][1]!==d||-1!==o[g][2]&&o[g][2]!==e||(q.ok=!1);if(a.isArray(i.enableDates)&&a.inArray(q.iso,i.enableDates)<0?q.ok=!1:b&&(q.recok!==!0||i.afterToday&&l.comp()>q.comp||i.beforeToday&&l.comp()<q.comp||i.notToday&&l.comp()===q.comp||i.maxDays!==!1&&j.comp()<q.comp||i.minDays!==!1&&k.comp()>q.comp||a.isArray(i.blackDays)&&a.inArray(n,i.blackDays)>-1||a.isArray(i.blackDates)&&a.inArray(q.iso,i.blackDates)>-1)&&(q.ok=!1),a.isArray(i.whiteDates)&&a.inArray(q.iso,i.whiteDates)>-1&&(q.ok=!0),q.ok){if(p!==!1)for(g=0;g<p.length;g++)-1!==p[g][0]&&p[g][0]!==c||-1!==p[g][1]&&p[g][1]!==d||-1!==p[g][2]&&p[g][2]!==e||(q.rectheme=!0);!i.calHighPick||e!==m||""===h.d.input.val()&&i.defaultValue===!1?i.calHighToday&&q.comp===l.comp()?q.theme=i.themeDateToday:i.calHighPick&&h.calDateVisible&&h.calBackDate!==!1&&h.calBackDate.comp()===q.comp?(q.theme=i.themeDatePick,q.force=!0):a.isArray(i.highDatesAlt)&&a.inArray(q.iso,i.highDatesAlt)>-1?q.theme=i.themeDateHighAlt:a.isArray(i.highDates)&&a.inArray(q.iso,i.highDates)>-1?q.theme=i.themeDateHigh:a.isArray(i.highDays)&&a.inArray(n,i.highDays)>-1?q.theme=i.themeDayHigh:a.isArray(i.highDatesRec)&&q.rectheme===!0&&(q.theme=i.themeDateHighRec):q.theme=i.themeDatePick}else q.theme=i.disabledState;return q},_cal_prev_next:function(b){var c=this,d=this.options,e="ui-datebox-";a(c._spf("<div class='{class}'><a href='#'>{name}</a></div>",{"class":e+"gridplus"+(c.__("isRTL")?"-rtl":""),name:c._spf(d.s.cal.nextMonth,{text:c.__("nextMonth"),icon:d.calNextMonthIcon})})).prependTo(b).find("a").addClass(function(){switch(c.baseMode){case"jqm":return d.btnCls+d.themeDate+d.icnCls+d.calNextMonthIcon;case"bootstrap":case"bootstrap4":return d.btnCls+d.themeDate+" pull-"+(c.__("isRTL")?"left":"right");default:return null}}).on(d.clickEventAlt,function(a){return a.preventDefault(),a.stopPropagation(),c.calNext&&(c.calBackDate===!1&&(c.calBackDate=new Date(c.theDate.getTime())),c.theDate.getDate()>28&&c.theDate.setDate(1),c._offset("m",1)),!1}),a(c._spf("<div class='{class}'><a href='#'>{name}</a></div>",{"class":e+"gridminus"+(c.__("isRTL")?"-rtl":""),name:c._spf(d.s.cal.prevMonth,{text:c.__("prevMonth"),icon:d.calPrevMonthIcon})})).prependTo(b).find("a").addClass(function(){switch(c.baseMode){case"jqm":return d.btnCls+d.themeDate+d.icnCls+d.calPrevMonthIcon;case"bootstrap":case"bootstrap4":return d.btnCls+d.themeDate+" pull-"+(c.__("isRTL")?"right":"left");default:return null}}).on(d.clickEventAlt,function(a){return a.preventDefault(),a.stopPropagation(),c.calPrev&&(c.calBackDate===!1&&(c.calBackDate=new Date(c.theDate.getTime())),c.theDate.getDate()>28&&c.theDate.setDate(1),c._offset("m",-1)),!1})},_cal_pickers:function(b,c,d){var e,f,g,h=this,i=this.options,j="ui-datebox-",k=(new Date).get(0),l=a("<div>").addClass("ui-datebox-cal-pickers");for(i.calNoHeader&&i.calUsePickersIcons&&l.addClass("ui-datebox-pickicon"),l.i=a("<fieldset>").appendTo(l),l.a=a("<select>").appendTo(l.i),l.b=a("<select>").appendTo(l.i),g=0;11>=g;g++)l.a.append(a("<option value='"+g+"'"+(b===g?" selected='selected'":"")+">"+h.__("monthsOfYear")[g]+"</option>"));for(e=i.calYearPickMin<1?(i.calYearPickRelative?c:k)+i.calYearPickMin:i.calYearPickMin<1800?(i.calYearPickRelative?c:k)-i.calYearPickMin:"NOW"===i.calYearPickMin?d[0]:i.calYearPickMin,f=i.calYearPickMax<1800?(i.calYearPickRelative?c:k)+i.calYearPickMax:"NOW"===i.calYearPickMax?d[0]:i.calYearPickMax,g=e;f>=g;g++)l.b.append(a("<option value='"+g+"'"+(c===g?" selected='selected'":"")+">"+g+"</option>"));switch(l.a.on("change",function(){h.calBackDate===!1&&(h.calBackDate=new Date(h.theDate.getTime())),h.theDate.setD(1,a(this).val()),h.theDate.get(1)!==parseInt(a(this).val(),10)&&h.theDate.setD(2,0),h.calBackDate!==!1&&h._t({method:"displayChange",selectedDate:h.calBackDate,shownDate:h.theDate,thisChange:"p",thisChangeAmount:null}),h.refresh()}),l.b.on("change",function(){h.calBackDate===!1&&(h.calBackDate=new Date(h.theDate.getTime())),h.theDate.setD(0,a(this).val()),h.theDate.get(1)!==parseInt(l.a.val(),10)&&h.theDate.setD(2,0),h.calBackDate!==!1&&h._t({method:"displayChange",selectedDate:h.calBackDate,shownDate:h.theDate,thisChange:"p",thisChangeAmount:null}),h.refresh()}),h.baseMode){case"bootstrap":case"jqueryui":l.i.find("select").addClass("form-control input-sm").css({marginTop:"3px","float":"left"}).first().css({width:"60%"}).end().last().css({width:"40%"}),i.calNoHeader&&i.calUsePickersIcons?h.d.intHTML.find("."+j+"gridheader").append(l):l.appendTo(h.d.intHTML);break;case"bootstrap4":l.i.find("select").addClass("form-control form-control-sm input-sm").css({marginTop:"3px","float":"left",height:"auto"}).first().css({width:"60%"}).end().last().css({width:"40%"}),i.calNoHeader&&i.calUsePickersIcons?h.d.intHTML.find("."+j+"gridheader").append(l):l.appendTo(h.d.intHTML);break;case"jqm":l.i.controlgroup({mini:!0,type:"horizontal"}),l.i.find("select").selectmenu({nativeMenu:!0}),l.i.find(".ui-controlgroup-controls").css({marginRight:"auto",marginLeft:"auto",width:"100%",display:"table"}),l.i.find(".ui-select").first().css({width:"60%"}).end().last().css({width:"40%"}),i.calNoHeader&&i.calUsePickersIcons&&l.i.css({padding:"0 10px 5px 10px"}),l.appendTo(h.d.intHTML)}},_cal_date_list:function(b){var c,d,e=this,f=this.options,g=a("<div>").addClass("ui-datebox-pickcontrol");for(g.a=a("<select name='pickdate'></select>").appendTo(g),g.a.append("<option value='false' selected='selected'>"+e.__("calDateListLabel")+"</option>"),c=0;c<f.calDateList.length;c++)g.a.append(a(e._spf("<option value='{0}'>{1}</option>",f.calDateList[c])));switch(g.a.on("change",function(){d=a(this).val().split("-"),e.theDate=new e._date(d[0],d[1]-1,d[2],0,0,0,0),e._t({method:"doset"})}),e.baseMode){case"jqm":g.find("select").selectmenu({mini:!0,nativeMenu:!0});break;case"bootstrap":case"bootstrap4":g.find("select").addClass("form-control input-sm")}g.appendTo(b)},_dbox_run:function(){var a=this,b=this.drag,c=parseInt(6.09+142.8*Math.pow(Math.E,-.039*b.cnt),10);b.didRun=!0,b.cnt++,a._offset(b.target[0],b.target[1],!1),a._dbox_run_update(),a.runButton=setTimeout(function(){a._dbox_run()},c)},_dbox_run_update:function(b){var c=this,d=this.options,e=c.theDate.getTime()-c.initDate.getTime(),f="durationbox"===d.mode?!0:!1,g=c._dur(0>e?0:e);0>e&&(c.lastDuration=0,f&&c.theDate.setTime(c.initDate.getTime())),f&&(c.lastDuration=e/1e3,d.minDur!==!1&&c.theDate.getEpoch()-c.initDate.getEpoch()<d.minDur&&(c.theDate=new Date(c.initDate.getTime()+1e3*d.minDur),c.lastDuration=d.minDur,g=c._dur(1e3*d.minDur)),d.maxDur!==!1&&c.theDate.getEpoch()-c.initDate.getEpoch()>d.maxDur&&(c.theDate=new Date(c.initDate.getTime()+1e3*d.maxDur),c.lastDuration=d.maxDur,g=c._dur(1e3*d.maxDur))),b!==!0&&f!==!0&&(c._check(),"datebox"===d.mode&&c.d.intHTML.find(".ui-datebox-header").find("h4").text(c._formatter(c.__("headerFormat"),c.theDate)),d.useSetButton&&(c.dateOK===!1?c.setBut.addClass(d.disabledState):c.setBut.removeClass(d.disabledState))),c.d.divIn.find("input").each(function(){switch(a(this).data("field")){case"y":a(this).val(c.theDate.get(0));break;case"m":a(this).val(c.theDate.get(1)+1);break;case"d":a(this).val(f?g[0]:c.theDate.get(2));break;case"h":f?a(this).val(g[1]):12===c.__("timeFormat")?a(this).val(c.theDate.get12hr()):a(this).val(c.theDate.get(3));break;case"i":f?a(this).val(g[2]):a(this).val(c._zPad(c.theDate.get(4)));break;case"M":a(this).val(c.__("monthsOfYearShort")[c.theDate.get(1)]);break;case"a":a(this).val(c.__("meridiem")[c.theDate.get(3)>11?1:0]);break;case"s":f?a(this).val(g[3]):a(this).val(c._zPad(c.theDate.get(5)))}}),c.__("useArabicIndic")===!0&&c._doIndic()},_dbox_vhour:function(b){var c,d=this,e=this.options,f=[25,0],g=[25,0];return e.validHours===!1?!0:a.inArray(d.theDate.getHours(),e.validHours)>-1?!0:(c=d.theDate.getHours(),a.each(e.validHours,function(){(this>c?1:-1)===b?f[0]>Math.abs(this-c)&&(f=[Math.abs(this-c),parseInt(this,10)]):g[0]>Math.abs(this-c)&&(g=[Math.abs(this-c),parseInt(this,10)])}),void(0!==f[1]?d.theDate.setHours(f[1]):d.theDate.setHours(g[1])))},_dbox_enter:function(b){var c,d=this,e=0;if("M"===b.data("field")&&(c=a.inArray(b.val(),d.__("monthsOfYearShort")),c>-1&&d.theDate.setMonth(c)),""!==b.val()&&0===b.val().toString().search(/^[0-9]+$/))switch(b.data("field")){case"y":d.theDate.setD(0,parseInt(b.val(),10));break;case"m":d.theDate.setD(1,parseInt(b.val(),10)-1);break;case"d":d.theDate.setD(2,parseInt(b.val(),10)),e+=86400*parseInt(b.val(),10);break;case"h":d.theDate.setD(3,parseInt(b.val(),10)),e+=3600*parseInt(b.val(),10);break;case"i":d.theDate.setD(4,parseInt(b.val(),10)),e+=60*parseInt(b.val(),10);break;case"s":d.theDate.setD(5,parseInt(b.val(),10)),e+=parseInt(b.val(),10)}"durationbox"===this.options.mode&&d.theDate.setTime(d.initDate.getTime()+1e3*e),setTimeout(function(){d.refresh()},150)},_dbox_button:function(b,c,d){var e=this,f=this.options;return a("<div>").addClass("ui-datebox-datebox-button").addClass(f.btnCls+f.themeButton).addClass(function(){switch(e.baseMode){case"jqm":case"bootstrap":case"bootstrap4":return f.icnCls+(b>0?f.calNextMonthIcon:f.calPrevMonthIcon);default:return null}}).data({field:c,amount:d*b}).append(function(){switch(e.baseMode){case"jqueryui":return a("<span>").addClass(f.icnCls+(b>0?f.calNextMonthIcon:f.calPrevMonthIcon));default:return null}})},_fbox_pos:function(){var b,c,d,e=0,f=this,g="bootstrap4"===f.baseMode?5:0,h=this.d.intHTML.find(".ui-datebox-flipcontent").innerHeight();f.d.intHTML.find(".ui-datebox-flipcenter").each(function(){c=a(this),e=-1*(h/2-c.innerHeight()/2-3)+g,c.css("top",e)}),f.d.intHTML.find("ul").each(function(){c=a(this),h=c.parent().innerHeight(),d=c.find("li").first(),b=c.find("li").last().offset().top-c.find("li").first().offset().top,d.css("marginTop",-1*((b-h)/2+d.outerHeight()))})},_fbox_series:function(a,b,c,d){for(var e,f,g=this.options,h="h"===c?24:60,i=[[a.toString(),a]],j=1;b>=j;j++)e=a+j*g.durationSteppers[c],f=a-j*g.durationSteppers[c],i.unshift([e.toString(),e]),f>-1?i.push([f.toString(),f]):d?i.push([(h+f).toString(),f]):i.push(["",-1]);return i},_fbox_mktxt:{y:function(a){return this.theDate.get(0)+a},m:function(a){var b=this.theDate.copy([0],[0,0,1]).adj(1,a);return this.__("monthsOfYearShort")[b.get(1)]},d:function(a){var b=this,c=this.options;if(c.rolloverMode===!1||"undefined"!=typeof c.rolloverMode.d&&c.rolloverMode.d===!1){var d=this.theDate.get(2),e=32-b.theDate.copy([0],[0,0,32,13]).getDate(),f=d+a;return 1>f?e+f:f%e>0?f%e:e}return this.theDate.copy([0,0,a]).get(2)},h:function(a){var b=this.theDate.copy([0,0,0,a]);return 12===this.__("timeFormat")?b.get12hr():b.get(3)},i:function(a){return this._zPad(this.theDate.copy([0,0,0,0,a]).get(4))},s:function(a){return this._zPad(this.theDate.copy([0,0,0,0,0,a]).get(5))}},_sbox_pos:function(){var b,c,d,e,f,g=this;g.d.intHTML.find("div.ui-datebox-sliderow-int").each(function(){c=a(this),e=c.parent().outerWidth(),b=c.outerWidth(),d=g.__("isRTL")?c.find("div").last():c.find("div").first(),f=c.find("div").length*d.outerWidth(),b>0&&(f=b),d.css("marginLeft",(f-e)/2*-1)})},_sbox_mktxt:{y:function(a){return["slideyear",this.theDate.get(0)+a]},m:function(a){var b=this.theDate.copy([0],[0,0,1]).adj(1,a);return["slidemonth",this.__("monthsOfYearShort")[b.get(1)]]},d:function(a){var b=this.theDate.copy([0,0,a]);return["slideday",b.get(2)+"<br /><span class='ui-datebox-slidewday'>"+this.__("daysOfWeekShort")[b.getDay()]+"</span>"]},h:function(a){var b=this.theDate.copy([0,0,0,a]);return["slidehour",12===this.__("timeFormat")?this._formatter("%-I<span class='ui-datebox-slidewday'>%p</span>",b):b.get(3)]},i:function(a){return["slidemins",this._zPad(this.theDate.copy([0,0,0,0,a]).get(4))]}}})}(jQuery),function(a){a(document).ready(function(){a("[data-role='datebox']").each(function(){a(this).datebox()})})}(jQuery); | ||
/*! JTSage-DateBox-4.2.3 |2017-09-28T16:47:57Z | (c) 2010, 2017 JTSage | https://github.com/jtsage/jquery-mobile-datebox/blob/master/LICENSE.txt */ | ||
!function(a){a.widget("jtsage.datebox",{initSelector:"input[data-role='datebox']",options:{version:"4.2.3",jqmVersion:"1.4.5",bootstrapVersion:"3.3.7",bootstrap4Version:"4.0.0b",jqmuiWidgetVersion:"1.11.4",theme:!1,themeDefault:"a",themeHeader:"a",themeSetButton:"a",themeCloseButton:"secondary",extraInputClass:"",mode:!1,transition:"fade",useAnimation:!0,hideInput:!1,hideContainer:!1,lockInput:!0,zindex:"1100",clickEvent:"click",clickEventAlt:"click",useKinetic:!0,defaultValue:!1,showInitialValue:!1,linkedField:!1,linkedFieldFormat:"%J",popupPosition:!1,popupButtonPosition:"left",popupForceX:!1,popupForceY:!1,useModal:!0,useModalTheme:"b",useInline:!1,useInlineBlind:!1,useHeader:!0,useImmediate:!1,useButton:!0,buttonIcon:!1,useFocus:!1,useSetButton:!0,useCancelButton:!1,useTodayButton:!1,useTomorrowButton:!1,useClearButton:!1,useCollapsedBut:!1,usePlaceholder:!1,beforeOpenCallback:!1,beforeOpenCallbackArgs:[],openCallback:!1,openCallbackArgs:[],closeCallback:!1,closeCallbackArgs:[],startOffsetYears:!1,startOffsetMonths:!1,startOffsetDays:!1,afterToday:!1,beforeToday:!1,notToday:!1,maxDays:!1,minDays:!1,maxYear:!1,minYear:!1,blackDates:!1,blackDatesRec:!1,blackDays:!1,whiteDates:!0,minHour:!1,maxHour:!1,minTime:!1,maxTime:!1,maxDur:!1,minDur:!1,minuteStep:1,minuteStepRound:0,twoDigitYearCutoff:38,rolloverMode:{m:!0,d:!0,h:!0,i:!0,s:!0},useLang:"default",lang:{"default":{setDateButtonLabel:"Set Date",setTimeButtonLabel:"Set Time",setDurationButtonLabel:"Set Duration",todayButtonLabel:"Jump to Today",tomorrowButtonLabel:"Jump to Tomorrow",titleDateDialogLabel:"Set Date",titleTimeDialogLabel:"Set Time",daysOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysOfWeekShort:["Su","Mo","Tu","We","Th","Fr","Sa"],monthsOfYear:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsOfYearShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],durationLabel:["Days","Hours","Minutes","Seconds"],durationDays:["Day","Days"],timeFormat:24,headerFormat:"%A, %B %-d, %Y",tooltip:"Open Date Picker",nextMonth:"Next Month",prevMonth:"Previous Month",dateFieldOrder:["m","d","y"],timeFieldOrder:["h","i","a"],slideFieldOrder:["y","m","d"],dateFormat:"%Y-%m-%d",useArabicIndic:!1,isRTL:!1,calStartDay:0,clearButton:"Clear",cancelButton:"Cancel",durationOrder:["d","h","i","s"],meridiem:["AM","PM"],timeOutput:"%k:%M",durationFormat:"%Dd %DA, %Dl:%DM:%DS",calDateListLabel:"Other Dates",calHeaderFormat:"%B %Y"}},themeDateToday:"info",themeDayHigh:"warning",themeDatePick:"info",themeDateHigh:"warning",themeDateHighAlt:"danger",themeDateHighRec:"warning",themeDate:"secondary",themeButton:"secondary",themeInput:"default",themeClearButton:"secondary",themeCancelButton:"secondary",themeTomorrowButton:"secondary",themeTodayButton:"secondary",buttonIconDate:"calendar",buttonIconTime:"clock-o",disabledState:"disabled",bootstrapDropdown:!0,bootstrapDropdownRight:!0,bootstrapModal:!1,bootstrapResponsive:!0,calNextMonthIcon:"plus",calPrevMonthIcon:"minus",useInlineAlign:"left",btnCls:" btn btn-sm btn-",icnCls:" fa fa-",s:{cal:{prevMonth:"<span title='{text}' class='fa fa-{icon}'></span>",nextMonth:"<span title='{text}' class='fa fa-{icon}'></span>",botButton:"<a href='#' class='{cls}' role='button'><span class='{icon}'></span> {text}</a>"}},tranDone:"webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",calHighToday:!0,calHighPick:!0,calShowDays:!0,calOnlyMonth:!1,calWeekMode:!1,calWeekModeDay:1,calControlGroup:!1,calShowWeek:!1,calUsePickers:!1,calNoHeader:!1,calFormatter:!1,calAlwaysValidateDates:!1,calYearPickMin:-6,calYearPickMax:6,calYearPickRelative:!0,calBeforeAppendFunc:function(a){return a},highDays:!1,highDates:!1,highDatesRec:!1,highDatesAlt:!1,enableDates:!1,calDateList:!1,calShowDateList:!1,validHours:!1,repButton:!0,durationStep:1,durationSteppers:{d:1,h:1,i:1,s:1},flen:{y:25,m:24,d:40,h:24,i:30,s:30},slen:{y:9,m:14,d:16,h:16,i:30}},_getLongOptions:function(a){var b,c,d={},e="datebox",f=7;for(b in a.data())b.substr(0,f)===e&&b.length>f&&(c=b.substr(f),c=c.charAt(0).toLowerCase()+c.slice(1),"options"!==c&&(d[c]=a.data(b)));return d},_setOption:function(){a.Widget.prototype._setOption.apply(this,arguments),this.refresh()},getOption:function(a){var b=this.__(a);return"Err:NotFound"!==b?b:this.options[a]},baseMode:"bootstrap4",_stdBtn:{cancel:function(){var b=this,c=this.options;return a("<a href='#' role='button' class='btn btn-"+c.themeCancelButton+"'><span class='"+c.icnCls+"remove'></span> "+b.__("cancelButton")+"</a>").on(c.clickEventAlt,function(a){a.preventDefault(),b._t({method:"close",closeCancel:!0})})},clear:function(){var b=this,c=this.options;return a("<a href='#' role='button' class='btn btn-"+c.themeClearButton+"'><span class='"+c.icnCls+"eraser'></span> "+b.__("clearButton")+"</a>").on(c.clickEventAlt,function(a){a.preventDefault(),b.d.input.val(""),b._t({method:"clear"}),b._t({method:"close",closeCancel:!0})})},close:function(b,c){var d=this,e=this.options;return"undefined"==typeof c&&(c=!1),a("<a href='#' role='button' class='btn btn-"+e.themeCloseButton+"'><span class='"+e.icnCls+"check'></span> "+b+"</a>").addClass(""+(d.dateOK===!0?"":"disabled")).on(e.clickEventAlt,function(a){a.preventDefault(),d.dateOK===!0&&(c===!1?d._t({method:"set",value:d._formatter(d.__fmt(),d.theDate),date:d.theDate}):d._t(c),d._t({method:"close"}))})},today:function(){var b=this,c=this.options;return a("<a href='#' role='button' class='btn btn-"+c.themeTodayButton+"'><span class='"+c.icnCls+"send'></span> "+b.__("todayButtonLabel")+"</a>").on(c.clickEventAlt,function(a){a.preventDefault(),b.theDate=b._pa([0,0,0],new b._date),b.calBackDate=!1,b._t({method:"doset"})})},tomorrow:function(){var b=this,c=this.options;return a("<a href='#' role='button' class='btn btn-"+c.themeTomorrowButton+"'><span class='"+c.icnCls+"send'></span> "+b.__("tomorrowButtonLabel")+"</a>").on(c.clickEventAlt,function(a){a.preventDefault(),b.theDate=b._pa([0,0,0],new b._date).adj(2,1),b.calBackDate=!1,b._t({method:"doset"})})}},_destroy:function(){var b=this,c=this.options,d=this.d.wrap.find(".input-group-addon");c.useButton===!0&&(d.remove(),b.d.input.unwrap()),c.lockInput&&b.d.input.removeAttr("readonly"),b.d.input.off("datebox").off("focus.datebox").off("blur.datebox").off("change.datebox"),a(document).off(b.drag.eMove).off(b.drag.eEnd).off(b.drag.eEndA)},_create:function(){a(document).trigger("dateboxcreate");var b=this,c=a.extend(this.options,this._getLongOptions(this.element),this.element.data("options")),d=c.theme===!1?"default":c.theme,e={input:this.element,wrap:this.element.parent(),mainWrap:a("<div>",{"class":"ui-datebox-container"}).css("zIndex",c.zindex),intHTML:!1},f=".datebox"+this.uuid,g="undefined"!=typeof window.ontouchstart,h={eStart:"touchstart"+f+" mousedown"+f,eMove:"touchmove"+f+" mousemove"+f,eEnd:"touchend"+f+" mouseup"+f,eEndA:["mouseup","touchend","touchcanel","touchmove"].join(f+" ")+f,move:!1,start:!1,end:!1,pos:!1,target:!1,delta:!1,tmp:!1};a.extend(b,{d:e,drag:h,touch:g}),c.usePlaceholder!==!1&&(c.usePlaceholder===!0&&""!==b._grabLabel()&&b.d.input.attr("placeholder",b._grabLabel()),"string"==typeof c.usePlaceholder&&b.d.input.attr("placeholder",c.usePlaceholder)),c.theme=d,b.cancelClose=!1,b.calBackDate=!1,b.calDateVisible=!0,b.disabled=!1,b.runButton=!1,b._date=window.Date,b._enhanceDate(),b.baseID=b.d.input.attr("id"),b.initDate=new b._date,b.initDate.setMilliseconds(0),b.theDate=c.defaultValue?b._makeDate():""!==b.d.input.val()?b._makeDate(b.d.input.val()):new b._date,""===b.d.input.val()&&b._startOffset(b.theDate),b.initDone=!1,c.showInitialValue&&b.d.input.val(b._formatter(b.__fmt(),b.theDate)),b.d.wrap=b.d.input.wrap("<div class='input-group'>").parent(),c.mode!==!1&&c.buttonIcon===!1&&("time"===c.mode.substr(0,4)||"dur"===c.mode.substr(0,3)?c.buttonIcon=c.buttonIconTime:c.buttonIcon=c.buttonIconDate),c.useButton?a("<div class='input-group-addon' style='border-right:1px solid rgba(0,0,0,0.15);border-radius: 0px 4px 4px 0px;'><span class='"+c.icnCls+c.buttonIcon+"'></span></div>").attr("title",b.__("tooltip")).on(c.clickEvent,function(a){a.preventDefault(),c.useFocus?b.d.input.focus():b.disabled||b._t({method:"open"})}).appendTo(b.d.wrap):b.d.wrap.css("width","100%"),c.hideInput&&b.d.wrap.hide(),c.hideContainer&&b.d.wrap.parent().hide(),c.hideContainer&&!c.useInline&&(c.bootstrapModal=!0,c.bootstrapResponsive=!1),b.d.input.on("focus.datebox",function(){b.d.input.addClass("ui-focus"),b.disabled===!1&&c.useFocus&&b._t({method:"open"})}).on("blur.datebox",function(){b.d.input.removeClass("ui-focus")}).on("change.datebox",function(){b.theDate=b._makeDate(b.d.input.val()),b.refresh()}).on("datebox",b._event),c.lockInput&&b.d.input.attr("readonly","readonly"),"undefined"!=typeof a.event.special.mousewheel&&(b.wheelExists=!0),b.d.input.is(":disabled")&&b.disable(),b.applyMinMax(!1,!1),(c.useInline||c.useInlineBlind)&&b.open(),a(document).trigger("dateboxaftercreate")},open:function(){var b=this,c=this.options,d={};if(c.useFocus&&b.fastReopen===!0)return b.d.input.blur(),!1;if(b.theDate=b._makeDate(b.d.input.val()),b.calBackDate=!1,""===b.d.input.val()&&b._startOffset(b.theDate),b.d.input.blur(),"undefined"==typeof b._build[c.mode]?b._build["default"].apply(b,[]):b._build[c.mode].apply(b,[]),"undefined"!=typeof b._drag[c.mode]&&b._drag[c.mode].apply(b,[]),b._t({method:"refresh"}),b.__("useArabicIndic")===!0&&b._doIndic(),(c.useInline||c.useInlineBlind)&&b.initDone===!1){switch(b.d.mainWrap.append(b.d.intHTML),c.hideContainer?(c.useHeader&&b.d.mainWrap.prepend(a(b._spf("<div class='{c1}'><h4 class='{c2}'>{text}</h4></div>",{c1:"modal-header",c2:"modal-title text-center",text:b.d.headerText}))),b.d.wrap.parent().after(b.d.mainWrap)):b.d.wrap.parent().append(b.d.mainWrap),c.useInlineAlign){case"right":b.d.mainWrap.css({marginRight:0,marginLeft:"auto"});break;case"left":b.d.mainWrap.css({marginLeft:0,marginRight:"auto"});break;case"center":case"middle":b.d.mainWrap.css({marginLeft:"auto",marginRight:"auto"})}if(b.d.mainWrap.removeClass("ui-datebox-hidden ui-overlay-shadow"),c.useInline)return b.d.mainWrap.addClass("ui-datebox-inline").css("zIndex","auto"),c.hideInput||c.hideContainer||b.d.mainWrap.addClass("ui-datebox-inline-has-input"),setTimeout(function(a){return function(){a._t({method:"postrefresh"})}}(b),100),!0;b.d.mainWrap.addClass("ui-datebox-inline ui-datebox-inline-has-input").css("zIndex","auto"),b.d.mainWrap.hide(),b.initDone=!1,b._t({method:"postrefresh"})}return c.useInlineBlind?(b.initDone?(b.refresh(),b.d.mainWrap.slideDown(),b._t({method:"postrefresh"})):b.initDone=!0,!0):b.d.intHTML.is(":visible")?!1:(b.d.mainWrap.empty(),c.useHeader&&b.d.mainWrap.append(a(b._spf("<div class='{c1}'><h5 class='{c2}'>{text}</h5><button type='button' class='btn btn-sm btn-secondary closer'><span aria-hidden='true'>×</span></button></div>",{c1:"modal-header",c2:"modal-title",c3:"closer"+c.icnCls+"remove pull-"+c.popupButtonPosition,text:b.d.headerText}))).find(".closer").on(c.clickEventAlt,function(a){a.preventDefault(),b._t({method:"close",closeCancel:!0})}),b.d.mainWrap.append(b.d.intHTML).css("zIndex",c.zindex),b._t({method:"postrefresh"}),c.openCallback!==!1?(a.isFunction(c.openCallback)||"function"==typeof window[c.openCallback]&&(c.openCallback=window[c.openCallback]),d.afteropen=function(){b._t({method:"postrefresh"}),c.openCallback.apply(b,a.merge([{custom:b.customCurrent,initDate:b.initDate,date:b.theDate,duration:b.lastDuration}],c.openCallbackArgs))===!1&&b._t({method:"close"})}):d.afteropen=function(){b._t({method:"postrefresh"})},c.beforeOpenCallback!==!1&&(a.isFunction(c.beforeOpenCallback)||"function"==typeof window[c.beforeOpenCallback]&&(c.beforeOpenCallback=window[c.beforeOpenCallback]),c.beforeOpenCallback.apply(b,a.merge([{custom:b.customCurrent,initDate:b.initDate,date:b.theDate,duration:b.lastDuration}],c.beforeOpenCallbackArgs))===!1)?!1:(c.bootstrapResponsive===!0?a(window).width()>768?(c.bootstrapModal=!1,c.bootstrapDropdown=!0):(c.bootstrapModal=!0,c.bootstrapDropdown=!1):c.bootstrapModal===!0&&(c.bootstrapDropdown=!1),c.bootstrapDropdown===!1&&c.bootstrapModal===!0&&(b.d.mainWrap.addClass("w-100"),b.d.modalWrap=a('<div id="jtdb-'+this.uuid+'" class="modal fade"><div class="modal-dialog" role="document"><div class="modal-content"></div></div></div>').addClass(c.useAnimation?c.transition:""),b.d.modalWrap.find(".modal-content").append(b.d.mainWrap),b.d.modalWrap.appendTo(a("body")).on("shown.bs.modal",function(){d.afteropen.call()}).modal({backdrop:"static"}),b.d.modalWrap.modal("show")),void(c.bootstrapDropdown===!0&&c.bootstrapModal===!1&&(b.d.mainWrap.removeClass("w-100").addClass("dropdown-menu").addClass(c.useAnimation?c.transition:"").addClass(c.bootstrapDropdownRight===!0?"dropdown-menu-right":"").appendTo(b.d.wrap).on(c.tranDone,function(){b.d.mainWrap.is(":visible")?d.afteropen.call():(d.afterclose.call(),b.d.wrap.removeClass("show"))}),b.d.wrap.addClass("show"),b.d.backdrop=a("<div class='jtsage-datebox-backdrop-div'></div>").css({position:"fixed",left:0,top:0,bottom:0,right:0}).appendTo("body").on(c.clickEvent,function(a){a.preventDefault(),b._t({method:"close",closeCancel:!0})}),window.setTimeout(function(){b.d.mainWrap.addClass("show")},0)))))},close:function(){var b=this,c=this.options,d={};return b.calBackDate=!1,c.useInlineBlind?(b.d.mainWrap.slideUp(),!0):c.useInline||b.d.intHTML===!1?!0:(c.closeCallback!==!1?(a.isFunction(c.closeCallback)||"function"==typeof window[c.closeCallback]&&(c.closeCallback=window[c.closeCallback]),d.afterclose=function(){c.closeCallback.apply(b,a.merge([{custom:b.customCurrent,initDate:b.initDate,date:b.theDate,duration:b.lastDuration,cancelClose:b.cancelClose}],c.closeCallbackArgs))}):d.afterclose=function(){return!0},c.bootstrapDropdown===!1&&c.bootstrapModal===!0&&(b.d.modalWrap.on("hidden.bs.modal",function(){d.afterclose.call(),b.d.modalWrap.remove()}),b.d.modalWrap.modal("hide")),c.bootstrapDropdown===!0&&c.bootstrapModal===!1&&(c.useAnimation===!0?(b.d.mainWrap.removeClass("show"),b.d.backdrop.remove(),a(".jtsage-datebox-backdrop-div").remove(),window.setTimeout(function(){b.d.wrap.removeClass("show"),d.afterclose.call()},0)):(b.d.wrap.removeClass("show"),b.d.backdrop.remove(),a(".jtsage-datebox-backdrop-div").remove(),d.afterclose.call())),a(document).off(b.drag.eMove).off(b.drag.eEnd).off(b.drag.eEndA),void(c.useFocus&&(b.fastReopen=!0,setTimeout(function(a){return function(){a.fastReopen=!1}}(b),300))))},disable:function(){var a=this;a.d.input.attr("disabled",!0),a.disabled=!0,a._t({method:"disable"})},enable:function(){var a=this;a.d.input.attr("disabled",!1),a.disabled=!1,a._t({method:"enable"})},_controlGroup:function(a){var b=this.options;return b.useCollapsedBut?(a.find("a").css({width:"auto"}),a.addClass("btn-group btn-group-justified")):a.addClass("btn-group-vertical"),a},_enhanceDate:function(){a.extend(this._date.prototype,{copy:function(b,c){return b=a.extend([0,0,0,0,0,0,0],b),c=a.extend([0,0,0,0,0,0,0],c),new Date(c[0]>0?c[0]:this.get(0)+b[0],c[1]>0?c[1]:this.get(1)+b[1],c[2]>0?c[2]:this.get(2)+b[2],c[3]>0?c[3]:this.get(3)+b[3],c[4]>0?c[4]:this.get(4)+b[4],c[5]>0?c[5]:this.get(5)+b[5],c[6]>0?c[5]:this.get(6)+b[6])},adj:function(a,b){if("number"!=typeof b||"number"!=typeof a)throw new Error("Invalid Arguments");switch(a){case 0:this.setD(0,this.get(0)+b);break;case 1:this.setD(1,this.get(1)+b);break;case 2:this.setD(2,this.get(2)+b);break;case 3:b*=60;case 4:b*=60;case 5:b*=1e3;case 6:this.setTime(this.getTime()+b)}return this},setD:function(a,b){switch(a){case 0:this.setFullYear(b);break;case 1:this.setMonth(b);break;case 2:this.setDate(b);break;case 3:this.setHours(b);break;case 4:this.setMinutes(b);break;case 5:this.setSeconds(b);break;case 6:this.setMilliseconds(b)}return this},get:function(a){switch(a){case 0:return this.getFullYear();case 1:return this.getMonth();case 2:return this.getDate();case 3:return this.getHours();case 4:return this.getMinutes();case 5:return this.getSeconds();case 6:return this.getMilliseconds()}return!1},get12hr:function(){return 0===this.get(3)?12:this.get(3)<13?this.get(3):this.get(3)-12},iso:function(){var a=[0,0,0],b=0;for(b=0;3>b;b++)a[b]=this.get(b),1===b&&a[b]++,a[b]<10&&(a[b]="0"+String(a[b]));return a.join("-")},comp:function(){return parseInt(this.iso().replace(/-/g,""),10)},getEpoch:function(){return Math.floor(this.getTime()/1e3)},getArray:function(){var a=[0,0,0,0,0,0],b=0;for(b=0;6>b;b++)a[b]=this.get(b);return a},setFirstDay:function(a){return this.setD(2,1).adj(2,a-this.getDay()),this.get(2)>10&&this.adj(2,7),this},setDWeek:function(a,b){return 4===a?this.setD(1,0).setD(2,1).setFirstDay(4).adj(2,-3).adj(2,7*(b-1)):this.setD(1,0).setD(2,1).setFirstDay(a).adj(2,7*(b-1))},getDWeek:function(a){var b,c;switch(a){case 0:return b=this.copy([0,-1*this.getMonth()]).setFirstDay(0),Math.floor((this.getTime()-(b.getTime()+6e4*(this.getTimezoneOffset()-b.getTimezoneOffset())))/6048e5)+1;case 1:return b=this.copy([0,-1*this.getMonth()]).setFirstDay(1),Math.floor((this.getTime()-(b.getTime()+6e4*(this.getTimezoneOffset()-b.getTimezoneOffset())))/6048e5)+1;case 4:return 11===this.getMonth()&&this.getDate()>28?1:(b=this.copy([0,-1*this.getMonth()],!0).setFirstDay(4).adj(2,-3),c=Math.floor((this.getTime()-(b.getTime()+6e4*(this.getTimezoneOffset()-b.getTimezoneOffset())))/6048e5)+1,1>c?(b=this.copy([-1,-1*this.getMonth()]).setFirstDay(4).adj(2,-3),Math.floor((this.getTime()-b.getTime())/6048e5)+1):c);default:return 0}}})},_ord:{"default":function(a){var b=a%10;return a>9&&21>a||b>3?"th":["th","st","nd","rd"][b]}},_customformat:{"default":function(){return!1}},_formatter:function(a,b,c){var d,e=this,f=this.options,g=0;return"undefined"==typeof c&&(c=!0),"dura"===f.mode.substr(0,4)&&(g=e._dur(this.theDate.getTime()-this.initDate.getTime()),a.match(/%Dd/)||(g[1]+=24*g[0]),a.match(/%Dl/)||(g[2]+=60*g[1]),a.match(/%DM/)||(g[3]+=60*g[2])),a=a.replace(/%(D|X|0|-)*([1-9a-zA-Z])/g,function(a,c,h){if("X"===c)return"undefined"!=typeof e._customformat[f.mode]?e._customformat[f.mode](h,b,f):a;if("D"===c)switch(h){case"d":return g[0];case"l":return e._zPad(g[1]);case"M":return e._zPad(g[2]);case"S":return e._zPad(g[3]);case"A":return e.__("durationDays")[1===g[0]?0:1];default:return a}switch(h){case"a":return e.__("daysOfWeekShort")[b.getDay()];case"A":return e.__("daysOfWeek")[b.getDay()];case"b":return e.__("monthsOfYearShort")[b.getMonth()];case"B":return e.__("monthsOfYear")[b.getMonth()];case"C":return parseInt(b.getFullYear()/100);case"d":return e._zPad(b.getDate(),c);case"H":case"k":return e._zPad(b.getHours(),c);case"I":case"l":return e._zPad(b.get12hr(),c);case"m":return e._zPad(b.getMonth()+1,c);case"M":return e._zPad(b.getMinutes(),c);case"p":case"P":return d=e.__("meridiem")[b.get(3)<12?0:1].toUpperCase(),"P"===h?d.toLowerCase():d;case"s":return b.getEpoch();case"S":return e._zPad(b.getSeconds(),c);case"u":return e._zPad(b.getDay()+1,c);case"w":return b.getDay();case"y":return e._zPad(b.getFullYear()%100);case"Y":return b.getFullYear();case"E":return b.getFullYear()+543;case"V":return e._zPad(b.getDWeek(4),c);case"U":return e._zPad(b.getDWeek(0),c);case"W":return e._zPad(b.getDWeek(1),c);case"o":return"undefined"!=typeof e._ord[f.useLang]?e._ord[f.useLang](b.getDate()):e._ord["default"](b.getDate());case"j":return d=new Date(b.getFullYear(),0,1),d="000"+String(Math.ceil((b-d)/864e5)+1),d.slice(-3);case"J":return b.toJSON();case"G":return d=b.getFullYear(),1===b.getDWeek(4)&&b.getMonth()>0?d+1:b.getDWeek(4)>51&&b.getMonth()<11?d-1:d;case"g":return d=b.getFullYear%100,1===b.getDWeek(4)&&b.getMonth()>0&&++d,b.getDWeek(4)>51&&b.getMonth()<11&&--d,e._zpad(d);default:return a}}),e.__("useArabicIndic")===!0&&c===!0&&(a=e._dRep(a)),a},_minStepFix:function(){var a=this.theDate.get(4),b=this.options.minuteStep,c=this.options.minStepRound,d=a%b;b>1&&d>0&&(0>c?a-=d:c>0?a+=b-d:b/2>a%b?a-=d:a+=b-d,this.theDate.setMinutes(a))},_check:function(){var b,c,d,e,f,g,h=this,i=this.options,j=this.theDate;if(h.dateOK=!0,"undefined"==typeof i.mode)return!0;if(i.afterToday&&(b=new h._date,b>j&&(j=b)),i.beforeToday&&(b=new h._date,j>b&&(j=b)),i.maxDays!==!1&&(b=new h._date,b.adj(2,i.maxDays),j>b&&(j=b)),i.minDays!==!1&&(b=new h._date,b.adj(2,-1*i.minDays),b>j&&(j=b)),i.minHour!==!1&&j.get(3)<i.minHour&&j.setD(3,i.minHour),i.maxHour!==!1&&j.get(3)>i.maxHour&&j.setD(3,i.maxHour),i.minTime!==!1&&(b=new h._date,g=i.minTime.split(":"),b.setD(3,g[0]).setD(4,g[1]),b>j&&(j=b)),i.maxTime!==!1&&(b=new h._date,g=i.maxTime.split(":"),b.setD(3,g[0]).setD(4,g[1]),j>b&&(j=b)),i.maxYear!==!1&&(b=new h._date(i.maxYear,11,31),j>b&&(j=b)),i.minYear!==!1&&(b=new h._date(i.minYear,0,1),b>j&&(j=b)),"time"===i.mode.substr(0,4)||"dur"===i.mode.substr(0,3))"timeflipbox"===i.mode&&i.validHours!==!1&&a.inArray(j.get(3),i.validHours)<0&&(h.dateOK=!1);else{if(i.blackDatesRec!==!1)for(c=j.get(0),d=j.get(1),e=j.get(2),f=0;f<i.blackDatesRec.length;f++)-1!==i.blackDatesRec[f][0]&&i.blackDatesRec[f][0]!==c||-1!==i.blackDatesRec[f][1]&&i.blackDatesRec[f][1]!==d||-1!==i.blackDatesRec[f][2]&&i.blackDatesRec[f][2]!==e||(h.dateOK=!1);i.blackDates!==!1&&a.inArray(j.iso(),i.blackDates)>-1&&(h.dateOK=!1),i.blackDays!==!1&&a.inArray(j.getDay(),i.blackDays)>-1&&(h.dateOK=!1),i.whiteDates!==!1&&a.inArray(h.theDate.iso(),i.whiteDates)>-1&&(h.dateOK=!0,j=h.theDate)}h.theDate=j},_fixstepper:function(b){var c=this.options.durationSteppers,d=this.options.durationStep;a.inArray("d",b)>-1&&(c.d=d),a.inArray("h",b)>-1&&(c.d=1,c.h=d),a.inArray("i",b)>-1&&(c.h=1,c.i=d),a.inArray("s",b)>-1&&(c.i=1,c.s=d)},_parser:{"default":function(){return!1}},_makeDate:function(b){var c,d,e,f,g=this,h=this.options,i=this.options.defaultValue,j=g.__fmt(),k=null,l=[],m=new g._date,n={year:-1,mont:-1,date:-1,hour:-1,mins:-1,secs:-1,week:!1,wtyp:4,wday:!1,yday:!1,meri:0};if(b=a.trim(g.__("useArabicIndic")===!0&&"undefined"!=typeof b?g._dRep(b,-1):b),"undefined"==typeof h.mode)return m;if("undefined"!=typeof g._parser[h.mode])return g._parser[h.mode].apply(g,[b]);if("durationbox"===h.mode||"durationflipbox"===h.mode){if(j=j.replace(/%D([a-z])/gi,function(a,b){switch(b){case"d":case"l":case"M":case"S":return"("+a+"|[0-9]+)";default:return".+?"}}),j=new RegExp("^"+j+"$"),k=j.exec(b),e=j.exec(g.__fmt()),null===k||k.length!==e.length)return"number"==typeof i&&i>0?new g._date(1e3*(g.initDate.getEpoch()+parseInt(i,10))):new g._date(g.initDate.getTime());for(d=g.initDate.getEpoch(),c=1;c<k.length;c++)f=parseInt(k[c],10),e[c].match(/^%Dd$/i)&&(d+=86400*f),e[c].match(/^%Dl$/i)&&(d+=3600*f),e[c].match(/^%DM$/i)&&(d+=60*f),e[c].match(/^%DS$/i)&&(d+=f);return new g._date(1e3*d)}if("%J"===j)return m=new g._date(b),isNaN(m.getDate())&&(m=new g._date),m;if(j=j.replace(/%(0|-)*([a-z])/gi,function(a,b,c){switch(l.push(c),c){case"p":case"P":case"b":case"B":return"("+a+"|.+?)";case"H":case"k":case"I":case"l":case"m":case"M":case"S":case"V":case"U":case"u":case"W":case"d":return"("+a+"|[0-9]{"+("-"===b?"1,":"")+"2})";case"j":return"("+a+"|[0-9]{3})";case"s":return"("+a+"|[0-9]+)";case"g":case"y":return"("+a+"|[0-9]{2})";case"E":case"G":case"Y":return"("+a+"|[0-9]{1,4})";default:return l.pop(),".+?"}}),j=new RegExp("^"+j+"$"),k=j.exec(b),e=j.exec(g.__fmt()),null===k||k.length!==e.length){if(i!==!1&&""!==i)switch(typeof i){case"object":a.isFunction(i.getDay)?m=i:3===i.length&&(m=g._pa(i,"time"===h.mode.substr(0,4)?m:!1));break;case"number":m=new g._date(1e3*i);break;case"string":"time"===h.mode.substr(0,4)?(d=a.extend([0,0,0],i.split(":")).slice(0,3),m=g._pa(d,m)):(d=a.extend([0,0,0],i.split("-")).slice(0,3),d[1]--,m=g._pa(d,!1))}isNaN(m.getDate())&&(m=new g._date)}else{for(c=1;c<k.length;c++)switch(f=parseInt(k[c],10),l[c-1]){case"s":return new g._date(1e3*parseInt(k[c],10));case"Y":case"G":n.year=f;break;case"E":n.year=f-543;break;case"y":case"g":h.afterToday||f<h.twoDigitYearCutoff?n.year=2e3+f:n.year=1900+f;break;case"m":n.mont=f-1;break;case"d":n.date=f;break;case"H":case"k":case"I":case"l":n.hour=f;break;case"M":n.mins=f;break;case"S":n.secs=f;break;case"u":n.wday=f-1;break;case"w":n.wday=f;break;case"j":n.yday=f;break;case"V":n.week=f,n.wtyp=4;break;case"U":n.week=f,n.wtyp=0;break;case"W":n.week=f,n.wtyp=1;break;case"p":case"P":f=new RegExp("^"+k[c]+"$","i"),n.meri=f.test(g.__("meridiem")[0])?-1:1;break;case"b":d=a.inArray(k[c],g.__("monthsOfYearShort")),d>-1&&(n.mont=d);break;case"B":d=a.inArray(k[c],g.__("monthsOfYear")),d>-1&&(n.mont=d)}if(0!==n.meri&&(-1===n.meri&&12===n.hour&&(n.hour=0),1===n.meri&&12!==n.hour&&(n.hour=n.hour+12)),m=new g._date(g._n(n.year,0),g._n(n.mont,0),g._n(n.date,1),g._n(n.hour,0),g._n(n.mins,0),g._n(n.secs,0),0),n.year<100&&-1!==n.year&&m.setFullYear(n.year),n.mont>-1&&n.date>-1||n.hour>-1&&n.mins>-1&&n.secs>-1)return m;n.week!==!1&&(m.setDWeek(n.wtyp,n.week),n.date>-1&&m.setDate(n.date)),n.yday!==!1&&m.setD(1,0).setD(2,1).adj(2,n.yday-1),n.wday!==!1&&m.adj(2,n.wday-m.getDay())}return m},_event:function(b,c){var d,e=a(this).data("jtsage-datebox"),f=a(this).data("jtsage-datebox").options;if(!b.isPropagationStopped())switch(c.method){case"close":"undefined"==typeof c.closeCancel&&(c.closeCancel=!1),e.cancelClose=c.closeCancel,e.close();break;case"open":e.open();break;case"set":"object"==typeof c.value?(e.theDate=c.value,e._t({method:"doset"})):(a(this).val(c.value),f.linkedField!==!1&&a(f.linkedField).val(e.callFormat(f.linkedFieldFormat,e.theDate,!1)),a(this).trigger("change"));break;case"doset":d="_"+e.options.mode+"DoSet",a.isFunction(e[d])?e[d].apply(e,[]):e._t({method:"set",value:e._formatter(e.__fmt(),e.theDate),date:e.theDate});break;case"dooffset":c.type&&e._offset(c.type,c.amount,!0);break;case"dorefresh":e.refresh();break;case"doclear":a(this).val("").trigger("change");break;case"clear":a(this).trigger("change")}},_build:{"default":function(){this.d.headerText="Error",this.d.intHTML!==!1&&this.d.intHTML.remove().empty(),this.d.intHTML=a("<div class='ui-body-b'><h2 style='text-align:center' class='bg-danger'>Unknown Mode</h2></div>")},calbox:function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=this,q=this.options,r=q.calDateList,s="ui-datebox-",t=p.calBackDate!==!1&&p.theDate.get(0)===p.calBackDate.get(0)&&p.theDate.get(1)===p.calBackDate.get(1)?new p._date(p.calBackDate.getTime()):p.theDate,u=!1,v={},w=p.initDate.copy(),x=p.initDate.copy(),y=(t.copy([0],[0,0,1]).getDay()-p.__("calStartDay")+7)%7,z=t.get(1),A=t.get(0),B=t.getArray(),C=""===p.d.input.val()?p._startOffset(p._makeDate(p.d.input.val())):p._makeDate(p.d.input.val()),D=-1,E=new p._date,F=E.getArray(),G=t.copy([0],[0,0,1]).adj(2,-1*y+(0===p.__("calStartDay")?1:0)).getDWeek(4),H=0,I=!1,J=!1,K=32-p.theDate.copy([0],[0,0,32,13]).getDate(),L=32-p.theDate.copy([0,-1],[0,0,32,13]).getDate(),M=q.afterToday||q.beforeToday||q.notToday||q.calAlwaysValidateDates||q.maxDays||q.minDays||q.blackDays||q.blackDates?!0:!1;if(p.calBackDate!==!1&&p.theDate.get(0)===p.calBackDate.get(0)&&p.theDate.get(1)===p.calBackDate.get(1)&&(p.theDate=new p._date(p.calBackDate.getTime()),p.calBackDate=!1),"boolean"!=typeof p.d.intHTML&&(p.d.intHTML.remove(),p.d.intHTML=null),p.d.headerText=p._grabLabel()!==!1?p._grabLabel():p.__("titleDateDialogLabel"),p.d.intHTML=a("<span>"),a(p._spf("<div class='{cl1}'><div class='{cl2}'><h4>{content}</h4></div></div>",{cl1:s+"gridheader",cl2:s+"gridlabel",content:p._formatter(p.__("calHeaderFormat"),p.theDate)})).appendTo(p.d.intHTML),p._cal_prev_next(p.d.intHTML.find("."+s+"gridheader")),q.calNoHeader&&(q.calUsePickersIcons?(p.d.intHTML.find("."+s+"gridlabel").hide(),p.d.intHTML.find("."+s+"gridplus").find(".ui-btn-inline").addClass(s+"nomargbtn"),p.d.intHTML.find("."+s+"gridminus").find(".ui-btn-inline").addClass(s+"nomargbtn")):p.d.intHTML.find("."+s+"gridheader").remove()),p.calNext=!0,p.calPrev=!0,Math.floor(E.comp()/100)===Math.floor(t.comp()/100)&&(I=!0),Math.floor(E.comp()/1e4)===Math.floor(t.comp()/1e4)&&(J=!0),C.comp()===t.comp()&&(D=C.get(2)),q.afterToday&&(I||J&&F[1]>=B[1])&&(p.calPrev=!1),q.beforeToday&&(I||J&&F[1]<=B[1])&&(p.calNext=!1),q.minDays!==!1&&(w.adj(2,-1*q.minDays),b=w.getArray(),B[0]===b[0]&&B[1]<=b[1]&&(p.calPrev=!1)),q.maxDays!==!1&&(x.adj(2,q.maxDays),b=x.getArray(),B[0]===b[0]&&B[1]>=b[1]&&(p.calNext=!1)),q.calUsePickers&&p._cal_pickers(z,A,F),c=a("<div class='"+s+"grid'>").appendTo(p.d.intHTML),q.calShowDays)for(p._cal_days=p.__("daysOfWeekShort").concat(p.__("daysOfWeekShort")),e=a("<div>",{"class":s+"gridrow"}).appendTo(c),q.calControlGroup&&e.addClass(s+"gridrow-last"),p.__("isRTL")===!0&&e.css("direction","rtl"),q.calShowWeek&&a("<div>").addClass(s+"griddate "+s+"griddate-label").appendTo(e),k=0;6>=k;k++)a("<div>").text(p._cal_days[(k+p.__("calStartDay"))%7]).addClass(s+"griddate "+s+"griddate-label").appendTo(e);for(v={i:w,x:x,t:E,p:D},d=p._cal_gen(y,L,K,!q.calOnlyMonth,t.get(1)),!a.isFunction(q.calFormatter)&&q.calFormatter!==!1&&a.isFunction(window[q.calFormatter])&&(q.calFormatter=window[q.calFormatter]),!a.isFunction(q.calBeforeAppendFunc)&&q.calBeforeAppendFunc!==!1&&a.isFunction(window[q.calBeforeAppendFunc])&&(q.calBeforeAppendFunc=window[q.calBeforeAppendFunc]),n=new Date(p.theDate.get(0),d[0][0][1],d[0][0][0],0,0,0,0),o=new Date(p.theDate.get(0),d[d.length-1][6][1],d[d.length-1][6][0],0,0,0,0),p.calBackDate===!1?p.calDateVisible=!0:q.calOnlyMonth?p.calDateVisible=!1:p.calBackDate.comp()<n.comp()||p.calBackDate.comp()>o.comp()?p.calDateVisible=!1:p.calDateVisible=!0,f=0,h=d.length;h>f;f++){for(j=a("<div>",{"class":s+"gridrow"}),p.__("isRTL")&&j.css("direction","rtl"),q.calShowWeek&&(a("<div>",{"class":s+"griddate "+s+"griddate-empty"}).text("W"+G).addClass("bootstrap"===p.baseMode?"pull-left":"").css(q.calControlGroup?{"float":"left"}:{}).appendTo(j),G++,G>52&&"undefined"!=typeof d[f+1]&&(G=new p._date(B[0],B[1],0===p.__("calStartDay")?d[f+1][1][0]:d[f+1][0][0],0,0,0,0).getDWeek(4))),g=0,i=d[f].length;i>g;g++)q.calWeekMode&&(H=d[f][q.calWeekModeDay][0]),"boolean"==typeof d[f][g]?a("<div>",{"class":s+"griddate "+s+"griddate-empty"}).appendTo(j):(u=p._cal_check(M,B[0],d[f][g][1],d[f][g][0],v),d[f][g][0]&&(a.isFunction(q.calFormatter)?(m={Year:d[f][g][1]>11?A+1:d[f][g][1]<0?A-1:A,Month:12===d[f][g][1]?0:-1===d[f][g][1]?11:d[f][g][1],Date:d[f][g][0]},m.Arr=[m.Year,p._zPad(m.Month+1),p._zPad(m.Date)],m.ISO=m.Arr.join("-"),m.Comp=m.Arr.join(""),m.curMonth=t.get(1),m.curYear=A,m.dateVisible=p.calDateVisible,b=q.calFormatter(m),l="object"!=typeof b?{text:b,"class":""}:{text:b.text,"class":b["class"]}):l={text:d[f][g][0],"class":""},q.calBeforeAppendFunc(a("<div>").html(l.text).addClass(s+"griddate").addClass(""+(z===d[f][g][1]||u.force?u.ok||"jqm"!==p.baseMode?q.btnCls+u.theme:q.btnCls+" "+u.theme:s+"griddate-empty"+("bootstrap"===p.baseMode?q.btnCls+"default":"")+(q.calOnlyMonth===!0?" "+q.disabledState:""))).addClass(l["class"]).css(z===d[f][g][1]||q.calOnlyMonth?{}:{cursor:"pointer"}).data("date",q.calWeekMode?H:d[f][g][0]).data("enabled",u.ok).data("month",d[f][q.calWeekMode?q.calWeekModeDay:g][1])).appendTo(j)));switch(p.baseMode){case"jqm":q.calControlGroup&&(j.find("."+s+"griddate-empty").addClass("ui-btn"),q.calOnlyMonth&&j.find("."+s+"griddate-empty").addClass("ui-state-disabled"),j.controlgroup({type:"horizontal"}));break;case"bootstrap":j.addClass("btn-group");break;case"jqueryui":j.find("."+s+"griddate").removeClass("ui-corner-all").not("."+s+"griddate-empty").first().addClass("ui-corner-left").end().last().addClass("ui-corner-right")}f===h-1&&j.addClass(s+"gridrow-last"),j.appendTo(c)}q.calShowWeek&&c.find("."+s+"griddate").addClass(s+"griddate-week"),q.calShowDateList&&r!==!1&&p._cal_date_list(c),(q.useTodayButton||q.useTomorrowButton||q.useClearButton||q.useCancelButton)&&(j=a("<div>",{"class":s+"controls"}),q.useTodayButton&&j.append(p._stdBtn.today.apply(p)),q.useTomorrowButton&&j.append(p._stdBtn.tomorrow.apply(p)),q.useClearButton&&j.append(p._stdBtn.clear.apply(p)),q.useCancelButton&&j.append(p._stdBtn.cancel.apply(p)),p._controlGroup(j).appendTo(c)), | ||
p.d.intHTML.on(q.clickEventAlt,"div."+s+"griddate",function(b){b.preventDefault(),a(this).data("enabled")&&(p.calBackDate=!1,p.theDate.setD(2,1).setD(1,a(this).data("month")).setD(2,a(this).data("date")),p._t({method:"set",value:p._formatter(p.__fmt(),p.theDate),date:p.theDate}),p._t({method:"close"}))}),p.d.intHTML.on("swipeleft",function(){p.calNext&&(p.calBackDate===!1&&(p.calBackDate=new Date(p.theDate.getTime())),p._offset("m",1))}).on("swiperight",function(){p.calPrev&&(p.calBackDate===!1&&(p.calBackDate=new Date(p.theDate.getTime())),p._offset("m",-1))}),p.wheelExists&&p.d.intHTML.on("mousewheel",function(a,b){a.preventDefault(),b>0&&p.calNext&&(p.calBackDate===!1&&(p.calBackDate=new Date(p.theDate.getTime())),p.theDate.setD(2,1),p._offset("m",1)),0>b&&p.calPrev&&(p.calBackDate===!1&&(p.calBackDate=new Date(p.theDate.getTime())),p.theDate.setD(2,1),p._offset("m",-1))})},timebox:function(){this._build.datebox.apply(this,[])},durationbox:function(){this._build.datebox.apply(this,[])},datebox:function(){var b,c,d,e,f,g,h=this,i=this.drag,j=this.options,k="durationbox"===j.mode?!0:!1,l=0,m=["d","h","i","s"],n="ui-datebox-";for("boolean"!=typeof h.d.intHTML&&h.d.intHTML.empty().remove(),h.d.headerText=h._grabLabel()!==!1?h._grabLabel():"datebox"===j.mode?h.__("titleDateDialogLabel"):h.__("titleTimeDialogLabel"),h.d.intHTML=a("<span>"),h.fldOrder="datebox"===j.mode?h.__("dateFieldOrder"):k?h.__("durationOrder"):h.__("timeFieldOrder"),k?(h.dateOK=!0,h._fixstepper(h.fldOrder)):(h._check(),h._minStepFix(),h._dbox_vhour("undefined"!=typeof h._dbox_delta?h._dbox_delta:1)),"datebox"===j.mode&&a(h._spf("<div class='{cls}'><h4>{text}</h4></div>",{cls:n+"header",text:h._formatter(h.__("headerFormat"),h.theDate)})).appendTo(h.d.intHTML),e=a("<div>").addClass(n+"datebox-groups"),c=0;c<h.fldOrder.length;c++)f=a("<div>").addClass(n+"datebox-group"),"jqm"===h.baseMode&&f.addClass("ui-block-"+["a","b","c","d","e"][l]),b=k?j.durationSteppers[h.fldOrder[c]]:"i"===h.fldOrder[c]?j.minuteStep:1,("a"!==h.fldOrder[c]||12===h.__("timeFormat"))&&(h._dbox_button(1,h.fldOrder[c],b).appendTo(f),k&&a(h._spf("<div><label>{text}</label></div>",{text:h.__("durationLabel")[a.inArray(h.fldOrder[c],m)]})).addClass(n+"datebox-label ui-body-"+j.themeInput).appendTo(f),a("<div><input class='form-control w-100 "+j.extraInputClass+"' type='text'></div>").addClass(function(){switch(h.baseMode){case"jqm":return"ui-input-text ui-body-"+j.themeInput+" ui-mini";case"bootstrap":case"bootstrap4":return j.themeInput;default:return null}}).appendTo(f).find("input").data({field:h.fldOrder[c],amount:b}),h._dbox_button(-1,h.fldOrder[c],b).appendTo(f),f.appendTo(e),l++);switch(h.baseMode){case"jqm":e.addClass("ui-grid-"+[0,0,"a","b","c","d","e"][l]);break;case"bootstrap":e.addClass("row"),e.find("."+n+"datebox-group").each(function(){a(this).addClass("col-xs-"+12/l)});break;case"bootstrap4":e.addClass("row"),e.find("."+n+"datebox-group").each(function(){a(this).addClass("px-0 col-sm-"+12/l)});break;case"jqueryui":e.find("."+n+"datebox-group").each(function(){a(this).css("width",100/l+"%")})}e.appendTo(h.d.intHTML),h.d.divIn=e,h._dbox_run_update(!0),(j.useSetButton||j.useClearButton||j.useCancelButton||j.useTodayButton||j.useTomorrowButton)&&(g=a("<div>",{"class":n+"controls"}),j.useSetButton&&(h.setBut=h._stdBtn.close.apply(h,["datebox"===j.mode?h.__("setDateButtonLabel"):k?h.__("setDurationButtonLabel"):h.__("setTimeButtonLabel")]),h.setBut.appendTo(g)),j.useTodayButton&&g.append(h._stdBtn.today.apply(h)),j.useTomorrowButton&&g.append(h._stdBtn.tomorrow.apply(h)),j.useClearButton&&g.append(h._stdBtn.clear.apply(h)),j.useCancelButton&&g.append(h._stdBtn.cancel.apply(h)),h._controlGroup(g).appendTo(h.d.intHTML)),j.repButton||h.d.intHTML.on(j.clickEvent,"."+n+"datebox-button",function(b){e.find(":focus").blur(),b.preventDefault(),h._dbox_delta=a(this).data("amount")>1?1:-1,h._offset(a(this).data("field"),a(this).data("amount"))}),e.on("change","input",function(){h._dbox_enter(a(this))}),e.on("keypress","input",function(b){13===b.which&&h.dateOK===!0&&(h._dbox_enter(a(this)),h._t({method:"set",value:h._formatter(h.__fmt(),h.theDate),date:h.theDate}),h._t({method:"close"}))}),h.wheelExists&&e.on("mousewheel","input",function(b,c){b.preventDefault(),h._dbox_delta=0>c?-1:1,h._offset(a(this).data("field"),(0>c?-1:1)*a(this).data("amount"))}),j.repButton&&(h.d.intHTML.on(i.eStart,"."+n+"datebox-button",function(b){b.preventDefault(),e.find(":focus").blur(),d=[a(this).data("field"),a(this).data("amount")],i.move=!0,i.cnt=0,h._dbox_delta=a(this).data("amount")>1?1:-1,h._offset(d[0],d[1],!1),h._dbox_run_update(),h.runButton||(i.target=d,h.runButton=setTimeout(function(){h._dbox_run()},500))}),h.d.intHTML.on(i.eEndA,"."+n+"datebox-button",function(a){i.move&&(a.preventDefault(),clearTimeout(h.runButton),h.runButton=!1,i.move=!1)}))},timeflipbox:function(){this._build.flipbox.apply(this)},durationflipbox:function(){this._build.flipbox.apply(this)},flipbox:function(){var b,c,d,e,f,g,h,i,j,k=this,l=this.options,m=this.drag,n={},o=["d","h","i","s"],p="durationflipbox"===l.mode?!0:!1,q="ui-datebox-",r=a("<div class='ui-overlay-shadow'><ul></ul></div>"),s=a("<div>",{"class":q+"flipcontent"}),t=k.theDate.getTime()-k.initDate.getTime(),u=""+("jqm"===k.baseMode?"ui-body-":"")+("bootstrap"===k.baseMode||"bootstrap4"===k.baseMode?"bg-":""),v=k._dur(0>t?0:t);if(0>t?(k.lastDuration=0,p&&k.theDate.setTime(k.initDate.getTime())):p&&(k.lastDuration=t/1e3),"boolean"!=typeof k.d.intHTML?k.d.intHTML.empty().remove():k.d.input.on("datebox",function(a,b){"postrefresh"===b.method&&k._fbox_pos()}),k.d.headerText=k._grabLabel()!==!1?k._grabLabel():"flipbox"===l.mode?k.__("titleDateDialogLabel"):k.__("titleTimeDialogLabel"),k.d.intHTML=a("<span>"),a(document).one("popupafteropen",function(){k._fbox_pos()}),k.fldOrder="flipbox"===l.mode?k.__("dateFieldOrder"):p?k.__("durationOrder"):k.__("timeFieldOrder"),p?(l.minDur!==!1&&k.theDate.getEpoch()-k.initDate.getEpoch()<l.minDur&&(k.theDate=new Date(k.initDate.getTime()+1e3*l.minDur),k.lastDuration=l.minDur,v=k._dur(1e3*l.minDur)),l.maxDur!==!1&&k.theDate.getEpoch()-k.initDate.getEpoch()>l.maxDur&&(k.theDate=new Date(k.initDate.getTime()+1e3*l.maxDur),k.lastDuration=l.maxDur,v=k._dur(1e3*l.maxDur))):(k._check(),k._minStepFix()),"flipbox"===l.mode&&a(k._spf("<div class='{cls}'><h4>{text}</h4></div>",{cls:q+"header",text:k._formatter(k.__("headerFormat"),k.theDate)})).appendTo(k.d.intHTML),p){for(k._fixstepper(k.fldOrder),e=a(k._spf("<div class='{cls}'></div>",{cls:q+"header ui-grid-"+["a","b","c","d","e"][k.fldOrder.length-2]+" row"})),c=0;c<k.fldOrder.length;c++)a(k._spf("<div class='{cls}'>{text}</div>",{text:k.__("durationLabel")[a.inArray(k.fldOrder[c],o)],cls:q+"fliplab ui-block-"+["a","b","c","d","e"][c]+" col-xs-"+12/k.fldOrder.length})).appendTo(e);for(e.appendTo(k.d.intHTML),k.dateOK=!0,n.d=k._fbox_series(v[0],64,"d",!1),n.h=k._fbox_series(v[1],64,"h",v[0]>0),n.i=k._fbox_series(v[2],60,"i",v[0]>0||v[1]>0),n.s=k._fbox_series(v[3],60,"s",v[0]>0||v[1]>0||v[2]>0),s.addClass(q+"flipcontentd"),c=0;c<k.fldOrder.length;c++){g=k.fldOrder[c],i=v[a.inArray(g,o)],d=r.clone().data({field:g,amount:l.durationSteppers[g]}),f=d.find("ul");for(b in n[g])a(k._spf("<li class='{cls}'><span>{text}</span></li>",{text:n[g][b][0],cls:u+(n[g][b][1]!==i?l.themeDate:l.themeDatePick)})).appendTo(f);d.appendTo(s)}}else 4===k.fldOrder.length&&s.addClass(q+"flipcontentd");for(c=0;c<k.fldOrder.length&&!p;c++){if(i=k.fldOrder[c],d=r.clone().data({field:i,amount:"i"===i?l.minuteStep:1}),f=d.find("ul"),"function"==typeof k._fbox_mktxt[i]){for(b=-1*l.flen[i];b<l.flen[i]+1;b++)a(k._spf("<li class='{cls}'><span>{text}</span></li>",{cls:u+(0!==b?l.themeDate:l.themeDatePick),text:k._fbox_mktxt[i].apply(k,["i"===i?b*l.minuteStep:b])})).appendTo(f);d.appendTo(s)}if("a"===i&&12===k.__("timeFormat")){for(j=a("<li class='"+u+l.themeDate+"'><span></span></li>"),e=k.theDate.get(3)>11?[l.themeDate,l.themeDatePick,2,5]:[l.themeDatePick,l.themeDate,2,3],b=-1*e[2];b<e[3];b++)0>b||b>1?j.clone().appendTo(f):a(k._spf("<li class='{cls}'><span>{text}</span></li>",{cls:u+e[b],text:k.__("meridiem")[b]})).appendTo(f);d.appendTo(s)}}k.d.intHTML.append(s),a("<div>",{"class":q+"flipcenter ui-overlay-shadow"}).css("pointerEvents","none").appendTo(k.d.intHTML),(l.useSetButton||l.useClearButton||l.useCancelButton||l.useTodayButton||l.useTomorrowButton)&&(h=a("<div>",{"class":q+"controls"}),l.useSetButton&&h.append(k._stdBtn.close.apply(k,["flipbox"===l.mode?k.__("setDateButtonLabel"):p?k.__("setDurationButtonLabel"):k.__("setTimeButtonLabel")])),l.useTodayButton&&h.append(k._stdBtn.today.apply(k)),l.useTomorrowButton&&h.append(k._stdBtn.tomorrow.apply(k)),l.useClearButton&&h.append(k._stdBtn.clear.apply(k)),l.useCancelButton&&h.append(k._stdBtn.cancel.apply(k)),k._controlGroup(h).appendTo(k.d.intHTML)),k.wheelExists&&k.d.intHTML.on("mousewheel",".ui-overlay-shadow",function(b,c){b.preventDefault(),k._offset(a(this).data("field"),(0>c?1:-1)*a(this).data("amount"))}),k.d.intHTML.on(m.eStart,"ul",function(b,c){m.move||("undefined"!=typeof c&&(b=c),m.move=!0,m.target=a(this).find("li").first(),m.pos=parseInt(m.target.css("marginTop").replace(/px/i,""),10),m.start="touch"===b.type.substr(0,5)?b.originalEvent.changedTouches[0].pageY:b.pageY,m.end=!1,m.direc=p?-1:1,m.velocity=0,m.time=Date.now(),b.stopPropagation(),b.preventDefault())})},slidebox:function(){var b,c,d,e,f,g,h=this,i=this.options,j=this.drag,k="ui-datebox-",l=a("<div class='"+k+"sliderow-int'></div>"),m=a("<div>"),n=a("<div>",{"class":k+"slide"});for("boolean"!=typeof h.d.intHTML?h.d.intHTML.remove().empty():h.d.input.on("datebox",function(a,b){"postrefresh"===b.method&&h._sbox_pos()}),h.d.headerText=h._grabLabel()!==!1?h._grabLabel():h.__("titleDateDialogLabel"),h.d.intHTML=a("<span class='"+k+"nopad'>"),h.fldOrder=h.__("slideFieldOrder"),h._check(),h._minStepFix(),a("<div class='"+k+"header'><h4>"+h._formatter(h.__("headerFormat"),h.theDate)+"</h4></div>").appendTo(h.d.intHTML),h.d.intHTML.append(n),c=0;c<h.fldOrder.length;c++)if(f=h.fldOrder[c],e=m.clone().addClass(k+"sliderow").data("rowtype",f),d=l.clone().data("rowtype",f).appendTo(e),h.__("isRTL")===!0&&d.css("direction","rtl"),"function"==typeof h._sbox_mktxt[f]){for(b=-1*i.slen[f];b<i.slen[f]+1;b++)g=h._sbox_mktxt[f].apply(h,[b]),a("<div>",{"class":k+"slidebox "+k+g[0]+i.btnCls+(0===b?i.themeDatePick:i.themeDate)}).html(g[1]).data("offset",b).appendTo(d);"bootstrap"===h.baseMode&&e.find(".btn-sm").removeClass("btn-sm").addClass("btn-xs"),e.appendTo(n)}(i.useSetButton||i.useClearButton||i.useCancelButton||i.useTodayButton||i.useTomorrowButton)&&(c=a("<div>",{"class":k+"controls "+k+"repad"}),i.useSetButton&&c.append(h._stdBtn.close.apply(h,[h.__("setDateButtonLabel")])),i.useTodayButton&&c.append(h._stdBtn.today.apply(h)),i.useTomorrowButton&&c.append(h._stdBtn.tomorrow.apply(h)),i.useClearButton&&c.append(h._stdBtn.clear.apply(h)),i.useCancelButton&&c.append(h._stdBtn.cancel.apply(h)),h._controlGroup(c).appendTo(h.d.intHTML)),h.wheelExists&&h.d.intHTML.on("mousewheel",".ui-datebox-sliderow-int",function(b,c){b.preventDefault(),h._offset(a(this).data("rowtype"),(0>c?-1:1)*("i"===a(this).data("rowtype")?i.minuteStep:1))}),h.d.intHTML.on(i.clickEvent,".ui-datebox-sliderow-int>div",function(b){b.preventDefault(),h._offset(a(this).parent().data("rowtype"),parseInt(a(this).data("offset"),10))}),h.d.intHTML.on(j.eStart,".ui-datebox-sliderow-int",function(b){j.move||(j.move=!0,j.target=a(this),j.pos=parseInt(j.target.css("marginLeft").replace(/px/i,""),10),j.start="touch"===b.type.substr(0,5)?b.originalEvent.changedTouches[0].pageX:b.pageX,j.end=!1,j.velocity=0,j.time=Date.now(),b.stopPropagation(),b.preventDefault())})}},_drag:{"default":function(){return!1},timeflipbox:function(){this._drag.flipbox.apply(this)},durationflipbox:function(){this._drag.flipbox.apply(this)},flipbox:function(){var b=this,c=this.options,d=this.drag;a(document).on(d.eMove,function(a){return d.move&&"flipbox"===c.mode.slice(-7)?(d.end="touch"===a.type.substr(0,5)?a.originalEvent.changedTouches[0].pageY:a.pageY,d.target.css("marginTop",d.pos+d.end-d.start+"px"),d.elapsed=Date.now()-d.time,d.velocity=.8*(100*(d.end-d.start)/(1+d.elapsed))+.2*d.velocity,a.preventDefault(),a.stopPropagation(),!1):void 0}),a(document).on(d.eEnd,function(a){var e,f,g,h,i,j,k;d.move&&"flipbox"===c.mode.slice(-7)&&(d.velocity<15&&d.velocity>-15||!c.useKinetic?(d.move=!1,d.end!==!1&&(a.preventDefault(),a.stopPropagation(),d.tmp=d.target.parent().parent(),b._offset(d.tmp.data("field"),parseInt((d.start-d.end)/(d.target.outerHeight()-2),10)*d.tmp.data("amount")*d.direc)),d.start=!1,d.end=!1):(d.move=!1,d.start=!1,d.end=!1,d.tmp=d.target.parent().parent(),e=d.target.outerHeight(),f=-(.8*d.velocity)*Math.exp(-d.elapsed/325)*8*-1,g=parseInt(d.target.css("marginTop").replace(/px/i,""),10),h=parseInt(g+f,10),i=d.pos-h,j=Math.round(i/e),k=j*d.tmp.data("amount")*d.direc,d.target.animate({marginTop:h},parseInt(1e4/d.velocity)+1e3,function(){b._offset(d.tmp.data("field"),k)}),a.preventDefault(),a.stopPropagation()))})},slidebox:function(){var b=this,c=this.options,d=this.drag;a(document).on(d.eMove,function(a){return d.move&&"slidebox"===c.mode?(d.end="touch"===a.type.substr(0,5)?a.originalEvent.changedTouches[0].pageX:a.pageX,d.target.css("marginLeft",d.pos+d.end-d.start+"px"),d.elapsed=Date.now()-d.time,d.velocity=.8*(100*(d.end-d.start)/(1+d.elapsed))+.2*d.velocity,a.preventDefault(),a.stopPropagation(),!1):void 0}),a(document).on(d.eEnd,function(a){var e,f,g,h,i,j,k;d.move&&"slidebox"===c.mode&&(d.velocity<15&&d.velocity>-15||!c.useKinetic?(d.move=!1,d.end!==!1&&(a.preventDefault(),a.stopPropagation(),d.tmp=d.target.find("div").first(),b._offset(d.target.data("rowtype"),(b.__("isRTL")?-1:1)*parseInt((d.start-d.end)/d.tmp.innerWidth(),10)*("i"===d.target.data("rowtype")?c.minuteStep:1))),d.start=!1,d.end=!1):(d.move=!1,d.start=!1,d.end=!1,d.tmp=d.target.find("div").first(),e=d.tmp.innerWidth(),f=-(.8*d.velocity)*Math.exp(-d.elapsed/325)*8*-1,g=parseInt(d.target.css("marginLeft").replace(/px/i,""),10),h=parseInt(g+f,10),i=d.pos-h,j=Math.round(i/e),k=j*("i"===d.target.data("rowtype")?c.minuteStep:1),d.target.animate({marginLeft:h},parseInt(1e4/d.velocity)+1e3,function(){b._offset(d.target.data("rowtype"),k)}),a.preventDefault(),a.stopPropagation()))})}},_offset:function(b,c,d){var e,f=this,g=this.options,h=this.theDate,i=!1,j=!1,k=32-f.theDate.copy([0],[0,0,32,13]).getDate(),l=!1;if(b=(b||"").toLowerCase(),l=a.inArray(b,["y","m","d","h","i","s"]),"undefined"==typeof d&&(d=!0),"a"===b||"undefined"!=typeof g.rolloverMode[b]&&g.rolloverMode[b]!==!0)switch(b){case"y":i=0;break;case"m":f._btwn(h.get(1)+c,-1,12)?i=1:(e=h.get(1)+c,j=0>e?[1,12+e]:[1,e%12]);break;case"d":f._btwn(h.get(2)+c,0,k+1)?i=2:(e=h.get(2)+c,j=1>e?[2,k+e]:[2,e%k]);break;case"h":f._btwn(h.get(3)+c,-1,24)?i=3:(e=h.get(3)+c,j=0>e?[3,24+e]:[3,e%24]);break;case"i":f._btwn(h.get(4)+c,-1,60)?i=4:(e=h.get(4)+c,j=0>e?[4,59+e]:[4,e%60]);break;case"s":f._btwn(h.get(5)+c,-1,60)?i=5:(e=h.get(5)+c,j=0>e?[5,59+e]:[5,e%60]);break;case"a":f._offset("h",12*(c>0?1:-1),!1)}else i=l;i!==!1?f.theDate.adj(i,c):f.theDate.setD(j[0],j[1]),d===!0&&f.refresh(),g.useImmediate&&f._t({method:"doset"}),f.calBackDate!==!1&&f._t({method:"displayChange",selectedDate:f.calBackDate,shownDate:f.theDate,thisChange:b,thisChangeAmount:c}),f._t({method:"offset",type:b,amount:c,newDate:f.theDate})},_startOffset:function(a){var b=this.options;return b.startOffsetYears!==!1&&a.adj(0,b.startOffsetYears),b.startOffsetMonths!==!1&&a.adj(1,b.startOffsetMonths),b.startOffsetDays!==!1&&a.adj(2,b.startOffsetDays),a},getTheDate:function(){return this.calBackDate!==!1?this.calBackDate:this.theDate},getLastDur:function(){return this.lastDuration},dateVisible:function(){return this.calDateVisible},setTheDate:function(a){"object"==typeof a?this.theDate=a:this.theDate=this._makeDate(a),this.refresh(),this._t({method:"doset"})},parseDate:function(a,b){var c,d=this;return d.fmtOver=a,c=d._makeDate(b),d.fmtOver=!1,c},callFormat:function(a,b,c){return"undefined"==typeof c&&(c=!1),this._formatter(a,b,c)},refresh:function(){var a=this,b=this.options;"undefined"==typeof a._build[b.mode]?a._build["default"].apply(a,[]):a._build[b.mode].apply(a,[]),a.__("useArabicIndic")===!0&&a._doIndic(),a.d.mainWrap.append(a.d.intHTML),a._t({method:"postrefresh"})},applyMinMax:function(a,b){var c,d,e,f,g=this,h=this.options,i=new this._date,j=864e5;c=g._pa([0,0,0],i),"undefined"==typeof a&&(a=!0),"undefined"==typeof b&&(b=!0),b!==!0&&h.minDays!==!1||"undefined"==typeof g.d.input.attr("min")||(d=g.d.input.attr("min").split("-"),e=new g._date(d[0],d[1]-1,d[2],0,0,0,0),f=(e.getTime()-c.getTime())/j,h.minDays=parseInt(-1*f,10)),b!==!0&&h.maxDays!==!1||"undefined"==typeof g.d.input.attr("max")||(d=g.d.input.attr("max").split("-"),e=new g._date(d[0],d[1]-1,d[2],0,0,0,0),f=(e.getTime()-c.getTime())/j,h.maxDays=parseInt(f,10)),a===!0&&g._t({method:"refresh"})},_dur:function(b){var c=[b/864e5,b/36e5%24,b/6e4%60,b/1e3%60];return a.each(c,function(a,b){0>b?c[a]=0:c[a]=Math.floor(b)}),c},__:function(a){var b=this.options,c=b.lang[b.useLang],d=b[b.mode+"lang"],e="override"+a.charAt(0).toUpperCase()+a.slice(1);return"undefined"!=typeof b[e]?b[e]:"undefined"!=typeof c&&"undefined"!=typeof c[a]?c[a]:"undefined"!=typeof d&&"undefined"!=typeof d[a]?d[a]:"undefined"!=typeof b.lang["default"][a]?b.lang["default"][a]:"Err:NotFound"},__fmt:function(){var a=this,b=this.options;if("undefined"!=typeof a.fmtOver&&a.fmtOver!==!1)return a.fmtOver;switch(b.mode){case"timebox":case"timeflipbox":return a.__("timeOutput");case"durationbox":case"durationflipbox":return a.__("durationFormat");default:return a.__("dateFormat")}},_zPad:function(a,b){return"undefined"!=typeof b&&"-"===b?String(a):(10>a?"0":"")+String(a)},_dRep:function(a,b){var c,d,e=48,f=57,g=1584,h="";for(-1===b&&(e+=g,f+=g,g=-1584),d=0;d<a.length;d++)c=a.charCodeAt(d),h+=c>=e&&f>=c?String.fromCharCode(c+g):String.fromCharCode(c);return h},_doIndic:function(){var b=this;b.d.intHTML.find("*").each(function(){a(this).children().length<1?a(this).text(b._dRep(a(this).text())):a(this).hasClass("ui-datebox-slideday")&&a(this).html(b._dRep(a(this).html()))}),b.d.intHTML.find("input").each(function(){a(this).val(b._dRep(a(this).val()))})},_n:function(a,b){return 0>a?b:a},_pa:function(a,b){return"boolean"==typeof b?new this._date(a[0],a[1],a[2],0,0,0,0):new this._date(b.get(0),b.get(1),b.get(2),a[0],a[1],a[2],0)},_btwn:function(a,b,c){return a>b&&c>a},_grabLabel:function(){var b,c,d=this,e=this.options,f=!1;return"undefined"==typeof e.overrideDialogLabel?(b=d.d.input.attr("placeholder"),c=d.d.input.attr("title"),"undefined"!=typeof b?b:"undefined"!=typeof c?c:(f=a(document).find("label[for='"+d.d.input.attr("id")+"']").text(),""===f?!1:f)):e.overrideDialogLabel},_t:function(a){this.d.input.trigger("datebox",a)},_spf:function(b,c){return a.isArray(c)||a.isPlainObject(c)?b.replace(/{(.+?)}/g,function(a,b){return c[b]}):b},_cal_gen:function(a,b,c,d,e){var f=0,g=0,h=1,i=1,j=[],k=[],l=!1;for(f=0;5>=f;f++)if(l===!1){for(k=[],g=0;6>=g;g++)0===f&&a>g?d===!0?k.push([b+(g-a)+1,e-1]):k.push(" "):f>3&&h>c?(d===!0?(k.push([i,e+1]),i++):k.push(" "),l=!0):(k.push([h,e]),h++,h>c&&(l=!0));j.push(k)}return j},_cal_check:function(b,c,d,e,f){var g,h=this,i=this.options,j=f.x,k=f.i,l=f.t,m=f.p,n=new this._date(c,d,e,12,0,0,0).getDay(),o=i.blackDatesRec,p=i.highDatesRec,q={ok:!0,iso:c+"-"+h._zPad(d+1)+"-"+h._zPad(e),theme:i.themeDate,force:!1,recok:!0,rectheme:!1};if(12===d&&(q.iso=c+1+"-01-"+h._zPad(e)),-1===d&&(q.iso=c-1+"-12-"+h._zPad(e)),q.comp=parseInt(q.iso.replace(/-/g,""),10),o!==!1)for(g=0;g<o.length;g++)-1!==o[g][0]&&o[g][0]!==c||-1!==o[g][1]&&o[g][1]!==d||-1!==o[g][2]&&o[g][2]!==e||(q.ok=!1);if(a.isArray(i.enableDates)&&a.inArray(q.iso,i.enableDates)<0?q.ok=!1:b&&(q.recok!==!0||i.afterToday&&l.comp()>q.comp||i.beforeToday&&l.comp()<q.comp||i.notToday&&l.comp()===q.comp||i.maxDays!==!1&&j.comp()<q.comp||i.minDays!==!1&&k.comp()>q.comp||a.isArray(i.blackDays)&&a.inArray(n,i.blackDays)>-1||a.isArray(i.blackDates)&&a.inArray(q.iso,i.blackDates)>-1)&&(q.ok=!1),a.isArray(i.whiteDates)&&a.inArray(q.iso,i.whiteDates)>-1&&(q.ok=!0),q.ok){if(p!==!1)for(g=0;g<p.length;g++)-1!==p[g][0]&&p[g][0]!==c||-1!==p[g][1]&&p[g][1]!==d||-1!==p[g][2]&&p[g][2]!==e||(q.rectheme=!0);!i.calHighPick||e!==m||""===h.d.input.val()&&i.defaultValue===!1?i.calHighToday&&q.comp===l.comp()?q.theme=i.themeDateToday:i.calHighPick&&h.calDateVisible&&h.calBackDate!==!1&&h.calBackDate.comp()===q.comp?(q.theme=i.themeDatePick,q.force=!0):a.isArray(i.highDatesAlt)&&a.inArray(q.iso,i.highDatesAlt)>-1?q.theme=i.themeDateHighAlt:a.isArray(i.highDates)&&a.inArray(q.iso,i.highDates)>-1?q.theme=i.themeDateHigh:a.isArray(i.highDays)&&a.inArray(n,i.highDays)>-1?q.theme=i.themeDayHigh:a.isArray(i.highDatesRec)&&q.rectheme===!0&&(q.theme=i.themeDateHighRec):q.theme=i.themeDatePick}else q.theme=i.disabledState;return q},_cal_prev_next:function(b){var c=this,d=this.options,e="ui-datebox-";a(c._spf("<div class='{class}'><a href='#'>{name}</a></div>",{"class":e+"gridplus"+(c.__("isRTL")?"-rtl":""),name:c._spf(d.s.cal.nextMonth,{text:c.__("nextMonth"),icon:d.calNextMonthIcon})})).prependTo(b).find("a").addClass(function(){switch(c.baseMode){case"jqm":return d.btnCls+d.themeDate+d.icnCls+d.calNextMonthIcon;case"bootstrap":case"bootstrap4":return d.btnCls+d.themeDate+" pull-"+(c.__("isRTL")?"left":"right");default:return null}}).on(d.clickEventAlt,function(a){return a.preventDefault(),a.stopPropagation(),c.calNext&&(c.calBackDate===!1&&(c.calBackDate=new Date(c.theDate.getTime())),c.theDate.getDate()>28&&c.theDate.setDate(1),c._offset("m",1)),!1}),a(c._spf("<div class='{class}'><a href='#'>{name}</a></div>",{"class":e+"gridminus"+(c.__("isRTL")?"-rtl":""),name:c._spf(d.s.cal.prevMonth,{text:c.__("prevMonth"),icon:d.calPrevMonthIcon})})).prependTo(b).find("a").addClass(function(){switch(c.baseMode){case"jqm":return d.btnCls+d.themeDate+d.icnCls+d.calPrevMonthIcon;case"bootstrap":case"bootstrap4":return d.btnCls+d.themeDate+" pull-"+(c.__("isRTL")?"right":"left");default:return null}}).on(d.clickEventAlt,function(a){return a.preventDefault(),a.stopPropagation(),c.calPrev&&(c.calBackDate===!1&&(c.calBackDate=new Date(c.theDate.getTime())),c.theDate.getDate()>28&&c.theDate.setDate(1),c._offset("m",-1)),!1})},_cal_pickers:function(b,c,d){var e,f,g,h=this,i=this.options,j="ui-datebox-",k=(new Date).get(0),l=a("<div>").addClass("ui-datebox-cal-pickers");for(i.calNoHeader&&i.calUsePickersIcons&&l.addClass("ui-datebox-pickicon"),l.i=a("<fieldset>").appendTo(l),l.a=a("<select>").appendTo(l.i),l.b=a("<select>").appendTo(l.i),g=0;11>=g;g++)l.a.append(a("<option value='"+g+"'"+(b===g?" selected='selected'":"")+">"+h.__("monthsOfYear")[g]+"</option>"));for(e=i.calYearPickMin<1?(i.calYearPickRelative?c:k)+i.calYearPickMin:i.calYearPickMin<1800?(i.calYearPickRelative?c:k)-i.calYearPickMin:"NOW"===i.calYearPickMin?d[0]:i.calYearPickMin,f=i.calYearPickMax<1800?(i.calYearPickRelative?c:k)+i.calYearPickMax:"NOW"===i.calYearPickMax?d[0]:i.calYearPickMax,g=e;f>=g;g++)l.b.append(a("<option value='"+g+"'"+(c===g?" selected='selected'":"")+">"+g+"</option>"));switch(l.a.on("change",function(){h.calBackDate===!1&&(h.calBackDate=new Date(h.theDate.getTime())),h.theDate.setD(1,a(this).val()),h.theDate.get(1)!==parseInt(a(this).val(),10)&&h.theDate.setD(2,0),h.calBackDate!==!1&&h._t({method:"displayChange",selectedDate:h.calBackDate,shownDate:h.theDate,thisChange:"p",thisChangeAmount:null}),h.refresh()}),l.b.on("change",function(){h.calBackDate===!1&&(h.calBackDate=new Date(h.theDate.getTime())),h.theDate.setD(0,a(this).val()),h.theDate.get(1)!==parseInt(l.a.val(),10)&&h.theDate.setD(2,0),h.calBackDate!==!1&&h._t({method:"displayChange",selectedDate:h.calBackDate,shownDate:h.theDate,thisChange:"p",thisChangeAmount:null}),h.refresh()}),h.baseMode){case"bootstrap":case"jqueryui":l.i.find("select").addClass("form-control input-sm").css({marginTop:"3px","float":"left"}).first().css({width:"60%"}).end().last().css({width:"40%"}),i.calNoHeader&&i.calUsePickersIcons?h.d.intHTML.find("."+j+"gridheader").append(l):l.appendTo(h.d.intHTML);break;case"bootstrap4":l.i.find("select").addClass("form-control form-control-sm input-sm").css({marginTop:"3px","float":"left",height:"auto"}).first().css({width:"60%"}).end().last().css({width:"40%"}),i.calNoHeader&&i.calUsePickersIcons?h.d.intHTML.find("."+j+"gridheader").append(l):l.appendTo(h.d.intHTML);break;case"jqm":l.i.controlgroup({mini:!0,type:"horizontal"}),l.i.find("select").selectmenu({nativeMenu:!0}),l.i.find(".ui-controlgroup-controls").css({marginRight:"auto",marginLeft:"auto",width:"100%",display:"table"}),l.i.find(".ui-select").first().css({width:"60%"}).end().last().css({width:"40%"}),i.calNoHeader&&i.calUsePickersIcons&&l.i.css({padding:"0 10px 5px 10px"}),l.appendTo(h.d.intHTML)}},_cal_date_list:function(b){var c,d,e=this,f=this.options,g=a("<div>").addClass("ui-datebox-pickcontrol");for(g.a=a("<select name='pickdate'></select>").appendTo(g),g.a.append("<option value='false' selected='selected'>"+e.__("calDateListLabel")+"</option>"),c=0;c<f.calDateList.length;c++)g.a.append(a(e._spf("<option value='{0}'>{1}</option>",f.calDateList[c])));switch(g.a.on("change",function(){d=a(this).val().split("-"),e.theDate=new e._date(d[0],d[1]-1,d[2],0,0,0,0),e._t({method:"doset"})}),e.baseMode){case"jqm":g.find("select").selectmenu({mini:!0,nativeMenu:!0});break;case"bootstrap":case"bootstrap4":g.find("select").addClass("form-control input-sm")}g.appendTo(b)},_dbox_run:function(){var a=this,b=this.drag,c=parseInt(6.09+142.8*Math.pow(Math.E,-.039*b.cnt),10);b.didRun=!0,b.cnt++,a._offset(b.target[0],b.target[1],!1),a._dbox_run_update(),a.runButton=setTimeout(function(){a._dbox_run()},c)},_dbox_run_update:function(b){var c=this,d=this.options,e=c.theDate.getTime()-c.initDate.getTime(),f="durationbox"===d.mode?!0:!1,g=c._dur(0>e?0:e);0>e&&(c.lastDuration=0,f&&c.theDate.setTime(c.initDate.getTime())),f&&(c.lastDuration=e/1e3,d.minDur!==!1&&c.theDate.getEpoch()-c.initDate.getEpoch()<d.minDur&&(c.theDate=new Date(c.initDate.getTime()+1e3*d.minDur),c.lastDuration=d.minDur,g=c._dur(1e3*d.minDur)),d.maxDur!==!1&&c.theDate.getEpoch()-c.initDate.getEpoch()>d.maxDur&&(c.theDate=new Date(c.initDate.getTime()+1e3*d.maxDur),c.lastDuration=d.maxDur,g=c._dur(1e3*d.maxDur))),b!==!0&&f!==!0&&(c._check(),"datebox"===d.mode&&c.d.intHTML.find(".ui-datebox-header").find("h4").text(c._formatter(c.__("headerFormat"),c.theDate)),d.useSetButton&&(c.dateOK===!1?c.setBut.addClass(d.disabledState):c.setBut.removeClass(d.disabledState))),c.d.divIn.find("input").each(function(){switch(a(this).data("field")){case"y":a(this).val(c.theDate.get(0));break;case"m":a(this).val(c.theDate.get(1)+1);break;case"d":a(this).val(f?g[0]:c.theDate.get(2));break;case"h":f?a(this).val(g[1]):12===c.__("timeFormat")?a(this).val(c.theDate.get12hr()):a(this).val(c.theDate.get(3));break;case"i":f?a(this).val(g[2]):a(this).val(c._zPad(c.theDate.get(4)));break;case"M":a(this).val(c.__("monthsOfYearShort")[c.theDate.get(1)]);break;case"a":a(this).val(c.__("meridiem")[c.theDate.get(3)>11?1:0]);break;case"s":f?a(this).val(g[3]):a(this).val(c._zPad(c.theDate.get(5)))}}),c.__("useArabicIndic")===!0&&c._doIndic()},_dbox_vhour:function(b){var c,d=this,e=this.options,f=[25,0],g=[25,0];return e.validHours===!1?!0:a.inArray(d.theDate.getHours(),e.validHours)>-1?!0:(c=d.theDate.getHours(),a.each(e.validHours,function(){(this>c?1:-1)===b?f[0]>Math.abs(this-c)&&(f=[Math.abs(this-c),parseInt(this,10)]):g[0]>Math.abs(this-c)&&(g=[Math.abs(this-c),parseInt(this,10)])}),void(0!==f[1]?d.theDate.setHours(f[1]):d.theDate.setHours(g[1])))},_dbox_enter:function(b){var c,d=this,e=0;if("M"===b.data("field")&&(c=a.inArray(b.val(),d.__("monthsOfYearShort")),c>-1&&d.theDate.setMonth(c)),""!==b.val()&&0===b.val().toString().search(/^[0-9]+$/))switch(b.data("field")){case"y":d.theDate.setD(0,parseInt(b.val(),10));break;case"m":d.theDate.setD(1,parseInt(b.val(),10)-1);break;case"d":d.theDate.setD(2,parseInt(b.val(),10)),e+=86400*parseInt(b.val(),10);break;case"h":d.theDate.setD(3,parseInt(b.val(),10)),e+=3600*parseInt(b.val(),10);break;case"i":d.theDate.setD(4,parseInt(b.val(),10)),e+=60*parseInt(b.val(),10);break;case"s":d.theDate.setD(5,parseInt(b.val(),10)),e+=parseInt(b.val(),10)}"durationbox"===this.options.mode&&d.theDate.setTime(d.initDate.getTime()+1e3*e),setTimeout(function(){d.refresh()},150)},_dbox_button:function(b,c,d){var e=this,f=this.options;return a("<div>").addClass("ui-datebox-datebox-button").addClass(f.btnCls+f.themeButton).addClass(function(){switch(e.baseMode){case"jqm":case"bootstrap":case"bootstrap4":return f.icnCls+(b>0?f.calNextMonthIcon:f.calPrevMonthIcon);default:return null}}).data({field:c,amount:d*b}).append(function(){switch(e.baseMode){case"jqueryui":return a("<span>").addClass(f.icnCls+(b>0?f.calNextMonthIcon:f.calPrevMonthIcon));default:return null}})},_fbox_pos:function(){var b,c,d,e=0,f=this,g="bootstrap4"===f.baseMode?5:0,h=this.d.intHTML.find(".ui-datebox-flipcontent").innerHeight();f.d.intHTML.find(".ui-datebox-flipcenter").each(function(){c=a(this),e=-1*(h/2-c.innerHeight()/2-3)+g,c.css("top",e)}),f.d.intHTML.find("ul").each(function(){c=a(this),h=c.parent().innerHeight(),d=c.find("li").first(),b=c.find("li").last().offset().top-c.find("li").first().offset().top,d.css("marginTop",-1*((b-h)/2+d.outerHeight()))})},_fbox_series:function(a,b,c,d){for(var e,f,g=this.options,h="h"===c?24:60,i=[[a.toString(),a]],j=1;b>=j;j++)e=a+j*g.durationSteppers[c],f=a-j*g.durationSteppers[c],i.unshift([e.toString(),e]),f>-1?i.push([f.toString(),f]):d?i.push([(h+f).toString(),f]):i.push(["",-1]);return i},_fbox_mktxt:{y:function(a){return this.theDate.get(0)+a},m:function(a){var b=this.theDate.copy([0],[0,0,1]).adj(1,a);return this.__("monthsOfYearShort")[b.get(1)]},d:function(a){var b=this,c=this.options;if(c.rolloverMode===!1||"undefined"!=typeof c.rolloverMode.d&&c.rolloverMode.d===!1){var d=this.theDate.get(2),e=32-b.theDate.copy([0],[0,0,32,13]).getDate(),f=d+a;return 1>f?e+f:f%e>0?f%e:e}return this.theDate.copy([0,0,a]).get(2)},h:function(a){var b=this.theDate.copy([0,0,0,a]);return 12===this.__("timeFormat")?b.get12hr():b.get(3)},i:function(a){return this._zPad(this.theDate.copy([0,0,0,0,a]).get(4))},s:function(a){return this._zPad(this.theDate.copy([0,0,0,0,0,a]).get(5))}},_sbox_pos:function(){var b,c,d,e,f,g=this;g.d.intHTML.find("div.ui-datebox-sliderow-int").each(function(){c=a(this),e=c.parent().outerWidth(),b=c.outerWidth(),d=g.__("isRTL")?c.find("div").last():c.find("div").first(),f=c.find("div").length*d.outerWidth(),b>0&&(f=b),d.css("marginLeft",(f-e)/2*-1)})},_sbox_mktxt:{y:function(a){return["slideyear",this.theDate.get(0)+a]},m:function(a){var b=this.theDate.copy([0],[0,0,1]).adj(1,a);return["slidemonth",this.__("monthsOfYearShort")[b.get(1)]]},d:function(a){var b=this.theDate.copy([0,0,a]);return["slideday",b.get(2)+"<br /><span class='ui-datebox-slidewday'>"+this.__("daysOfWeekShort")[b.getDay()]+"</span>"]},h:function(a){var b=this.theDate.copy([0,0,0,a]);return["slidehour",12===this.__("timeFormat")?this._formatter("%-I<span class='ui-datebox-slidewday'>%p</span>",b):b.get(3)]},i:function(a){return["slidemins",this._zPad(this.theDate.copy([0,0,0,0,a]).get(4))]}}})}(jQuery),function(a){a(document).ready(function(){a("[data-role='datebox']").each(function(){a(this).datebox()})})}(jQuery); |
@@ -5,3 +5,3 @@ { | ||
"description": "Plugin to provide a framework agnostic Date and Time Picker (Bootstrap v4 Version)", | ||
"version": "4.2.2", | ||
"version": "4.2.3", | ||
"supports": { | ||
@@ -8,0 +8,0 @@ "bootstrap": "4.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
220286
3653