powerdns-admin/powerdnsadmin/static/assets/jquery-ui-smooth-datepicker/jquery-ui.min.js
ManosKoukoularis 1332c8d29d
History Tab Overhaul & Domain Record Modifications Changelog (#1042)
Co-authored-by: Konstantinos Kouris <85997752+konkourgr@users.noreply.github.com>
Co-authored-by: vmarkop <billy.mark.b.m.10@gmail.com>
Co-authored-by: KostasMparmparousis <mparmparousis.kostas@gmail.com>
Co-authored-by: dimpapac <demispapa@gmail.com>
2021-11-30 11:02:37 +02:00

6 lines
61 KiB
JavaScript

/*! jQuery UI - v1.13.0 - 2021-11-11
* http://jqueryui.com
* Includes: keycode.js, widgets/datepicker.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(J){"use strict";J.ui=J.ui||{};var r;J.ui.version="1.13.0",J.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38};function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},J.extend(this._defaults,this.regional[""]),this.regional.en=J.extend(!0,{},this.regional[""]),this.regional["en-US"]=J.extend(!0,{},this.regional.en),this.dpDiv=i(J("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function i(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",t,function(){J(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&J(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&J(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",t,o)}function o(){J.datepicker._isDisabledDatepicker((r.inline?r.dpDiv.parent():r.input)[0])||(J(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),J(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&J(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&J(this).addClass("ui-datepicker-next-hover"))}function c(e,t){for(var i in J.extend(e,t),t)null==t[i]&&(e[i]=t[i]);return e}J.extend(J.ui,{datepicker:{version:"1.13.0"}}),J.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return c(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var i,a=e.nodeName.toLowerCase(),n="div"===a||"span"===a;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(i=this._newInst(J(e),n)).settings=J.extend({},t||{}),"input"===a?this._connectDatepicker(e,i):n&&this._inlineDatepicker(e,i)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?i(J("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var i=J(e);t.append=J([]),t.trigger=J([]),i.hasClass(this.markerClassName)||(this._attachments(i,t),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(t),J.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var i,a=this._get(t,"appendText"),n=this._get(t,"isRTL");t.append&&t.append.remove(),a&&(t.append=J("<span>").addClass(this._appendClass).text(a),e[n?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(i=this._get(t,"showOn"))&&"both"!==i||e.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(a=this._get(t,"buttonText"),i=this._get(t,"buttonImage"),this._get(t,"buttonImageOnly")?t.trigger=J("<img>").addClass(this._triggerClass).attr({src:i,alt:a,title:a}):(t.trigger=J("<button type='button'>").addClass(this._triggerClass),i?t.trigger.html(J("<img>").attr({src:i,alt:a,title:a})):t.trigger.text(a)),e[n?"before":"after"](t.trigger),t.trigger.on("click",function(){return J.datepicker._datepickerShowing&&J.datepicker._lastInput===e[0]?J.datepicker._hideDatepicker():(J.datepicker._datepickerShowing&&J.datepicker._lastInput!==e[0]&&J.datepicker._hideDatepicker(),J.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,i,a,n,s,r;this._get(e,"autoSize")&&!e.inline&&(s=new Date(2009,11,20),(r=this._get(e,"dateFormat")).match(/[DM]/)&&(t=function(e){for(n=a=i=0;n<e.length;n++)e[n].length>i&&(i=e[n].length,a=n);return a},s.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),s.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-s.getDay())),e.input.attr("size",this._formatDate(e,s).length))},_inlineDatepicker:function(e,t){var i=J(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(t.dpDiv),J.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,i,a,n){var s,r=this._dialogInst;return r||(this.uuid+=1,s="dp"+this.uuid,this._dialogInput=J("<input type='text' id='"+s+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),J("body").append(this._dialogInput),(r=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},J.data(this._dialogInput[0],"datepicker",r)),c(r.settings,a||{}),t=t&&t.constructor===Date?this._formatDate(r,t):t,this._dialogInput.val(t),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(s=document.documentElement.clientWidth,a=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[s/2-100+t,a/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),J.blockUI&&J.blockUI(this.dpDiv),J.data(this._dialogInput[0],"datepicker",r),this},_destroyDatepicker:function(e){var t,i=J(e),a=J.data(e,"datepicker");i.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),J.removeData(e,"datepicker"),"input"===t?(a.append.remove(),a.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||i.removeClass(this.markerClassName).empty(),r===a&&(r=null,this._curInst=null))},_enableDatepicker:function(t){var e,i=J(t),a=J.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((i=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=J.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,i=J(t),a=J.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((i=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=J.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return J.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,i){var a,n,s=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?J.extend({},J.datepicker._defaults):s?"all"===t?J.extend({},s.settings):this._get(s,t):null;a=t||{},"string"==typeof t&&((a={})[t]=i),s&&(this._curInst===s&&this._hideDatepicker(),n=this._getDateDatepicker(e,!0),t=this._getMinMaxDate(s,"min"),i=this._getMinMaxDate(s,"max"),c(s.settings,a),null!==t&&void 0!==a.dateFormat&&void 0===a.minDate&&(s.settings.minDate=this._formatDate(s,t)),null!==i&&void 0!==a.dateFormat&&void 0===a.maxDate&&(s.settings.maxDate=this._formatDate(s,i)),"disabled"in a&&(a.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(J(e),s),this._autoSize(s),this._setDate(s,n),this._updateAlternate(s),this._updateDatepicker(s))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){e=this._getInst(e);e&&this._updateDatepicker(e)},_setDateDatepicker:function(e,t){e=this._getInst(e);e&&(this._setDate(e,t),this._updateDatepicker(e),this._updateAlternate(e))},_getDateDatepicker:function(e,t){e=this._getInst(e);return e&&!e.inline&&this._setDateFromField(e,t),e?this._getDate(e):null},_doKeyDown:function(e){var t,i,a=J.datepicker._getInst(e.target),n=!0,s=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,J.datepicker._datepickerShowing)switch(e.keyCode){case 9:J.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=J("td."+J.datepicker._dayOverClass+":not(."+J.datepicker._currentClass+")",a.dpDiv))[0]&&J.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,i[0]),(t=J.datepicker._get(a,"onSelect"))?(i=J.datepicker._formatDate(a),t.apply(a.input?a.input[0]:null,[i,a])):J.datepicker._hideDatepicker(),!1;case 27:J.datepicker._hideDatepicker();break;case 33:J.datepicker._adjustDate(e.target,e.ctrlKey?-J.datepicker._get(a,"stepBigMonths"):-J.datepicker._get(a,"stepMonths"),"M");break;case 34:J.datepicker._adjustDate(e.target,e.ctrlKey?+J.datepicker._get(a,"stepBigMonths"):+J.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&J.datepicker._clearDate(e.target),n=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&J.datepicker._gotoToday(e.target),n=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&J.datepicker._adjustDate(e.target,s?1:-1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&J.datepicker._adjustDate(e.target,e.ctrlKey?-J.datepicker._get(a,"stepBigMonths"):-J.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&J.datepicker._adjustDate(e.target,-7,"D"),n=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&J.datepicker._adjustDate(e.target,s?-1:1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&J.datepicker._adjustDate(e.target,e.ctrlKey?+J.datepicker._get(a,"stepBigMonths"):+J.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&J.datepicker._adjustDate(e.target,7,"D"),n=e.ctrlKey||e.metaKey;break;default:n=!1}else 36===e.keyCode&&e.ctrlKey?J.datepicker._showDatepicker(this):n=!1;n&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,i=J.datepicker._getInst(e.target);if(J.datepicker._get(i,"constrainInput"))return t=J.datepicker._possibleChars(J.datepicker._get(i,"dateFormat")),i=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||i<" "||!t||-1<t.indexOf(i)},_doKeyUp:function(e){e=J.datepicker._getInst(e.target);if(e.input.val()!==e.lastVal)try{J.datepicker.parseDate(J.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,J.datepicker._getFormatConfig(e))&&(J.datepicker._setDateFromField(e),J.datepicker._updateAlternate(e),J.datepicker._updateDatepicker(e))}catch(e){}return!0},_showDatepicker:function(e){var t,i,a,n;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=J("input",e.parentNode)[0]),J.datepicker._isDisabledDatepicker(e)||J.datepicker._lastInput===e||(n=J.datepicker._getInst(e),J.datepicker._curInst&&J.datepicker._curInst!==n&&(J.datepicker._curInst.dpDiv.stop(!0,!0),n&&J.datepicker._datepickerShowing&&J.datepicker._hideDatepicker(J.datepicker._curInst.input[0])),!1!==(i=(a=J.datepicker._get(n,"beforeShow"))?a.apply(e,[e,n]):{})&&(c(n.settings,i),n.lastVal=null,J.datepicker._lastInput=e,J.datepicker._setDateFromField(n),J.datepicker._inDialog&&(e.value=""),J.datepicker._pos||(J.datepicker._pos=J.datepicker._findPos(e),J.datepicker._pos[1]+=e.offsetHeight),t=!1,J(e).parents().each(function(){return!(t|="fixed"===J(this).css("position"))}),a={left:J.datepicker._pos[0],top:J.datepicker._pos[1]},J.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),J.datepicker._updateDatepicker(n),a=J.datepicker._checkOffset(n,a,t),n.dpDiv.css({position:J.datepicker._inDialog&&J.blockUI?"static":t?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),n.inline||(i=J.datepicker._get(n,"showAnim"),a=J.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(e){for(var t,i;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}(J(e))+1),J.datepicker._datepickerShowing=!0,J.effects&&J.effects.effect[i]?n.dpDiv.show(i,J.datepicker._get(n,"showOptions"),a):n.dpDiv[i||"show"](i?a:null),J.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),J.datepicker._curInst=n)))},_updateDatepicker:function(e){this.maxRows=4,(r=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,i=this._getNumberOfMonths(e),a=i[1],n=e.dpDiv.find("."+this._dayOverClass+" a"),s=J.datepicker._get(e,"onUpdateDatepicker");0<n.length&&o.apply(n.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<a&&e.dpDiv.addClass("ui-datepicker-multi-"+a).css("width",17*a+"em"),e.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===J.datepicker._curInst&&J.datepicker._datepickerShowing&&J.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year").first().replaceWith(e.yearshtml),t=e.yearshtml=null},0)),s&&s.apply(e.input?e.input[0]:null,[e])},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,i){var a=e.dpDiv.outerWidth(),n=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,o=document.documentElement.clientWidth+(i?0:J(document).scrollLeft()),c=document.documentElement.clientHeight+(i?0:J(document).scrollTop());return t.left-=this._get(e,"isRTL")?a-s:0,t.left-=i&&t.left===e.input.offset().left?J(document).scrollLeft():0,t.top-=i&&t.top===e.input.offset().top+r?J(document).scrollTop():0,t.left-=Math.min(t.left,t.left+a>o&&a<o?Math.abs(t.left+a-o):0),t.top-=Math.min(t.top,t.top+n>c&&n<c?Math.abs(n+r):0),t},_findPos:function(e){for(var t=this._getInst(e),i=this._get(t,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||J.expr.pseudos.hidden(e));)e=e[i?"previousSibling":"nextSibling"];return[(t=J(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,i,a=this._curInst;!a||e&&a!==J.data(e,"datepicker")||this._datepickerShowing&&(t=this._get(a,"showAnim"),i=this._get(a,"duration"),e=function(){J.datepicker._tidyDialog(a)},J.effects&&(J.effects.effect[t]||J.effects[t])?a.dpDiv.hide(t,J.datepicker._get(a,"showOptions"),i,e):a.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?i:null,e),t||e(),this._datepickerShowing=!1,(e=this._get(a,"onClose"))&&e.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),J.blockUI&&(J.unblockUI(),J("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){var t;J.datepicker._curInst&&(t=J(e.target),e=J.datepicker._getInst(t[0]),(t[0].id===J.datepicker._mainDivId||0!==t.parents("#"+J.datepicker._mainDivId).length||t.hasClass(J.datepicker.markerClassName)||t.closest("."+J.datepicker._triggerClass).length||!J.datepicker._datepickerShowing||J.datepicker._inDialog&&J.blockUI)&&(!t.hasClass(J.datepicker.markerClassName)||J.datepicker._curInst===e)||J.datepicker._hideDatepicker())},_adjustDate:function(e,t,i){var a=J(e),e=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(e,t,i),this._updateDatepicker(e))},_gotoToday:function(e){var t=J(e),i=this._getInst(t[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(e=new Date,i.selectedDay=e.getDate(),i.drawMonth=i.selectedMonth=e.getMonth(),i.drawYear=i.selectedYear=e.getFullYear()),this._notifyChange(i),this._adjustDate(t)},_selectMonthYear:function(e,t,i){var a=J(e),e=this._getInst(a[0]);e["selected"+("M"===i?"Month":"Year")]=e["draw"+("M"===i?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(a)},_selectDay:function(e,t,i,a){var n=J(e);J(a).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=parseInt(J("a",a).attr("data-date")),n.selectedMonth=n.currentMonth=t,n.selectedYear=n.currentYear=i,this._selectDate(e,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(e){e=J(e);this._selectDate(e,"")},_selectDate:function(e,t){var i=J(e),e=this._getInst(i[0]);t=null!=t?t:this._formatDate(e),e.input&&e.input.val(t),this._updateAlternate(e),(i=this._get(e,"onSelect"))?i.apply(e.input?e.input[0]:null,[t,e]):e.input&&e.input.trigger("change"),e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var t,i,a=this._get(e,"altField");a&&(t=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),e=this.formatDate(t,i,this._getFormatConfig(e)),J(document).find(a).val(e))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t=new Date(e.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),e=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((e-t)/864e5)/7)+1},parseDate:function(t,n,e){if(null==t||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;for(var i,a,s,r=0,o=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,o="string"!=typeof o?o:(new Date).getFullYear()%100+parseInt(o,10),c=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,d=(e?e.dayNames:null)||this._defaults.dayNames,l=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,u=(e?e.monthNames:null)||this._defaults.monthNames,h=-1,p=-1,f=-1,g=-1,m=!1,_=function(e){e=v+1<t.length&&t.charAt(v+1)===e;return e&&v++,e},y=function(e){var t=_(e),t="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,t=new RegExp("^\\d{"+("y"===e?t:1)+","+t+"}"),t=n.substring(r).match(t);if(!t)throw"Missing number at position "+r;return r+=t[0].length,parseInt(t[0],10)},k=function(e,t,i){var a=-1,t=J.map(_(e)?i:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(J.each(t,function(e,t){var i=t[1];if(n.substr(r,i.length).toLowerCase()===i.toLowerCase())return a=t[0],r+=i.length,!1}),-1!==a)return a+1;throw"Unknown name at position "+r},D=function(){if(n.charAt(r)!==t.charAt(v))throw"Unexpected literal at position "+r;r++},v=0;v<t.length;v++)if(m)"'"!==t.charAt(v)||_("'")?D():m=!1;else switch(t.charAt(v)){case"d":f=y("d");break;case"D":k("D",c,d);break;case"o":g=y("o");break;case"m":p=y("m");break;case"M":p=k("M",l,u);break;case"y":h=y("y");break;case"@":h=(s=new Date(y("@"))).getFullYear(),p=s.getMonth()+1,f=s.getDate();break;case"!":h=(s=new Date((y("!")-this._ticksTo1970)/1e4)).getFullYear(),p=s.getMonth()+1,f=s.getDate();break;case"'":_("'")?D():m=!0;break;default:D()}if(r<n.length&&(a=n.substr(r),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===h?h=(new Date).getFullYear():h<100&&(h+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h<=o?0:-100)),-1<g)for(p=1,f=g;;){if(f<=(i=this._getDaysInMonth(h,p-1)))break;p++,f-=i}if((s=this._daylightSavingAdjust(new Date(h,p-1,f))).getFullYear()!==h||s.getMonth()+1!==p||s.getDate()!==f)throw"Invalid date";return s},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";function a(e,t,i){var a=""+t;if(l(e))for(;a.length<i;)a="0"+a;return a}function n(e,t,i,a){return(l(e)?a:i)[t]}var s,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,c=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,d=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){e=s+1<t.length&&t.charAt(s+1)===e;return e&&s++,e},u="",h=!1;if(e)for(s=0;s<t.length;s++)if(h)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):h=!1;else switch(t.charAt(s)){case"d":u+=a("d",e.getDate(),2);break;case"D":u+=n("D",e.getDay(),r,o);break;case"o":u+=a("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=a("m",e.getMonth()+1,2);break;case"M":u+=n("M",e.getMonth(),c,d);break;case"y":u+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":h=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){for(var e="",i=!1,a=function(e){e=n+1<t.length&&t.charAt(n+1)===e;return e&&n++,e},n=0;n<t.length;n++)if(i)"'"!==t.charAt(n)||a("'")?e+=t.charAt(n):i=!1;else switch(t.charAt(n)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":a("'")?e+="'":i=!0;break;default:e+=t.charAt(n)}return e},_get:function(e,t){return(void 0!==e.settings[t]?e.settings:this._defaults)[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),s=n,r=this._getFormatConfig(e);try{s=this.parseDate(i,a,r)||n}catch(e){a=t?"":a}e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),e.currentDay=a?s.getDate():0,e.currentMonth=a?s.getMonth():0,e.currentYear=a?s.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(o,e,t){var i,a,e=null==e||""===e?t:"string"==typeof e?function(e){try{return J.datepicker.parseDate(J.datepicker._get(o,"dateFormat"),e,J.datepicker._getFormatConfig(o))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?J.datepicker._getDate(o):null)||new Date,i=t.getFullYear(),a=t.getMonth(),n=t.getDate(),s=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=s.exec(e);r;){switch(r[2]||"d"){case"d":case"D":n+=parseInt(r[1],10);break;case"w":case"W":n+=7*parseInt(r[1],10);break;case"m":case"M":a+=parseInt(r[1],10),n=Math.min(n,J.datepicker._getDaysInMonth(i,a));break;case"y":case"Y":i+=parseInt(r[1],10),n=Math.min(n,J.datepicker._getDaysInMonth(i,a))}r=s.exec(e)}return new Date(i,a,n)}(e):"number"==typeof e?isNaN(e)?t:(i=e,(a=new Date).setDate(a.getDate()+i),a):new Date(e.getTime());return(e=e&&"Invalid Date"===e.toString()?t:e)&&(e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0)),this._daylightSavingAdjust(e)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,n=e.selectedMonth,s=e.selectedYear,t=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=t.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=t.getMonth(),e.drawYear=e.selectedYear=e.currentYear=t.getFullYear(),n===e.selectedMonth&&s===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),i="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){J.datepicker._adjustDate(i,-t,"M")},next:function(){J.datepicker._adjustDate(i,+t,"M")},hide:function(){J.datepicker._hideDatepicker()},today:function(){J.datepicker._gotoToday(i)},selectDay:function(){return J.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return J.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return J.datepicker._selectMonthYear(i,this,"Y"),!1}};J(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,n,s,r,o,c,d,l,u,h,p,f,g,m,_,y,k,D,v,b,w,M,x,C,I,T,S,N,F,Y,A=new Date,j=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth(),A.getDate())),H=this._get(e,"isRTL"),W=this._get(e,"showButtonPanel"),O=this._get(e,"hideIfNoPrevNext"),K=this._get(e,"navigationAsDateFormat"),L=this._getNumberOfMonths(e),R=this._get(e,"showCurrentAtPos"),A=this._get(e,"stepMonths"),E=1!==L[0]||1!==L[1],B=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),P=this._getMinMaxDate(e,"min"),q=this._getMinMaxDate(e,"max"),z=e.drawMonth-R,U=e.drawYear;if(z<0&&(z+=12,U--),q)for(t=this._daylightSavingAdjust(new Date(q.getFullYear(),q.getMonth()-L[0]*L[1]+1,q.getDate())),t=P&&t<P?P:t;this._daylightSavingAdjust(new Date(U,z,1))>t;)--z<0&&(z=11,U--);for(e.drawMonth=z,e.drawYear=U,R=this._get(e,"prevText"),R=K?this.formatDate(R,this._daylightSavingAdjust(new Date(U,z-A,1)),this._getFormatConfig(e)):R,i=this._canAdjustMonth(e,-1,U,z)?J("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:R}).append(J("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(H?"e":"w")).text(R))[0].outerHTML:O?"":J("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:R}).append(J("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(H?"e":"w")).text(R))[0].outerHTML,R=this._get(e,"nextText"),R=K?this.formatDate(R,this._daylightSavingAdjust(new Date(U,z+A,1)),this._getFormatConfig(e)):R,a=this._canAdjustMonth(e,1,U,z)?J("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:R}).append(J("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(H?"w":"e")).text(R))[0].outerHTML:O?"":J("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:R}).append(J("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(H?"w":"e")).text(R))[0].outerHTML,A=this._get(e,"currentText"),O=this._get(e,"gotoCurrent")&&e.currentDay?B:j,A=K?this.formatDate(A,O,this._getFormatConfig(e)):A,R="",e.inline||(R=J("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(e,"closeText"))[0].outerHTML),K="",W&&(K=J("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(H?R:"").append(this._isInRange(e,O)?J("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(A):"").append(H?"":R)[0].outerHTML),n=parseInt(this._get(e,"firstDay"),10),n=isNaN(n)?0:n,s=this._get(e,"showWeek"),r=this._get(e,"dayNames"),o=this._get(e,"dayNamesMin"),c=this._get(e,"monthNames"),d=this._get(e,"monthNamesShort"),l=this._get(e,"beforeShowDay"),u=this._get(e,"showOtherMonths"),h=this._get(e,"selectOtherMonths"),p=this._getDefaultDate(e),f="",m=0;m<L[0];m++){for(_="",this.maxRows=4,y=0;y<L[1];y++){if(k=this._daylightSavingAdjust(new Date(U,z,e.selectedDay)),D=" ui-corner-all",v="",E){if(v+="<div class='ui-datepicker-group",1<L[1])switch(y){case 0:v+=" ui-datepicker-group-first",D=" ui-corner-"+(H?"right":"left");break;case L[1]-1:v+=" ui-datepicker-group-last",D=" ui-corner-"+(H?"left":"right");break;default:v+=" ui-datepicker-group-middle",D=""}v+="'>"}for(v+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+D+"'>"+(/all|left/.test(D)&&0===m?H?a:i:"")+(/all|right/.test(D)&&0===m?H?i:a:"")+this._generateMonthYearHeader(e,z,U,P,q,0<m||0<y,c,d)+"</div><table class='ui-datepicker-calendar'><thead><tr>",b=s?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",g=0;g<7;g++)b+="<th scope='col'"+(5<=(g+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+r[w=(g+n)%7]+"'>"+o[w]+"</span></th>";for(v+=b+"</tr></thead><tbody>",x=this._getDaysInMonth(U,z),U===e.selectedYear&&z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,x)),M=(this._getFirstDayOfMonth(U,z)-n+7)%7,x=Math.ceil((M+x)/7),C=E&&this.maxRows>x?this.maxRows:x,this.maxRows=C,I=this._daylightSavingAdjust(new Date(U,z,1-M)),T=0;T<C;T++){for(v+="<tr>",S=s?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(I)+"</td>":"",g=0;g<7;g++)N=l?l.apply(e.input?e.input[0]:null,[I]):[!0,""],Y=(F=I.getMonth()!==z)&&!h||!N[0]||P&&I<P||q&&q<I,S+="<td class='"+(5<=(g+n+6)%7?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(I.getTime()===k.getTime()&&z===e.selectedMonth&&e._keyEvent||p.getTime()===I.getTime()&&p.getTime()===k.getTime()?" "+this._dayOverClass:"")+(Y?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!u?"":" "+N[1]+(I.getTime()===B.getTime()?" "+this._currentClass:"")+(I.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(F&&!u||!N[2]?"":" title='"+N[2].replace(/'/g,"&#39;")+"'")+(Y?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(F&&!u?"&#xa0;":Y?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===j.getTime()?" ui-state-highlight":"")+(I.getTime()===B.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#' aria-current='"+(I.getTime()===B.getTime()?"true":"false")+"' data-date='"+I.getDate()+"'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);v+=S+"</tr>"}11<++z&&(z=0,U++),_+=v+="</tbody></table>"+(E?"</div>"+(0<L[0]&&y===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}f+=_}return f+=K,e._keyEvent=!1,f},_generateMonthYearHeader:function(e,t,i,a,n,s,r,o){var c,d,l,u,h,p,f=this._get(e,"changeMonth"),g=this._get(e,"changeYear"),m=this._get(e,"showMonthAfterYear"),_=this._get(e,"selectMonthLabel"),y=this._get(e,"selectYearLabel"),k="<div class='ui-datepicker-title'>",D="";if(s||!f)D+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(c=a&&a.getFullYear()===i,d=n&&n.getFullYear()===i,D+="<select class='ui-datepicker-month' aria-label='"+_+"' data-handler='selectMonth' data-event='change'>",l=0;l<12;l++)(!c||l>=a.getMonth())&&(!d||l<=n.getMonth())&&(D+="<option value='"+l+"'"+(l===t?" selected='selected'":"")+">"+o[l]+"</option>");D+="</select>"}if(m||(k+=D+(!s&&f&&g?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",s||!g)k+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(r=this._get(e,"yearRange").split(":"),u=(new Date).getFullYear(),h=(_=function(e){e=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?u+parseInt(e,10):parseInt(e,10);return isNaN(e)?u:e})(r[0]),p=Math.max(h,_(r[1]||"")),h=a?Math.max(h,a.getFullYear()):h,p=n?Math.min(p,n.getFullYear()):p,e.yearshtml+="<select class='ui-datepicker-year' aria-label='"+y+"' data-handler='selectYear' data-event='change'>";h<=p;h++)e.yearshtml+="<option value='"+h+"'"+(h===i?" selected='selected'":"")+">"+h+"</option>";e.yearshtml+="</select>",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),m&&(k+=(!s&&f&&g?"":"&#xa0;")+D),k+="</div>"},_adjustInstDate:function(e,t,i){var a=e.selectedYear+("Y"===i?t:0),n=e.selectedMonth+("M"===i?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(a,n))+("D"===i?t:0),t=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,n,t)));e.selectedDay=t.getDate(),e.drawMonth=e.selectedMonth=t.getMonth(),e.drawYear=e.selectedYear=t.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),t=i&&t<i?i:t;return e&&e<t?e:t},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){e=this._get(e,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var n=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(t<0?t:n[0]*n[1]),1));return t<0&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),n=null,s=null,r=this._get(e,"yearRange");return r&&(e=r.split(":"),r=(new Date).getFullYear(),n=parseInt(e[0],10),s=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(n+=r),e[1].match(/[+\-].*/)&&(s+=r)),(!i||t.getTime()>=i.getTime())&&(!a||t.getTime()<=a.getTime())&&(!n||t.getFullYear()>=n)&&(!s||t.getFullYear()<=s)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);t=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),t,this._getFormatConfig(e))}}),J.fn.datepicker=function(e){if(!this.length)return this;J.datepicker.initialized||(J(document).on("mousedown",J.datepicker._checkExternalClick),J.datepicker.initialized=!0),0===J("#"+J.datepicker._mainDivId).length&&J("body").append(J.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?J.datepicker["_"+e+"Datepicker"].apply(J.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?J.datepicker["_"+e+"Datepicker"].apply(J.datepicker,[this].concat(t)):J.datepicker._attachDatepicker(this,e)})},J.datepicker=new e,J.datepicker.initialized=!1,J.datepicker.uuid=(new Date).getTime(),J.datepicker.version="1.13.0";J.datepicker;var d=J,a={},t=a.toString,l=/^([\-+])=\s*(\d+\.?\d*)/,u=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),e[4]?(parseInt(e[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),e[4]?(parseInt(e[4]+e[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],h=d.Color=function(e,t,i,a){return new d.Color.fn.parse(e,t,i,a)},p={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},f={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},g=h.support={},n=d("<p>")[0],m=d.each;function _(e){return null==e?e+"":"object"==typeof e?a[t.call(e)]||"object":typeof e}function y(e,t,i){var a=f[t.type]||{};return null==e?i||!t.def?null:t.def:(e=a.floor?~~e:parseFloat(e),isNaN(e)?t.def:a.mod?(e+a.mod)%a.mod:Math.min(a.max,Math.max(0,e)))}function k(a){var n=h(),s=n._rgba=[];return a=a.toLowerCase(),m(u,function(e,t){var i=t.re.exec(a),i=i&&t.parse(i),t=t.space||"rgba";if(i)return i=n[t](i),n[p[t].cache]=i[p[t].cache],s=n._rgba=i._rgba,!1}),s.length?("0,0,0,0"===s.join()&&d.extend(s,N.transparent),n):N[a]}function s(e,t,i){return 6*(i=(i+1)%1)<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}n.style.cssText="background-color:rgba(1,1,1,.5)",g.rgba=-1<n.style.backgroundColor.indexOf("rgba"),m(p,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),d.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){a["[object "+t+"]"]=t.toLowerCase()}),(h.fn=d.extend(h.prototype,{parse:function(n,e,t,i){if(void 0===n)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=d(n).css(e),e=void 0);var s=this,a=_(n),r=this._rgba=[];return void 0!==e&&(n=[n,e,t,i],a="array"),"string"===a?this.parse(k(n)||N._default):"array"===a?(m(p.rgba.props,function(e,t){r[t.idx]=y(n[t.idx],t)}),this):"object"===a?(m(p,n instanceof h?function(e,t){n[t.cache]&&(s[t.cache]=n[t.cache].slice())}:function(e,i){var a=i.cache;m(i.props,function(e,t){if(!s[a]&&i.to){if("alpha"===e||null==n[e])return;s[a]=i.to(s._rgba)}s[a][t.idx]=y(n[e],t,!0)}),s[a]&&d.inArray(null,s[a].slice(0,3))<0&&(null==s[a][3]&&(s[a][3]=1),i.from&&(s._rgba=i.from(s[a])))}),this):void 0},is:function(e){var n=h(e),s=!0,r=this;return m(p,function(e,t){var i,a=n[t.cache];return a&&(i=r[t.cache]||t.to&&t.to(r._rgba)||[],m(t.props,function(e,t){if(null!=a[t.idx])return s=a[t.idx]===i[t.idx]})),s}),s},_space:function(){var i=[],a=this;return m(p,function(e,t){a[t.cache]&&i.push(e)}),i.pop()},transition:function(e,r){var t=(d=h(e))._space(),i=p[t],e=0===this.alpha()?h("transparent"):this,o=e[i.cache]||i.to(e._rgba),c=o.slice(),d=d[i.cache];return m(i.props,function(e,t){var i=t.idx,a=o[i],n=d[i],s=f[t.type]||{};null!==n&&(null===a?c[i]=n:(s.mod&&(n-a>s.mod/2?a+=s.mod:a-n>s.mod/2&&(a-=s.mod)),c[i]=y((n-a)*r+a,t)))}),this[t](c)},blend:function(e){if(1===this._rgba[3])return this;var t=this._rgba.slice(),i=t.pop(),a=h(e)._rgba;return h(d.map(t,function(e,t){return(1-i)*a[t]+i*e}))},toRgbaString:function(){var e="rgba(",t=d.map(this._rgba,function(e,t){return null!=e?e:2<t?1:0});return 1===t[3]&&(t.pop(),e="rgb("),e+t.join()+")"},toHslaString:function(){var e="hsla(",t=d.map(this.hsla(),function(e,t){return null==e&&(e=2<t?1:0),e=t&&t<3?Math.round(100*e)+"%":e});return 1===t[3]&&(t.pop(),e="hsl("),e+t.join()+")"},toHexString:function(e){var t=this._rgba.slice(),i=t.pop();return e&&t.push(~~(255*i)),"#"+d.map(t,function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=h.fn,p.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/255,i=e[1]/255,a=e[2]/255,n=e[3],s=Math.max(t,i,a),r=Math.min(t,i,a),o=s-r,c=s+r,e=.5*c,i=r===s?0:t===s?60*(i-a)/o+360:i===s?60*(a-t)/o+120:60*(t-i)/o+240,c=0==o?0:e<=.5?o/c:o/(2-c);return[Math.round(i)%360,c,e,null==n?1:n]},p.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],a=e[2],e=e[3],i=a<=.5?a*(1+i):a+i-a*i,a=2*a-i;return[Math.round(255*s(a,i,t+1/3)),Math.round(255*s(a,i,t)),Math.round(255*s(a,i,t-1/3)),e]},m(p,function(c,e){var t=e.props,s=e.cache,r=e.to,o=e.from;h.fn[c]=function(e){if(r&&!this[s]&&(this[s]=r(this._rgba)),void 0===e)return this[s].slice();var i=_(e),a="array"===i||"object"===i?e:arguments,n=this[s].slice();return m(t,function(e,t){e=a["object"===i?e:t.idx];null==e&&(e=n[t.idx]),n[t.idx]=y(e,t)}),o?((e=h(o(n)))[s]=n,e):h(n)},m(t,function(r,o){h.fn[r]||(h.fn[r]=function(e){var t,i=_(e),a="alpha"===r?this._hsla?"hsla":"rgba":c,n=this[a](),s=n[o.idx];return"undefined"===i?s:("function"===i&&(i=_(e=e.call(this,s))),null==e&&o.empty?this:("string"===i&&(t=l.exec(e))&&(e=s+parseFloat(t[2])*("+"===t[1]?1:-1)),n[o.idx]=e,this[a](n)))})})}),(h.hook=function(e){e=e.split(" ");m(e,function(e,s){d.cssHooks[s]={set:function(e,t){var i,a,n="";if("transparent"!==t&&("string"!==_(t)||(i=k(t)))){if(t=h(i||t),!g.rgba&&1!==t._rgba[3]){for(a="backgroundColor"===s?e.parentNode:e;(""===n||"transparent"===n)&&a&&a.style;)try{n=d.css(a,"backgroundColor"),a=a.parentNode}catch(e){}t=t.blend(n&&"transparent"!==n?n:"_default")}t=t.toRgbaString()}try{e.style[s]=t}catch(e){}}},d.fx.step[s]=function(e){e.colorInit||(e.start=h(e.elem,s),e.end=h(e.end),e.colorInit=!0),d.cssHooks[s].set(e.elem,e.start.transition(e.end,e.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var a={};return m(["Top","Right","Bottom","Left"],function(e,t){a["border"+t+"Color"]=i}),a}};var D,v,b,w,M,x,C,I,T,S,N=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},F="ui-effects-",Y="ui-effects-style",A="ui-effects-animated";function j(e){var t,i,a=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,n={};if(a&&a.length&&a[0]&&a[a[0]])for(i=a.length;i--;)"string"==typeof a[t=a[i]]&&(n[t.replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})]=a[t]);else for(t in a)"string"==typeof a[t]&&(n[t]=a[t]);return n}function H(e,t,i,a){return e={effect:e=J.isPlainObject(e)?(t=e).effect:e},"function"==typeof(t=null==t?{}:t)&&(a=t,i=null,t={}),"number"!=typeof t&&!J.fx.speeds[t]||(a=i,i=t,t={}),"function"==typeof i&&(a=i,i=null),t&&J.extend(e,t),i=i||t.duration,e.duration=J.fx.off?0:"number"==typeof i?i:i in J.fx.speeds?J.fx.speeds[i]:J.fx.speeds._default,e.complete=a||t.complete,e}function W(e){return!e||"number"==typeof e||J.fx.speeds[e]||("string"==typeof e&&!J.effects.effect[e]||("function"==typeof e||"object"==typeof e&&!e.effect))}function O(e,t){var i=t.outerWidth(),t=t.outerHeight(),e=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,i,t,0];return{top:parseFloat(e[1])||0,right:"auto"===e[2]?i:parseFloat(e[2]),bottom:"auto"===e[3]?t:parseFloat(e[3]),left:parseFloat(e[4])||0}}J.effects={effect:{}},w=["add","remove","toggle"],M={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},J.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,t){J.fx.step[t]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(d.style(e.elem,t,e.end),e.setAttr=!0)}}),J.fn.addBack||(J.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),J.effects.animateClass=function(n,e,t,i){var s=J.speed(e,t,i);return this.queue(function(){var i=J(this),e=i.attr("class")||"",t=(t=s.children?i.find("*").addBack():i).map(function(){return{el:J(this),start:j(this)}}),a=function(){J.each(w,function(e,t){n[t]&&i[t+"Class"](n[t])})};a(),t=t.map(function(){return this.end=j(this.el[0]),this.diff=function(e,t){var i,a,n={};for(i in t)a=t[i],e[i]!==a&&(M[i]||!J.fx.step[i]&&isNaN(parseFloat(a))||(n[i]=a));return n}(this.start,this.end),this}),i.attr("class",e),t=t.map(function(){var e=this,t=J.Deferred(),i=J.extend({},s,{queue:!1,complete:function(){t.resolve(e)}});return this.el.animate(this.diff,i),t.promise()}),J.when.apply(J,t.get()).done(function(){a(),J.each(arguments,function(){var t=this.el;J.each(this.diff,function(e){t.css(e,"")})}),s.complete.call(i[0])})})},J.fn.extend({addClass:(b=J.fn.addClass,function(e,t,i,a){return t?J.effects.animateClass.call(this,{add:e},t,i,a):b.apply(this,arguments)}),removeClass:(v=J.fn.removeClass,function(e,t,i,a){return 1<arguments.length?J.effects.animateClass.call(this,{remove:e},t,i,a):v.apply(this,arguments)}),toggleClass:(D=J.fn.toggleClass,function(e,t,i,a,n){return"boolean"==typeof t||void 0===t?i?J.effects.animateClass.call(this,t?{add:e}:{remove:e},i,a,n):D.apply(this,arguments):J.effects.animateClass.call(this,{toggle:e},t,i,a)}),switchClass:function(e,t,i,a,n){return J.effects.animateClass.call(this,{add:t,remove:e},i,a,n)}}),J.expr&&J.expr.pseudos&&J.expr.pseudos.animated&&(J.expr.pseudos.animated=(x=J.expr.pseudos.animated,function(e){return!!J(e).data(A)||x(e)})),!1!==J.uiBackCompat&&J.extend(J.effects,{save:function(e,t){for(var i=0,a=t.length;i<a;i++)null!==t[i]&&e.data(F+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,a=0,n=t.length;a<n;a++)null!==t[a]&&(i=e.data(F+t[a]),e.css(t[a],i))},setMode:function(e,t){return t="toggle"===t?e.is(":hidden")?"show":"hide":t},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var a={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},e=J("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),t={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(e){n=document.body}return i.wrap(e),i[0]!==n&&!J.contains(i[0],n)||J(n).trigger("focus"),e=i.parent(),"static"===i.css("position")?(e.css({position:"relative"}),i.css({position:"relative"})):(J.extend(a,{position:i.css("position"),zIndex:i.css("z-index")}),J.each(["top","left","bottom","right"],function(e,t){a[t]=i.css(t),isNaN(parseInt(a[t],10))&&(a[t]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(t),e.css(a).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),e[0]!==t&&!J.contains(e[0],t)||J(t).trigger("focus")),e}}),J.extend(J.effects,{version:"1.13.0",define:function(e,t,i){return i||(i=t,t="effect"),J.effects.effect[e]=i,J.effects.effect[e].mode=t,i},scaledDimensions:function(e,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var a="horizontal"!==i?(t||100)/100:1,t="vertical"!==i?(t||100)/100:1;return{height:e.height()*t,width:e.width()*a,outerHeight:e.outerHeight()*t,outerWidth:e.outerWidth()*a}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,i){var a=e.queue();1<t&&a.splice.apply(a,[1,0].concat(a.splice(t,i))),e.dequeue()},saveStyle:function(e){e.data(Y,e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data(Y)||"",e.removeData(Y)},mode:function(e,t){e=e.is(":hidden");return"toggle"===t&&(t=e?"show":"hide"),t=(e?"hide"===t:"show"===t)?"none":t},getBaseline:function(e,t){var i,a;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":a=0;break;case"center":a=.5;break;case"right":a=1;break;default:a=e[1]/t.width}return{x:a,y:i}},createPlaceholder:function(e){var t,i=e.css("position"),a=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",t=J("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(F+"placeholder",t)),e.css({position:i,left:a.left,top:a.top}),t},removePlaceholder:function(e){var t=F+"placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},cleanUp:function(e){J.effects.restoreStyle(e),J.effects.removePlaceholder(e)},setTransition:function(a,e,n,s){return s=s||{},J.each(e,function(e,t){var i=a.cssUnit(t);0<i[0]&&(s[t]=i[0]*n+i[1])}),s}}),J.fn.extend({effect:function(){function e(e){var t=J(this),i=J.effects.mode(t,o)||s;t.data(A,!0),c.push(i),s&&("show"===i||i===s&&"hide"===i)&&t.show(),s&&"none"===i||J.effects.saveStyle(t),"function"==typeof e&&e()}var a=H.apply(this,arguments),n=J.effects.effect[a.effect],s=n.mode,t=a.queue,i=t||"fx",r=a.complete,o=a.mode,c=[];return J.fx.off||!n?o?this[o](a.duration,r):this.each(function(){r&&r.call(this)}):!1===t?this.each(e).each(d):this.queue(i,e).queue(i,d);function d(e){var t=J(this);function i(){"function"==typeof r&&r.call(t[0]),"function"==typeof e&&e()}a.mode=c.shift(),!1===J.uiBackCompat||s?"none"===a.mode?(t[o](),i()):n.call(t[0],a,function(){t.removeData(A),J.effects.cleanUp(t),"hide"===a.mode&&t.hide(),i()}):(t.is(":hidden")?"hide"===o:"show"===o)?(t[o](),i()):n.call(t[0],a,i)}},show:(T=J.fn.show,function(e){if(W(e))return T.apply(this,arguments);e=H.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(I=J.fn.hide,function(e){if(W(e))return I.apply(this,arguments);e=H.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(C=J.fn.toggle,function(e){if(W(e)||"boolean"==typeof e)return C.apply(this,arguments);e=H.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(e){var i=this.css(e),a=[];return J.each(["em","px","%","pt"],function(e,t){0<i.indexOf(t)&&(a=[parseFloat(i),t])}),a},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):O(this.css("clip"),this)},transfer:function(e,t){var i=J(this),a=J(e.to),n="fixed"===a.css("position"),s=J("body"),r=n?s.scrollTop():0,o=n?s.scrollLeft():0,s=a.offset(),s={top:s.top-r,left:s.left-o,height:a.innerHeight(),width:a.innerWidth()},a=i.offset(),c=J("<div class='ui-effects-transfer'></div>");c.appendTo("body").addClass(e.className).css({top:a.top-r,left:a.left-o,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(s,e.duration,e.easing,function(){c.remove(),"function"==typeof t&&t()})}}),J.fx.step.clip=function(e){e.clipInit||(e.start=J(e.elem).cssClip(),"string"==typeof e.end&&(e.end=O(e.end,e.elem)),e.clipInit=!0),J(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})},S={},J.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){S[e]=function(e){return Math.pow(e,t+2)}}),J.extend(S,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),J.each(S,function(e,t){J.easing["easeIn"+e]=t,J.easing["easeOut"+e]=function(e){return 1-t(1-e)},J.easing["easeInOut"+e]=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}});n=J.effects,J.effects.define("blind","hide",function(e,t){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},a=J(this),n=e.direction||"up",s=a.cssClip(),r={clip:J.extend({},s)},o=J.effects.createPlaceholder(a);r.clip[i[n][0]]=r.clip[i[n][1]],"show"===e.mode&&(a.cssClip(r.clip),o&&o.css(J.effects.clipToBox(r)),r.clip=s),o&&o.animate(J.effects.clipToBox(r),e.duration,e.easing),a.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),J.effects.define("bounce",function(e,t){var i,a,n=J(this),s=e.mode,r="hide"===s,o="show"===s,c=e.direction||"up",d=e.distance,l=e.times||5,s=2*l+(o||r?1:0),u=e.duration/s,h=e.easing,p="up"===c||"down"===c?"top":"left",f="up"===c||"left"===c,g=0,e=n.queue().length;for(J.effects.createPlaceholder(n),c=n.css(p),d=d||n["top"==p?"outerHeight":"outerWidth"]()/3,o&&((a={opacity:1})[p]=c,n.css("opacity",0).css(p,f?2*-d:2*d).animate(a,u,h)),r&&(d/=Math.pow(2,l-1)),(a={})[p]=c;g<l;g++)(i={})[p]=(f?"-=":"+=")+d,n.animate(i,u,h).animate(a,u,h),d=r?2*d:d/2;r&&((i={opacity:0})[p]=(f?"-=":"+=")+d,n.animate(i,u,h)),n.queue(t),J.effects.unshift(n,e,1+s)}),J.effects.define("clip","hide",function(e,t){var i={},a=J(this),n=e.direction||"vertical",s="both"===n,r=s||"horizontal"===n,s=s||"vertical"===n,n=a.cssClip();i.clip={top:s?(n.bottom-n.top)/2:n.top,right:r?(n.right-n.left)/2:n.right,bottom:s?(n.bottom-n.top)/2:n.bottom,left:r?(n.right-n.left)/2:n.left},J.effects.createPlaceholder(a),"show"===e.mode&&(a.cssClip(i.clip),i.clip=n),a.animate(i,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),J.effects.define("drop","hide",function(e,t){var i=J(this),a="show"===e.mode,n=e.direction||"left",s="up"===n||"down"===n?"top":"left",r="up"===n||"left"===n?"-=":"+=",o="+="==r?"-=":"+=",c={opacity:0};J.effects.createPlaceholder(i),n=e.distance||i["top"==s?"outerHeight":"outerWidth"](!0)/2,c[s]=r+n,a&&(i.css(c),c[s]=o+n,c.opacity=1),i.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),J.effects.define("explode","hide",function(e,t){var i,a,n,s,r,o,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=c,l=J(this),u="show"===e.mode,h=l.show().css("visibility","hidden").offset(),p=Math.ceil(l.outerWidth()/d),f=Math.ceil(l.outerHeight()/c),g=[];function m(){g.push(this),g.length===c*d&&(l.css({visibility:"visible"}),J(g).remove(),t())}for(i=0;i<c;i++)for(s=h.top+i*f,o=i-(c-1)/2,a=0;a<d;a++)n=h.left+a*p,r=a-(d-1)/2,l.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?r*p:0),top:s+(u?o*f:0),opacity:u?0:1}).animate({left:n+(u?0:r*p),top:s+(u?0:o*f),opacity:u?1:0},e.duration||500,e.easing,m)}),J.effects.define("fade","toggle",function(e,t){var i="show"===e.mode;J(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),J.effects.define("fold","hide",function(t,e){var i=J(this),a=t.mode,n="show"===a,s="hide"===a,r=t.size||15,o=/([0-9]+)%/.exec(r),c=!!t.horizFirst?["right","bottom"]:["bottom","right"],d=t.duration/2,l=J.effects.createPlaceholder(i),u=i.cssClip(),h={clip:J.extend({},u)},p={clip:J.extend({},u)},f=[u[c[0]],u[c[1]]],a=i.queue().length;o&&(r=parseInt(o[1],10)/100*f[s?0:1]),h.clip[c[0]]=r,p.clip[c[0]]=r,p.clip[c[1]]=0,n&&(i.cssClip(p.clip),l&&l.css(J.effects.clipToBox(p)),p.clip=u),i.queue(function(e){l&&l.animate(J.effects.clipToBox(h),d,t.easing).animate(J.effects.clipToBox(p),d,t.easing),e()}).animate(h,d,t.easing).animate(p,d,t.easing).queue(e),J.effects.unshift(i,a,4)}),J.effects.define("highlight","show",function(e,t){var i=J(this),a={backgroundColor:i.css("backgroundColor")};"hide"===e.mode&&(a.opacity=0),J.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),J.effects.define("size",function(a,t){var n,i=J(this),e=["fontSize"],s=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],r=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],o=a.mode,c="effect"!==o,d=a.scale||"both",l=a.origin||["middle","center"],u=i.css("position"),h=i.position(),p=J.effects.scaledDimensions(i),f=a.from||p,g=a.to||J.effects.scaledDimensions(i,0);J.effects.createPlaceholder(i),"show"===o&&(o=f,f=g,g=o),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==d&&"both"!==d||(n.from.y!==n.to.y&&(f=J.effects.setTransition(i,s,n.from.y,f),g=J.effects.setTransition(i,s,n.to.y,g)),n.from.x!==n.to.x&&(f=J.effects.setTransition(i,r,n.from.x,f),g=J.effects.setTransition(i,r,n.to.x,g))),"content"!==d&&"both"!==d||n.from.y!==n.to.y&&(f=J.effects.setTransition(i,e,n.from.y,f),g=J.effects.setTransition(i,e,n.to.y,g)),l&&(l=J.effects.getBaseline(l,p),f.top=(p.outerHeight-f.outerHeight)*l.y+h.top,f.left=(p.outerWidth-f.outerWidth)*l.x+h.left,g.top=(p.outerHeight-g.outerHeight)*l.y+h.top,g.left=(p.outerWidth-g.outerWidth)*l.x+h.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==d&&"both"!==d||(s=s.concat(["marginTop","marginBottom"]).concat(e),r=r.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var e=J(this),t=J.effects.scaledDimensions(e),i={height:t.height*n.from.y,width:t.width*n.from.x,outerHeight:t.outerHeight*n.from.y,outerWidth:t.outerWidth*n.from.x},t={height:t.height*n.to.y,width:t.width*n.to.x,outerHeight:t.height*n.to.y,outerWidth:t.width*n.to.x};n.from.y!==n.to.y&&(i=J.effects.setTransition(e,s,n.from.y,i),t=J.effects.setTransition(e,s,n.to.y,t)),n.from.x!==n.to.x&&(i=J.effects.setTransition(e,r,n.from.x,i),t=J.effects.setTransition(e,r,n.to.x,t)),c&&J.effects.saveStyle(e),e.css(i),e.animate(t,a.duration,a.easing,function(){c&&J.effects.restoreStyle(e)})})),i.animate(g,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){var e=i.offset();0===g.opacity&&i.css("opacity",f.opacity),c||(i.css("position","static"===u?"relative":u).offset(e),J.effects.saveStyle(i)),t()}})}),J.effects.define("scale",function(e,t){var i=J(this),a=e.mode,a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)||"effect"!==a?0:100),a=J.extend(!0,{from:J.effects.scaledDimensions(i),to:J.effects.scaledDimensions(i,a,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),J.effects.effect.size.call(this,a,t)}),J.effects.define("puff","hide",function(e,t){e=J.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});J.effects.effect.scale.call(this,e,t)}),J.effects.define("pulsate","show",function(e,t){var i=J(this),a=e.mode,n="show"===a,s=2*(e.times||5)+(n||"hide"===a?1:0),r=e.duration/s,o=0,c=1,a=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),o=1);c<s;c++)i.animate({opacity:o},r,e.easing),o=1-o;i.animate({opacity:o},r,e.easing),i.queue(t),J.effects.unshift(i,a,1+s)}),J.effects.define("shake",function(e,t){var i=1,a=J(this),n=e.direction||"left",s=e.distance||20,r=e.times||3,o=2*r+1,c=Math.round(e.duration/o),d="up"===n||"down"===n?"top":"left",l="up"===n||"left"===n,u={},h={},p={},n=a.queue().length;for(J.effects.createPlaceholder(a),u[d]=(l?"-=":"+=")+s,h[d]=(l?"+=":"-=")+2*s,p[d]=(l?"-=":"+=")+2*s,a.animate(u,c,e.easing);i<r;i++)a.animate(h,c,e.easing).animate(p,c,e.easing);a.animate(h,c,e.easing).animate(u,c/2,e.easing).queue(t),J.effects.unshift(a,n,1+o)}),J.effects.define("slide","show",function(e,t){var i,a,n=J(this),s={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,o=e.direction||"left",c="up"===o||"down"===o?"top":"left",d="up"===o||"left"===o,l=e.distance||n["top"==c?"outerHeight":"outerWidth"](!0),u={};J.effects.createPlaceholder(n),i=n.cssClip(),a=n.position()[c],u[c]=(d?-1:1)*l+a,u.clip=n.cssClip(),u.clip[s[o][1]]=u.clip[s[o][0]],"show"===r&&(n.cssClip(u.clip),n.css(c,u[c]),u.clip=i,u[c]=a),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),!1!==J.uiBackCompat&&J.effects.define("transfer",function(e,t){J(this).transfer(e,t)})});