/home/techb158/on-time-movers.com/wp-content/plugins/mystickyelements/dist/js
Edit: /home/techb158/on-time-movers.com/wp-content/plugins/mystickyelements/dist/js/timepicker.js (24210B)
(()=>{function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}(function($){$.extend($.ui,{timepicker:{version:"0.3.3"}});var PROP_NAME="timepicker",tpuuid=(new Date).getTime();function Timepicker(){this.debug=!0,this._curInst=null,this._disabledInputs=[],this._timepickerShowing=!1,this._inDialog=!1,this._dialogClass="ui-timepicker-dialog",this._mainDivId="ui-timepicker-div",this._inlineClass="ui-timepicker-inline",this._currentClass="ui-timepicker-current",this._dayOverClass="ui-timepicker-days-cell-over",this.regional=[],this.regional[""]={hourText:"Hour",minuteText:"Minute",amPmText:["AM","PM"],closeButtonText:"Done",nowButtonText:"Now",deselectButtonText:"Deselect"},this._defaults={showOn:"focus",button:null,showAnim:"fadeIn",showOptions:{},appendText:"",beforeShow:null,onSelect:null,onClose:null,timeSeparator:":",timeWithoutSeparator:!0,periodSeparator:" ",showPeriod:!1,showPeriodLabels:!0,showLeadingZero:!0,showMinutesLeadingZero:!0,altField:"",defaultTime:"now",myPosition:"left top",atPosition:"left bottom",onHourShow:null,onMinuteShow:null,hours:{starts:0,ends:23},minutes:{starts:0,ends:55,interval:5,manual:[]},rows:4,showHours:!0,showMinutes:!0,optionalMinutes:!1,showCloseButton:!1,showNowButton:!1,showDeselectButton:!1,maxTime:{hour:null,minute:null},minTime:{hour:null,minute:null}},$.extend(this._defaults,this.regional[""]),this.tpDiv=$('
')}function extendRemove(e,t){for(var i in $.extend(e,t),t)null!=t[i]&&null!=t[i]||(e[i]=t[i]);return e}$.extend(Timepicker.prototype,{markerClassName:"hasTimepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetTimepicker:function(){return this.tpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_attachTimepicker:function _attachTimepicker(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("time:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(e){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="tp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),"input"==nodeName?(this._connectTimepicker(target,inst),this._setTimeFromField(inst)):inline&&this._inlineTimepicker(target,inst)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:e,inline:t,tpDiv:t?$('
'):this.tpDiv}},_connectTimepicker:function(e,t){var i=$(e);t.append=$([]),t.trigger=$([]),i.hasClass(this.markerClassName)||(this._attachments(i,t),i.addClass(this.markerClassName).keydown(this._doKeyDown).keyup(this._doKeyUp).bind("setData.timepicker",(function(e,i,s){t.settings[i]=s})).bind("getData.timepicker",(function(e,i){return this._get(t,i)})),$.data(e,PROP_NAME,t))},_doKeyDown:function(e){var t=$.timepicker._getInst(e.target),i=!0;if(t._keyEvent=!0,$.timepicker._timepickerShowing)switch(e.keyCode){case 9:$.timepicker._hideTimepicker(),i=!1;break;case 13:return $.timepicker._updateSelectedValue(t),$.timepicker._hideTimepicker(),!1;case 27:$.timepicker._hideTimepicker();break;default:i=!1}else 36==e.keyCode&&e.ctrlKey?$.timepicker._showTimepicker(this):i=!1;i&&(e.preventDefault(),e.stopPropagation())},_doKeyUp:function(e){var t=$.timepicker._getInst(e.target);$.timepicker._setTimeFromField(t),$.timepicker._updateTimepicker(t)},_attachments:function(e,t){var i=this._get(t,"appendText"),s=this._get(t,"isRTL");t.append&&t.append.remove(),i&&(t.append=$('
'+i+""),e[s?"before":"after"](t.append)),e.unbind("focus.timepicker",this._showTimepicker),e.unbind("click.timepicker",this._adjustZIndex),t.trigger&&t.trigger.remove();var n=this._get(t,"showOn");if("focus"!=n&&"both"!=n||(e.bind("focus.timepicker",this._showTimepicker),e.bind("click.timepicker",this._adjustZIndex)),"button"==n||"both"==n){var r=this._get(t,"button");null==r&&(r=$('
'),e.after(r)),$(r).bind("click.timepicker",(function(){return $.timepicker._timepickerShowing&&$.timepicker._lastInput==e[0]?$.timepicker._hideTimepicker():t.input.is(":disabled")||$.timepicker._showTimepicker(e[0]),!1}))}},_inlineTimepicker:function(e,t){var i=$(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(t.tpDiv).bind("setData.timepicker",(function(e,i,s){t.settings[i]=s})).bind("getData.timepicker",(function(e,i){return this._get(t,i)})),$.data(e,PROP_NAME,t),this._setTimeFromField(t),this._updateTimepicker(t),t.tpDiv.show())},_adjustZIndex:function(e){e=e.target||e,$.timepicker._getInst(e).tpDiv.css("zIndex",$.timepicker._getZIndex(e)+1)},_showTimepicker:function(e){if("input"!=(e=e.target||e).nodeName.toLowerCase()&&(e=$("input",e.parentNode)[0]),!$.timepicker._isDisabledTimepicker(e)&&$.timepicker._lastInput!=e){$.timepicker._hideTimepicker();var t=$.timepicker._getInst(e);$.timepicker._curInst&&$.timepicker._curInst!=t&&$.timepicker._curInst.tpDiv.stop(!0,!0);var i=$.timepicker._get(t,"beforeShow");extendRemove(t.settings,i?i.apply(e,[e,t]):{}),t.lastVal=null,$.timepicker._lastInput=e,$.timepicker._setTimeFromField(t),$.timepicker._inDialog&&(e.value=""),$.timepicker._pos||($.timepicker._pos=$.timepicker._findPos(e),$.timepicker._pos[1]+=e.offsetHeight);var s=!1;$(e).parents().each((function(){return!(s|="fixed"==$(this).css("position"))}));var n={left:$.timepicker._pos[0],top:$.timepicker._pos[1]};if($.timepicker._pos=null,t.tpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.timepicker._updateTimepicker(t),!t.inline&&"object"==_typeof($.ui.position)){t.tpDiv.position({of:t.input,my:$.timepicker._get(t,"myPosition"),at:$.timepicker._get(t,"atPosition"),collision:"flip"});n=t.tpDiv.offset();$.timepicker._pos=[n.top,n.left]}if(t._hoursClicked=!1,t._minutesClicked=!1,n=$.timepicker._checkOffset(t,n,s),t.tpDiv.css({position:$.timepicker._inDialog&&$.blockUI?"static":s?"fixed":"absolute",display:"none",left:n.left+"px",top:n.top+"px"}),!t.inline){var r=$.timepicker._get(t,"showAnim"),a=$.timepicker._get(t,"duration"),u=function(){$.timepicker._timepickerShowing=!0;var e=$.timepicker._getBorders(t.tpDiv);t.tpDiv.find("iframe.ui-timepicker-cover").css({left:-e[0],top:-e[1],width:t.tpDiv.outerWidth(),height:t.tpDiv.outerHeight()})};$.timepicker._adjustZIndex(e),$.effects&&$.effects[r]?t.tpDiv.show(r,$.timepicker._get(t,"showOptions"),a,u):t.tpDiv.show(r?a:null,u),r&&a||u(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.timepicker._curInst=t}}},_getZIndex:function(e){for(var t,i,s=$(e),n=0;s.length&&s[0]!==document;)"absolute"!==(t=s.css("position"))&&"relative"!==t&&"fixed"!==t||(i=parseInt(s.css("zIndex"),10),isNaN(i)||0===i||i>n&&(n=i)),s=s.parent();return n},_refreshTimepicker:function(e){var t=this._getInst(e);t&&this._updateTimepicker(t)},_updateTimepicker:function(e){e.tpDiv.empty().append(this._generateHTML(e)),this._rebindDialogEvents(e)},_rebindDialogEvents:function(e){var t=$.timepicker._getBorders(e.tpDiv),i=this;e.tpDiv.find("iframe.ui-timepicker-cover").css({left:-t[0],top:-t[1],width:e.tpDiv.outerWidth(),height:e.tpDiv.outerHeight()}).end().find(".ui-timepicker-minute-cell").unbind().bind("click",{fromDoubleClick:!1},$.proxy($.timepicker.selectMinutes,this)).bind("dblclick",{fromDoubleClick:!0},$.proxy($.timepicker.selectMinutes,this)).end().find(".ui-timepicker-hour-cell").unbind().bind("click",{fromDoubleClick:!1},$.proxy($.timepicker.selectHours,this)).bind("dblclick",{fromDoubleClick:!0},$.proxy($.timepicker.selectHours,this)).end().find(".ui-timepicker td a").unbind().bind("mouseout",(function(){$(this).removeClass("ui-state-hover"),-1!=this.className.indexOf("ui-timepicker-prev")&&$(this).removeClass("ui-timepicker-prev-hover"),-1!=this.className.indexOf("ui-timepicker-next")&&$(this).removeClass("ui-timepicker-next-hover")})).bind("mouseover",(function(){i._isDisabledTimepicker(e.inline?e.tpDiv.parent()[0]:e.input[0])||($(this).parents(".ui-timepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),-1!=this.className.indexOf("ui-timepicker-prev")&&$(this).addClass("ui-timepicker-prev-hover"),-1!=this.className.indexOf("ui-timepicker-next")&&$(this).addClass("ui-timepicker-next-hover"))})).end().find("."+this._dayOverClass+" a").trigger("mouseover").end().find(".ui-timepicker-now").bind("click",(function(e){$.timepicker.selectNow(e)})).end().find(".ui-timepicker-deselect").bind("click",(function(e){$.timepicker.deselectTime(e)})).end().find(".ui-timepicker-close").bind("click",(function(e){$.timepicker._hideTimepicker()})).end()},_generateHTML:function(e){var t,i,s,n,r=1==this._get(e,"showPeriod"),a=1==this._get(e,"showPeriodLabels"),u=1==this._get(e,"showLeadingZero"),o=1==this._get(e,"showHours"),c=1==this._get(e,"showMinutes"),p=this._get(e,"amPmText"),l=this._get(e,"rows"),d=0,h=0,m=0,_=0,g=0,k=0,f=Array(),v=this._get(e,"hours"),$=null,b=0,T=this._get(e,"hourText"),w=this._get(e,"showCloseButton"),C=this._get(e,"closeButtonText"),D=this._get(e,"showNowButton"),y=this._get(e,"nowButtonText"),I=this._get(e,"showDeselectButton"),x=this._get(e,"deselectButtonText"),M=w||D||I;for(t=v.starts;t<=v.ends;t++)f.push(t);if($=Math.ceil(f.length/l),a){for(b=0;b
=_/h)?d++:h++),g=Math.min(d,1),k=d+1,$=0==d?Math.ceil(_/h):0==h?Math.ceil(m/d):Math.ceil(Math.max(m/d,_/h))}if(n='',o){for(n+='',i=1;i<=l;i++){for(n+="",i==g&&a&&(n+='| '+p[0]+" | "),i==k&&a&&(n+=''+p[1]+" | "),s=1;s<=$;s++)a&&i=12?n+=this._generateHTMLHourCell(e,void 0,r,u):(n+=this._generateHTMLHourCell(e,f[b],r,u),b++);n+=" "}n+=" | "}if(c&&(n+='',n+=this._generateHTMLMinutes(e),n+=" | "),n+="
",M){var N='';D&&(N+='"),I&&(N+='"),w&&(N+='"),n+=N+" |
"}return n+="
"},_updateMinuteDisplay:function(e){var t=this._generateHTMLMinutes(e);e.tpDiv.find("td.ui-timepicker-minutes").html(t),this._rebindDialogEvents(e)},_generateHTMLMinutes:function(e){var t,s,n="",r=this._get(e,"rows"),a=Array(),u=this._get(e,"minutes"),o=0,c=1==this._get(e,"showMinutesLeadingZero"),p=this._get(e,"onMinuteShow"),l=this._get(e,"minuteText");for(u.starts||(u.starts=0),u.ends||(u.ends=59),u.manual||(u.manual=[]),h=u.starts;h<=u.ends;h+=u.interval)a.push(h);for(i=0;i59||$.inArray(d,a)>=0||a.push(d)}if(a.sort((function(e,t){return e-t})),s=Math.round(a.length/r+.49),p&&0==p.apply(e.input?e.input[0]:null,[e.hours,e.minutes]))for(o=0;o