text: /*!
   * OpenUI5
   * (c) Copyright 2009-2019 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(['sap/ui/unified/calendar/CalendarUtils','sap/ui/unified/calendar/CalendarDate','./library','sap/ui/unified/CalendarDateInterval','sap/ui/unified/CalendarDateIntervalRenderer','sap/ui/unified/calendar/OneMonthDatesRow','sap/ui/core/Renderer','sap/ui/unified/Calendar','sap/ui/unified/CalendarRenderer',"./CalendarOneMonthIntervalRenderer","sap/ui/dom/containsOrEquals"],function(C,a,l,b,c,O,R,d,e,f,g){"use strict";var h=b.extend("sap.ui.unified.CalendarOneMonthInterval",{});h.prototype.init=function(){b.prototype.init.apply(this,arguments);this._bShowOneMonth=true;};h.prototype._getCalendarPicker=function(){var o=this.getAggregation("calendarPicker");if(!o){o=new i(this.getId()+"--Cal");o.setPopupMode(true);o.attachEvent("select",function(){var o=this._getCalendarPicker(),j=o._getFocusedDate(),n=C._getFirstDateOfMonth(j);this._setStartDate(n);this._adjustSelectedDate(n,false);this._oFocusDateOneMonth=n;this._closeCalendarPicker(true);this._focusDate(j,false,true);},this);o.attachEvent("cancel",function(E){var o=this._getCalendarPicker(),j=o._getFocusedDate();this._closeCalendarPicker(true);this._oFocusDateOneMonth=j;this._focusDate(j,true);var D=this.getAggregation("header").getDomRef("B1");if(D){D.focus();}},this);this.setAggregation("calendarPicker",o);}return o;};h.prototype._createMonth=function(I){return new O(I);};h.prototype._handleFocus=function(E){var o=!!E.getParameter("_outsideBorder"),D=E.getParameter("date"),j=a.fromLocalJSDate(D),k=a.fromLocalJSDate(this.getStartDate()),I=!C._isSameMonthAndYear(j,k),m,F,s;if(o||I){if(C._isLastDateInMonth(j)){this._oFocusDateOneMonth=j;}else{this._oFocusDateOneMonth=C._getFirstDateOfMonth(j);}m=j.isBefore(k)?-1:1;F=new a(this._getFocusedDate(),this.getPrimaryCalendarType());s=new a(this._getStartDate(),this.getPrimaryCalendarType());b.prototype._shiftStartFocusDates.call(this,F,s,m);}return b.prototype._handleFocus.apply(this,arguments);};h.prototype._focusDateExtend=function(D,o,n){var j,L;if(!this._oFocusDateOneMonth){return b.prototype._focusDateExtend.apply(this,arguments);}j=this.getAggregation("month")[0];L=this._oFocusDateOneMonth.toLocalJSDate();this._setFocusedDate(this._oFocusDateOneMonth);j._bNoRangeCheck=true;j.setDate(L);j._bNoRangeCheck=false;this._oFocusDateOneMonth=null;return!n;};h.prototype._setDisplayMode=function(m){this.getAggregation("month")[0].setMode(m);};h.prototype._shiftStartFocusDates=function(s,F,D){var S=D,o=this.getAggregation("month")[0];if(S!==0){S=S>0?1:-1;}s.setMonth(s.getMonth()+S);F.setYear(s.getYear());F.setMonth(s.getMonth(),s.getDate());this._setFocusedDate(F);this._setStartDate(s,true);o.selectDate(s.toLocalJSDate());};h.prototype._adjustSelectedDate=function(D,u){var m=this.getAggregation("month")[0],s;s=u?C._getFirstDateOfMonth(D):D;if(m.getMode&&m.getMode()<2){this._selectDate(s);}};h.prototype._selectDate=function(D){var m=this.getAggregation("month")[0],L=D.toLocalJSDate();this.removeAllSelectedDates();this.addSelectedDate(new sap.ui.unified.DateRange({startDate:L}));m.selectDate(L);this._bDateRangeChanged=undefined;};h.prototype._dateMatchesVisibleRange=function(D){return C._isSameMonthAndYear(a.fromLocalJSDate(this.getStartDate()),a.fromLocalJSDate(D));};var i=d.extend("CustomMonthPicker",{renderer:R.extend(e)});i.prototype._initializeHeader=function(){var H=new sap.ui.unified.calendar.Header(this.getId()+"--Head",{visibleButton1:false});H.attachEvent("pressPrevious",this._handlePrevious,this);H.attachEvent("pressNext",this._handleNext,this);H.attachEvent("pressButton2",this._handleButton2,this);this.setAggregation("header",H);};i.prototype._shouldFocusB2OnTabNext=function(E){return g(this.getDomRef("content"),E.target);};i.prototype.onAfterRendering=function(){this._showMonthPicker();};i.prototype._selectYear=function(){var y=this.getAggregation("yearPicker");var F=this._getFocusedDate();F.setYear(y.getYear());this._focusDate(F,true);this._showMonthPicker();};i.prototype._selectMonth=function(){var m=this.getAggregation("monthPicker");var s=this.getSelectedDates()[0];var F=this._getFocusedDate();F.setMonth(m.getMonth());if(!s){s=new sap.ui.unified.DateRange();}s.setStartDate(F.toLocalJSDate());this.addSelectedDate(s);this.fireSelect();};i.prototype.onsapescape=function(E){this.fireCancel();};return h;});
  