YUI.add("calendarnavigator",function(s,t){var o="host",e=s.ClassNameManager.getClassName,n=s.Lang.sub,a=s.Node.create,i="calendarnav",r=e("calendar","header"),h=e(i,"prevmonth"),l=e(i,"nextmonth"),_=e(i,"month-disabled"),c=s.DataType.Date;function d(){d.superclass.constructor.apply(this,arguments)}d.NS="navigator",d.NAME="pluginCalendarNavigator",d.ATTRS={shiftByMonths:{value:1},strings:{valueFn:function(){return s.Intl.get("calendarnavigator")}}},d.CALENDARNAV_STRINGS={prev_month_class:h,next_month_class:l},d.PREV_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {prev_month_class}" role="button" aria-label="{prev_month_arialabel}" tabindex="{control_tabindex}" />',d.NEXT_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {next_month_class}" role="button" aria-label="{next_month_arialabel}" tabindex="{control_tabindex}" />',s.extend(d,s.Plugin.Base,{_eventAttachments:{},_controls:{},initializer:function(){this._controls={},this._eventAttachments={},this.afterHostMethod("renderUI",this._initNavigationControls)},destructor:function(){},_focusNavigation:function(t){t.currentTarget.focus()},_subtractMonths:function(t){var e,n;"click"!==t.type&&("keydown"!==t.type||13!==t.keyCode&&32!==t.keyCode)||(n=(e=this.get(o)).get("date"),e.set("date",c.addMonths(n,-1*this.get("shiftByMonths"))),t.preventDefault())},_addMonths:function(t){var e,n;"click"!==t.type&&("keydown"!==t.type||13!==t.keyCode&&32!==t.keyCode)||(n=(e=this.get(o)).get("date"),e.set("date",c.addMonths(n,this.get("shiftByMonths"))),t.preventDefault())},_updateControlState:function(){var t=this.get(o),e=t.get("date"),n=c.addMonths(e,t._paneNumber-1),a=t._normalizeDate(t.get("minimumDate")),t=t._normalizeDate(t.get("maximumDate"));c.areEqual(a,e)?(this._eventAttachments.prevMonth&&(this._eventAttachments.prevMonth.detach(),this._eventAttachments.prevMonth=!1),this._controls.prevMonth.hasClass(_)||this._controls.prevMonth.addClass(_).setAttribute("aria-disabled","true")):(this._eventAttachments.prevMonth||(this._eventAttachments.prevMonth=this._controls.prevMonth.on(["click","keydown"],this._subtractMonths,this)),this._controls.prevMonth.hasClass(_)&&this._controls.prevMonth.removeClass(_).setAttribute("aria-disabled","false")),c.areEqual(t,n)?(this._eventAttachments.nextMonth&&(this._eventAttachments.nextMonth.detach(),this._eventAttachments.nextMonth=!1),this._controls.nextMonth.hasClass(_)||this._controls.nextMonth.addClass(_).setAttribute("aria-disabled","true")):(this._eventAttachments.nextMonth||(this._eventAttachments.nextMonth=this._controls.nextMonth.on(["click","keydown"],this._addMonths,this)),this._controls.nextMonth.hasClass(_)&&this._controls.nextMonth.removeClass(_).setAttribute("aria-disabled","false")),this._controls.prevMonth.on(["click","keydown"],this._focusNavigation,this),this._controls.nextMonth.on(["click","keydown"],this._focusNavigation,this)},_renderPrevControls:function(){var t=a(n(d.PREV_MONTH_CONTROL_TEMPLATE,d.CALENDARNAV_STRINGS));return t.on("selectstart",this.get(o)._preventSelectionStart),t},_renderNextControls:function(){var t=a(n(d.NEXT_MONTH_CONTROL_TEMPLATE,d.CALENDARNAV_STRINGS));return t.on("selectstart",this.get(o)._preventSelectionStart),t},_initNavigationControls:function(){var t=this.get(o),e=t.get("contentBox").one("."+r),n="Go to next month",a="Go to previous month";s.Intl.getLang("calendarnavigator")&&(a=this.get("strings.go_to_previous_month"),n=this.get("strings.go_to_next_month")),d.CALENDARNAV_STRINGS.control_tabindex=t.get("tabIndex"),d.CALENDARNAV_STRINGS.prev_month_arialabel=a,d.CALENDARNAV_STRINGS.next_month_arialabel=n,this._controls.prevMonth=this._renderPrevControls(),this._controls.nextMonth=this._renderNextControls(),this._updateControlState(),t.after(["dateChange","minimumDateChange","maximumDateChange"],this._updateControlState,this),e.prepend(this._controls.prevMonth),e.append(this._controls.nextMonth)}}),s.namespace("Plugin").CalendarNavigator=d},"patched-v3.18.3",{lang:["en","es","es-AR","eu-ES"],requires:["plugin","classnamemanager","datatype-date","node"],skinnable:!0});