//>>built
require({cache:{"url:dojox/calendar/templates/ColumnView.html":'\x3cdiv data-dojo-attach-events\x3d"keydown:_onKeyDown"\x3e\n\t\n\t\x3cdiv data-dojo-attach-point\x3d"header" class\x3d"dojoxCalendarHeader"\x3e\n\t\t\x3cdiv class\x3d"dojoxCalendarYearColumnHeader" data-dojo-attach-point\x3d"yearColumnHeader"\x3e\n\t\t\t\x3ctable cellspacing\x3d"0" cellpadding\x3d"0"\x3e\x3ctr\x3e\x3ctd\x3e\x3cspan data-dojo-attach-point\x3d"yearColumnHeaderContent"\x3e\x3c/span\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\t\t\n\t\t\x3c/div\x3e\n\t\t\x3cdiv data-dojo-attach-point\x3d"columnHeader" class\x3d"dojoxCalendarColumnHeader"\x3e\n\t\t\t\x3ctable data-dojo-attach-point\x3d"columnHeaderTable" class\x3d"dojoxCalendarColumnHeaderTable" cellpadding\x3d"0" cellspacing\x3d"0"\x3e\x3c/table\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\n\t\x3cdiv data-dojo-attach-point\x3d"secondarySheetNode"\x3e\x3c/div\x3e\n\t\n\t\x3cdiv data-dojo-attach-point\x3d"subHeader" class\x3d"dojoxCalendarSubHeader"\x3e\n\t\t\x3cdiv class\x3d"dojoxCalendarSubRowHeader"\x3e\n\t\t\t\x3ctable cellspacing\x3d"0" cellpadding\x3d"0"\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\t\t\n\t\t\x3c/div\x3e\n\t\t\x3cdiv data-dojo-attach-point\x3d"subColumnHeader" class\x3d"dojoxCalendarSubColumnHeader"\x3e\n\t\t\t\x3ctable data-dojo-attach-point\x3d"subColumnHeaderTable" class\x3d"dojoxCalendarSubColumnHeaderTable" cellpadding\x3d"0" cellspacing\x3d"0"\x3e\x3c/table\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\n\t\x3cdiv data-dojo-attach-point\x3d"scrollContainer" class\x3d"dojoxCalendarScrollContainer"\x3e\n\t\t\x3cdiv data-dojo-attach-point\x3d"sheetContainer" style\x3d"position:relative;left:0;right:0;margin:0;padding:0"\x3e\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"rowHeader" class\x3d"dojoxCalendarRowHeader"\x3e\n\t\t\t\t\x3ctable data-dojo-attach-point\x3d"rowHeaderTable" class\x3d"dojoxCalendarRowHeaderTable" cellpadding\x3d"0" cellspacing\x3d"0"\x3e\x3c/table\x3e\n\t\t\t\x3c/div\x3e\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"grid" class\x3d"dojoxCalendarGrid"\x3e\n\t\t\t\t\x3ctable data-dojo-attach-point\x3d"gridTable" class\x3d"dojoxCalendarGridTable" cellpadding\x3d"0" cellspacing\x3d"0" style\x3d"width:100%"\x3e\x3c/table\x3e\n\t\t\t\x3c/div\x3e\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"itemContainer" class\x3d"dojoxCalendarContainer" data-dojo-attach-event\x3d"mousedown:_onGridMouseDown,mouseup:_onGridMouseUp,ondblclick:_onGridDoubleClick,touchstart:_onGridTouchStart,touchmove:_onGridTouchMove,touchend:_onGridTouchEnd"\x3e\n\t\t\t\t\x3ctable data-dojo-attach-point\x3d"itemContainerTable" class\x3d"dojoxCalendarContainerTable" cellpadding\x3d"0" cellspacing\x3d"0" style\x3d"width:100%"\x3e\x3c/table\x3e\n\t\t\t\x3c/div\x3e\n\t\t\x3c/div\x3e \n\t\x3c/div\x3e\n\t\n\t\x3cdiv data-dojo-attach-point\x3d"vScrollBar" class\x3d"dojoxCalendarVScrollBar"\x3e\n\t\t\x3cdiv data-dojo-attach-point\x3d"vScrollBarContent" style\x3d"visibility:hidden;position:relative;width:1px;height:1px;" \x3e\x3c/div\x3e\n\t\x3c/div\x3e\n\t\n\t\x3cdiv data-dojo-attach-point\x3d"hScrollBar" class\x3d"dojoxCalendarHScrollBar"\x3e\n\t\t\x3cdiv data-dojo-attach-point\x3d"hScrollBarContent" style\x3d"visibility:hidden;position:relative;width:1px;height:1px;" \x3e\x3c/div\x3e\n\t\x3c/div\x3e\n\t\n\x3c/div\x3e\n'}});
define("dojox/calendar/SimpleColumnView","./ViewBase dijit/_TemplatedMixin ./_ScrollBarBase dojo/text!./templates/ColumnView.html dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/_base/array dojo/_base/sniff dojo/_base/fx dojo/_base/html dojo/on dojo/dom dojo/dom-class dojo/dom-style dojo/dom-geometry dojo/dom-construct dojo/mouse dojo/query dojox/html/metrics".split(" "),function(H,I,F,J,K,A,y,D,E,L,G,B,P,p,q,C,r,M,u,N){return K("dojox.calendar.SimpleColumnView",[H,I],{baseClass:"dojoxCalendarColumnView",
templateString:J,viewKind:"columns",_setTabIndexAttr:"domNode",renderData:null,startDate:null,columnCount:7,subColumns:null,minHours:8,maxHours:18,hourSize:100,timeSlotDuration:15,rowHeaderGridSlotDuration:60,rowHeaderLabelSlotDuration:60,rowHeaderLabelOffset:2,rowHeaderFirstLabelOffset:2,verticalRenderer:null,verticalDecorationRenderer:null,minColumnWidth:-1,percentOverlap:70,horizontalGap:4,_showSecondarySheet:!1,_columnHeaderHandlers:null,constructor:function(){this.invalidatingProperties="columnCount startDate minHours maxHours hourSize verticalRenderer verticalDecorationRenderer rowHeaderTimePattern columnHeaderDatePattern timeSlotDuration rowHeaderGridSlotDuration rowHeaderLabelSlotDuration rowHeaderLabelOffset rowHeaderFirstLabelOffset percentOverlap horizontalGap scrollBarRTLPosition itemToRendererKindFunc layoutPriorityFunction formatItemTimeFunc textDir items subColumns minColumnWidth".split(" ");
this._columnHeaderHandlers=[]},destroy:function(a){this._cleanupColumnHeader();this.scrollBar&&this.scrollBar.destroy(a);this.inherited(arguments)},_scrollBar_onScroll:function(a){this._setScrollPosition(a)},_hscrollBar_onScroll:function(a){this._setHScrollPosition(a)},buildRendering:function(){this.inherited(arguments);this.vScrollBar&&(this.scrollBar=new F({content:this.vScrollBarContent},this.vScrollBar),this.scrollBar.on("scroll",y.hitch(this,this._scrollBar_onScroll)));this.hScrollBar&&(this.hScrollBarW=
new F({content:this.hScrollBarContent,direction:"horizontal",value:0},this.hScrollBar),this.hScrollBarW.on("scroll",y.hitch(this,this._hscrollBar_onScroll)),this._hScrollNodes=[this.columnHeaderTable,this.subColumnHeaderTable,this.gridTable,this.itemContainerTable]);this._viewHandles.push(B(this.scrollContainer,M.wheel,dojo.hitch(this,this._mouseWheelScrollHander)))},postscript:function(){this.inherited(arguments);this._initialized=!0;this.invalidRendering||this.refreshRendering()},_setVerticalRendererAttr:function(a){this._destroyRenderersByKind("vertical");
this._set("verticalRenderer",a)},_createRenderData:function(){var a={};a.minHours=this.get("minHours");a.maxHours=this.get("maxHours");a.hourSize=this.get("hourSize");a.hourCount=a.maxHours-a.minHours;a.slotDuration=this.get("timeSlotDuration");a.rowHeaderGridSlotDuration=this.get("rowHeaderGridSlotDuration");a.slotSize=Math.ceil(a.hourSize/(60/a.slotDuration));a.hourSize=60/a.slotDuration*a.slotSize;a.sheetHeight=a.hourSize*a.hourCount;this._rowHeaderWidth||(this._rowHeaderWidth=C.getMarginBox(this.rowHeader).w);
a.rowHeaderWidth=this._rowHeaderWidth;var c=N.getScrollbar();a.scrollbarWidth=c.w+1;a.scrollbarHeight=c.h+1;a.dateLocaleModule=this.dateLocaleModule;a.dateClassObj=this.dateClassObj;a.dateModule=this.dateModule;a.dates=[];a.columnCount=this.get("columnCount");a.subColumns=this.get("subColumns");a.subColumnCount=a.subColumns?a.subColumns.length:1;a.hScrollPaneWidth=C.getMarginBox(this.grid).w;a.minSheetWidth=0>this.minColumnWidth?-1:this.minColumnWidth*a.subColumnCount*a.columnCount;a.hScrollBarEnabled=
0<this.minColumnWidth&&a.hScrollPaneWidth<a.minSheetWidth;c=this.get("startDate");null==c&&(c=new a.dateClassObj);this.startDate=c=this.floorToDay(c,!1,a);for(var b=0;b<a.columnCount;b++)a.dates.push(c),c=this.addAndFloor(c,"day",1);a.startTime=new a.dateClassObj(a.dates[0]);a.startTime.setHours(a.minHours);a.endTime=new a.dateClassObj(a.dates[a.columnCount-1]);a.endTime.setHours(a.maxHours);this.displayedItemsInvalidated&&!this._isEditing?a.items=this.storeManager._computeVisibleItems(a):this.renderData&&
(a.items=this.renderData.items);this.displayedDecorationItemsInvalidated?a.decorationItems=this.decorationStoreManager._computeVisibleItems(a):this.renderData&&(a.decorationItems=this.renderData.decorationItems);return a},_validateProperties:function(){this.inherited(arguments);var a=this.minHours;if(0>a||23<a||isNaN(a))this.minHours=0;a=this.maxHours;if(1>a||36<a||isNaN(a))this.minHours=36;this.minHours>this.maxHours&&(a=this.maxHours,this.maxHours=this.minHours,this.minHours=a);1>this.maxHours-
this.minHours&&(this.minHours=0,this.maxHours=24);if(1>this.columnCount||isNaN(this.columnCount))this.columnCount=1;a=this.percentOverlap;if(0>a||100<a||isNaN(a))this.percentOverlap=70;if(5>this.hourSize||isNaN(this.hourSize))this.hourSize=10;a=this.timeSlotDuration;if(1>a||60<a||isNaN(a))this.timeSlotDuration=15},_setStartDateAttr:function(a){this.displayedItemsInvalidated=!0;this._set("startDate",a)},_setColumnCountAttr:function(a){this.displayedItemsInvalidated=!0;this._set("columnCount",a)},__fixEvt:function(a){a.sheet=
"primary";a.source=this;return a},rowHeaderTimePattern:null,_formatRowHeaderLabel:function(a){return this.renderData.dateLocaleModule.format(a,{selector:"time",timePattern:this.rowHeaderTimePattern})},columnHeaderDatePattern:null,_formatColumnHeaderLabel:function(a){return this.renderData.dateLocaleModule.format(a,{selector:"date",datePattern:this.columnHeaderDatePattern,formatLength:"medium"})},scrollBarRTLPosition:"left",_getStartTimeOfDay:function(){var a=(this.get("maxHours")-this.get("minHours"))*
this._getScrollPosition()/this.renderData.sheetHeight;return{hours:this.renderData.minHours+Math.floor(a),minutes:60*(a-Math.floor(a))}},_getEndTimeOfDay:function(){var a=(this.get("maxHours")-this.get("minHours"))*(this._getScrollPosition()+this.scrollContainer.offsetHeight)/this.renderData.sheetHeight;return{hours:this.renderData.minHours+Math.floor(a),minutes:60*(a-Math.floor(a))}},startTimeOfDay:0,_setStartTimeOfDayAttr:function(a){this.renderData?this._setStartTimeOfDay(a.hours,a.minutes,a.duration,
a.easing):this._startTimeOfDayInvalidated=!0;this._set("startTimeOfDay",a)},_getStartTimeOfDayAttr:function(){return this.renderData?this._getStartTimeOfDay():this._get("startTimeOfDay")},_setStartTimeOfDay:function(a,c,b,d){var e=this.renderData;a=a||e.minHours;c=c||0;0>c?c=0:59<c&&(c=59);0>a?a=0:a>e.maxHours&&(a=e.maxHours);a=60*a+c;c=60*e.minHours;var f=60*e.maxHours;a<c?a=c:a>f&&(a=f);a=(a-c)*e.sheetHeight/(f-c);a=Math.min(e.sheetHeight-this.scrollContainer.offsetHeight,a);this._scrollToPosition(a,
b||0,d)},_scrollToPosition:function(a,c,b){if(c){this._scrollAnimation&&this._scrollAnimation.stop();var d=this._getScrollPosition();this._scrollAnimation=new L.Animation({curve:[d,a],duration:Math.abs((a-d)*c/this.renderData.sheetHeight),easing:b,onAnimate:y.hitch(this,function(e){this._setScrollImpl(e)})});this._scrollAnimation.play()}else this._setScrollImpl(a)},_setScrollImpl:function(a){this._setScrollPosition(a);this.scrollBar&&this.scrollBar.set("value",a)},ensureVisibility:function(a,c,b,
d,e){d=void 0==d?this.renderData.slotDuration:d;if(this.scrollable&&this.autoScroll){a=60*a.getHours()+a.getMinutes()-d;c=60*c.getHours()+c.getMinutes()+d;d=this._getStartTimeOfDay();var f=this._getEndTimeOfDay();d=60*d.hours+d.minutes;f=60*f.hours+f.minutes;var k=!1,h=null;switch(b){case "start":k=a>=d&&a<=f;h=a;break;case "end":k=c>=d&&c<=f;h=c-(f-d);break;case "both":k=a>=d&&c<=f,h=a}k||this._setStartTimeOfDay(Math.floor(h/60),h%60,e)}},scrollView:function(a){var c=this._getStartTimeOfDay();c=
60*c.hours+c.minutes+a*this.timeSlotDuration;this._setStartTimeOfDay(Math.floor(c/60),c%60)},scrollViewHorizontal:function(a){this._setHScrollPosition(this._getHScrollPosition()+a*this.minColumnWidth);this.hScrollBarW&&this.hScrollBarW.set("value",this._getHScrollPosition())},_hScrollNodes:null,_setHScrollPositionImpl:function(a,c,b){var d=c?null:"translateX(-"+a+"px)";D.forEach([this.columnHeaderTable,this.subColumnHeaderTable,this.gridTable,this.itemContainerTable],function(e){c?(e.scrollLeft=a,
q.set(e,"left",-a+"px")):q.set(e,b,d)},this)},_mouseWheelScrollHander:function(a){this.renderData.hScrollBarEnabled&&a.altKey?this.scrollViewHorizontal(0<a.wheelDelta?-1:1):this.scrollView(0<a.wheelDelta?-1:1);A.stop(a)},refreshRendering:function(){if(this._initialized){this._validateProperties();var a=this.renderData,c=this._createRenderData();this.renderData=c;this._createRendering(c,a);this._layoutDecorationRenderers(c);this._layoutRenderers(c)}},_createRendering:function(a,c){q.set(this.sheetContainer,
"height",a.sheetHeight+"px");this._configureVisibleParts(a);this._configureScrollBar(a);this._buildColumnHeader(a,c);this._buildSubColumnHeader(a,c);this._buildRowHeader(a,c);this._buildGrid(a,c);this._buildItemContainer(a,c);this._layoutTimeIndicator(a);this._commitProperties(a)},_configureVisibleParts:function(a){this.secondarySheetNode&&q.set(this.secondarySheetNode,"display",this._showSecondarySheet?"block":"none");p[null==this.subColumns?"remove":"add"](this.domNode,"subColumns");p[this._showSecondarySheet?
"add":"remove"](this.domNode,"secondarySheet")},_commitProperties:function(a){this._startTimeOfDayInvalidated&&(this._startTimeOfDayInvalidated=!1,a=this.startTimeOfDay,null!=a&&this._setStartTimeOfDay(a.hours,void 0==a.minutes?0:a.minutes))},_configureScrollBar:function(a){E("ie")&&this.scrollBar&&q.set(this.vScrollBar,"width",a.scrollbarWidth+1+"px");var c=this.isLeftToRight()?!0:"right"==this.scrollBarRTLPosition,b=c?"right":"left",d=c?"left":"right";this.scrollBar&&(this.scrollBar.set("maximum",
a.sheetHeight),q.set(this.vScrollBar,b,0),q.set(this.vScrollBar,c?"left":"right","auto"),q.set(this.vScrollBar,"bottom",a.hScrollBarEnabled?a.scrollbarHeight+"px":"0"));q.set(this.scrollContainer,b,a.scrollbarWidth+"px");q.set(this.scrollContainer,d,"0");q.set(this.header,b,a.scrollbarWidth+"px");q.set(this.header,d,"0");q.set(this.subHeader,b,a.scrollbarWidth+"px");q.set(this.subHeader,d,"0");this.buttonContainer&&null!=this.owner&&this.owner.currentView==this&&(q.set(this.buttonContainer,b,a.scrollbarWidth+
"px"),q.set(this.buttonContainer,d,"0"));this.hScrollBar&&(D.forEach(this._hScrollNodes,function(e){p[a.hScrollBarEnabled?"add":"remove"](e.parentNode,"dojoxCalendarHorizontalScroll")},this),a.hScrollBarEnabled||(this._setHScrollPosition(0),this.hScrollBarW.set("value",0)),q.set(this.hScrollBar,{display:a.hScrollBarEnabled?"block":"none",height:a.scrollbarHeight+"px",left:(c?a.rowHeaderWidth:a.scrollbarWidth)+"px",right:(c?a.scrollbarWidth:a.rowHeaderWidth)+"px"}),q.set(this.scrollContainer,"bottom",
a.hScrollBarEnabled?a.scrollbarHeight+1+"px":"0"),this._configureHScrollDomNodes(a.hScrollBarEnabled?a.minSheetWidth+"px":"100%"),this.hScrollBarW.set("maximum",a.minSheetWidth),this.hScrollBarW.set("containerSize",a.hScrollPaneWidth))},_configureHScrollDomNodes:function(a){D.forEach(this._hScrollNodes,function(c){q.set(c,"width",a)},this)},resize:function(a){this._resizeHandler(a)},_resizeHandler:function(a,c){var b=this.renderData;if(null!=b)if(c){var d=C.getMarginBox(this.grid).w;b.hScrollPaneWidth!=
d&&(b.hScrollPaneWidth=d,b.minSheetWidth=0>this.minColumnWidth?-1:this.minColumnWidth*b.subColumnCount*b.columnCount,b.hScrollBarEnabled=0<this.minColumnWidth&&C.getMarginBox(this.grid).w<b.minSheetWidth);this._configureScrollBar(b)}else void 0!=this._resizeTimer&&clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(y.hitch(this,function(){this._resizeHandler(a,!0)}),100)},_columnHeaderClick:function(a){A.stop(a);var c=u("td",this.columnHeaderTable).indexOf(a.currentTarget);this._onColumnHeaderClick({index:c,
date:this.renderData.dates[c],triggerEvent:a})},_buildColumnHeader:function(a,c){var b=this.columnHeaderTable;if(b){var d=a.columnCount-(c?c.columnCount:0);8==E("ie")&&(null==this._colTableSave?this._colTableSave=y.clone(b):0>d&&(this._cleanupColumnHeader(),this.columnHeader.removeChild(b),r.destroy(b),this.columnHeaderTable=b=y.clone(this._colTableSave),this.columnHeader.appendChild(b),d=a.columnCount));var e=u("tbody",b),f=u("tr",b);e=1==e.length?e[0]:G.create("tbody",null,b);f=1==f.length?f[0]:
r.create("tr",null,e);if(0<d)for(e=0;e<d;e++){var k=r.create("td",null,f);var h=[];h.push(B(k,"click",y.hitch(this,this._columnHeaderClick)));E("touch-events")?(h.push(B(k,"touchstart",function(g){A.stop(g);p.add(g.currentTarget,"Active")})),h.push(B(k,"touchend",function(g){A.stop(g);p.remove(g.currentTarget,"Active")}))):(h.push(B(k,"mousedown",function(g){A.stop(g);p.add(g.currentTarget,"Active")})),h.push(B(k,"mouseup",function(g){A.stop(g);p.remove(g.currentTarget,"Active")})),h.push(B(k,"mouseover",
function(g){A.stop(g);p.add(g.currentTarget,"Hover")})),h.push(B(k,"mouseout",function(g){A.stop(g);p.remove(g.currentTarget,"Hover")})));this._columnHeaderHandlers.push(h)}else for(d=-d,e=0;e<d;e++)for(k=f.lastChild,f.removeChild(k),r.destroy(k),k=this._columnHeaderHandlers.pop();0<k.length;)k.pop().remove();u("td",b).forEach(function(g,n){g.className="";0==n?p.add(g,"first-child"):n==this.renderData.columnCount-1&&p.add(g,"last-child");var m=a.dates[n];this._setText(g,this._formatColumnHeaderLabel(m));
this.styleColumnHeaderCell(g,m,a)},this);this.yearColumnHeaderContent&&this._setText(this.yearColumnHeaderContent,a.dateLocaleModule.format(a.dates[0],{selector:"date",datePattern:"yyyy"}))}},_cleanupColumnHeader:function(){for(;0<this._columnHeaderHandlers.length;)for(var a=this._columnHeaderHandlers.pop();0<a.length;)a.pop().remove()},styleColumnHeaderCell:function(a,c,b){p.add(a,this._cssDays[c.getDay()]);this.isToday(c)?p.add(a,"dojoxCalendarToday"):this.isWeekEnd(c)&&p.add(a,"dojoxCalendarWeekend")},
_buildSubColumnHeader:function(a,c){var b=this.subColumnHeaderTable;if(b&&null!=this.subColumns){var d=a.columnCount-u("td",b).length;8==E("ie")&&(null==this._colSubTableSave?this._colSubTableSave=y.clone(b):0>d&&(this.subColumnHeader.removeChild(b),r.destroy(b),this.subColumnHeaderTable=b=y.clone(this._colSubTableSave),this.subColumnHeader.appendChild(b),d=a.columnCount));var e=u("\x3etbody",b);e=1==e.length?e[0]:G.create("tbody",null,b);var f=u("\x3etr",e);e=1==f.length?f[0]:r.create("tr",null,
e);var k=a.subColumnCount;if(0<d)for(var h=0;h<d;h++)f=r.create("td",null,e),r.create("div",{className:"dojoxCalendarSubHeaderContainer"},f);else for(d=-d,h=0;h<d;h++)f=e.lastChild,e.removeChild(f),r.destroy(f);u("td",b).forEach(function(g,n){g.className="";0==n?p.add(g,"first-child"):n==this.renderData.columnCount-1&&p.add(g,"last-child");u(".dojoxCalendarSubHeaderContainer",g).forEach(function(m,l){if(0!=u(".dojoxCalendarSubHeaderContainer",m).length-k){var t=m.childNodes.length;for(l=0;l<t;l++)m.removeChild(m.lastChild);
for(t=0;t<k;t++)r.create("div",{className:"dojoxCalendarSubHeaderCell dojoxCalendarSubHeaderLabel"},m)}var v=100/k+"%";u(".dojoxCalendarSubHeaderCell",m).forEach(function(x,w){x.className="dojoxCalendarSubHeaderCell dojoxCalendarSubHeaderLabel";var z=1==k?w:Math.floor(w/k);subColIdx=1==k?0:w-z*k;q.set(x,{width:v,left:100*subColIdx/k+"%"});p[subColIdx<k-1&&1!==k?"add":"remove"](x,"subColumn");p.add(x,this.subColumns[subColIdx]);this._setText(x,this.subColumnLabelFunc(this.subColumns[subColIdx]))},
this)},this);this.styleSubColumnHeaderCell(g,a.dates[n],a)},this)}},subColumnLabelFunc:function(a){return a},styleSubColumnHeaderCell:function(a,c,b){p.add(a,this._cssDays[c.getDay()]);this.isToday(c)?p.add(a,"dojoxCalendarToday"):this.isWeekEnd(c)&&p.add(a,"dojoxCalendarWeekend")},_addMinutesClasses:function(a,c){switch(c){case 0:p.add(a,"hour");break;case 30:p.add(a,"halfhour");break;case 15:case 45:p.add(a,"quarterhour")}},_buildRowHeader:function(a,c){var b=this.rowHeaderTable;if(b){null==this._rowHeaderLabelContainer&&
(this._rowHeaderLabelContainer=r.create("div",{"class":"dojoxCalendarRowHeaderLabelContainer"},this.rowHeader));q.set(b,"height",a.sheetHeight+"px");var d=u("tbody",b);var e=1==d.length?d[0]:r.create("tbody",null,b);d=Math.floor(60/a.rowHeaderGridSlotDuration)*a.hourCount-(c?Math.floor(60/c.rowHeaderGridSlotDuration)*c.hourCount:0);if(0<d)for(var f=0;f<d;f++){var k=r.create("tr",null,e);r.create("td",null,k)}else for(d=-d,f=0;f<d;f++)e.removeChild(e.lastChild);var h=this.renderData,g=Math.ceil(a.hourSize/
(60/a.rowHeaderGridSlotDuration)),n=new Date(2E3,0,1,0,0,0);u("tr",b).forEach(function(m,l){var t=u("td",m)[0];t.className="";q.set(m,"height",7==E("ie")?g-60/a.rowHeaderGridSlotDuration*2:g+"px");var v=l*this.renderData.rowHeaderGridSlotDuration%60;this.styleRowHeaderCell(t,a.minHours+l*this.renderData.rowHeaderGridSlotDuration/60,v,h);this._addMinutesClasses(t,v)},this);b=this._rowHeaderLabelContainer;d=Math.floor(60/this.rowHeaderLabelSlotDuration)*a.hourCount-b.childNodes.length;if(0<d)for(f=
0;f<d;f++)e=r.create("span",null,b),p.add(e,"dojoxCalendarRowHeaderLabel");else for(d=-d,f=0;f<d;f++)b.removeChild(b.lastChild);g=Math.ceil(a.hourSize/(60/this.rowHeaderLabelSlotDuration));u("\x3espan",b).forEach(function(m,l){n.setHours(0);n.setMinutes(60*a.minHours+l*this.rowHeaderLabelSlotDuration);this._configureRowHeaderLabel(m,n,l,g*l,h)},this)}},_configureRowHeaderLabel:function(a,c,b,d,e){this._setText(a,this._formatRowHeaderLabel(c));q.set(a,"top",d+(0==b?this.rowHeaderFirstLabelOffset:this.rowHeaderLabelOffset)+
"px");c=e.minHours+b*this.rowHeaderLabelSlotDuration/60;b=b*this.rowHeaderLabelSlotDuration%60;p.remove(a,["hour","halfhour","quarterhour"]);this._addMinutesClasses(a,b);this.styleRowHeaderCell(a,c,b,e)},styleRowHeaderCell:function(a,c,b,d){},_buildGrid:function(a,c){var b=this.gridTable;if(b){q.set(b,"height",a.sheetHeight+"px");var d=Math.floor(60/a.slotDuration)*a.hourCount,e=d-(c?Math.floor(60/c.slotDuration)*c.hourCount:0),f=0<e,k=a.columnCount-(c?c.columnCount:0);8==E("ie")&&(null==this._gridTableSave?
this._gridTableSave=y.clone(b):0>k&&(this.grid.removeChild(b),r.destroy(b),this.gridTable=b=y.clone(this._gridTableSave),this.grid.appendChild(b),k=a.columnCount,e=d,f=!0));var h=u("tbody",b);h=1==h.length?h[0]:r.create("tbody",null,b);if(f)for(var g=0;g<e;g++)r.create("tr",null,h);else for(e=-e,g=0;g<e;g++)h.removeChild(h.lastChild);var n=Math.floor(60/a.slotDuration)*a.hourCount-e,m=f||0<k;k=m?k:-k;u("tr",b).forEach(function(l,t){if(m){var v=t>=n?a.columnCount:k;for(t=0;t<v;t++)r.create("td",null,
l)}else for(t=0;t<k;t++)l.removeChild(l.lastChild)});u("tr",b).forEach(function(l,t){q.set(l,"height",a.slotSize+"px");0==t?p.add(l,"first-child"):t==d-1&&p.add(l,"last-child");var v=t*this.renderData.slotDuration%60,x=this.minHours+Math.floor(t*this.renderData.slotDuration/60);u("td",l).forEach(function(w,z){w.className="";0==z?p.add(w,"first-child"):z==this.renderData.columnCount-1&&p.add(w,"last-child");this.styleGridCell(w,a.dates[z],x,v,a);this._addMinutesClasses(w,v)},this)},this)}},styleGridCellFunc:null,
defaultStyleGridCell:function(a,c,b,d,e){p.add(a,[this._cssDays[c.getDay()],"H"+b,"M"+d]);if(this.isToday(c))return p.add(a,"dojoxCalendarToday");if(this.isWeekEnd(c))return p.add(a,"dojoxCalendarWeekend")},styleGridCell:function(a,c,b,d,e){this.styleGridCellFunc?this.styleGridCellFunc(a,c,b,d,e):this.defaultStyleGridCell(a,c,b,d,e)},_buildItemContainer:function(a,c){var b=this.itemContainerTable;if(b){var d=[],e=[];q.set(b,"height",a.sheetHeight+"px");var f=a.columnCount-(c?c.columnCount:0);8==E("ie")&&
(null==this._itemTableSave?this._itemTableSave=y.clone(b):0>f&&(this.itemContainer.removeChild(b),this._recycleItemRenderers(!0),r.destroy(b),this.itemContainerTable=b=y.clone(this._itemTableSave),this.itemContainer.appendChild(b),f=a.columnCount));var k=u("tbody",b),h=u("tr",b);k=1==k.length?k[0]:r.create("tbody",null,b);h=1==h.length?h[0]:r.create("tr",null,k);var g=a.subColumnCount;if(0<f)for(var n=0;n<f;n++)k=r.create("td",null,h),r.create("div",{className:"dojoxCalendarContainerColumn"},k);else for(f=
-f,n=0;n<f;n++)h.removeChild(h.lastChild);u("td",b).forEach(function(m,l){u(".dojoxCalendarContainerColumn",m).forEach(function(v,x){q.set(v,"height",a.sheetHeight+"px");if(0!=u(".dojoxCalendarSubContainerColumn",m).length-g){var w=v.childNodes.length;for(x=0;x<w;x++)v.removeChild(v.lastChild);for(w=0;w<g;w++){var z=r.create("div",{className:"dojoxCalendarSubContainerColumn"},v);r.create("div",{className:"dojoxCalendarDecorationContainerColumn"},z);r.create("div",{className:"dojoxCalendarEventContainerColumn"},
z)}}},this);var t=100/g+"%";u(".dojoxCalendarSubContainerColumn",m).forEach(function(v,x){var w=1==g?x:Math.floor(x/g);subColIdx=1==g?0:x-w*g;q.set(v,{width:t,left:100*subColIdx/g+"%"});p[subColIdx<g-1&&1!==g?"add":"remove"](v,"subColumn");u(".dojoxCalendarEventContainerColumn",v).forEach(function(z,O){d.push(z)},this);u(".dojoxCalendarDecorationContainerColumn",v).forEach(function(z,O){e.push(z)},this)},this)},this);a.cells=d;a.decorationCells=e}},showTimeIndicator:!0,timeIndicatorRefreshInterval:6E4,
_setShowTimeIndicatorAttr:function(a){this._set("showTimeIndicator",a);this._layoutTimeIndicator(this.renderData)},_layoutTimeIndicator:function(a){if(a){if(this.showTimeIndicator){var c=new a.dateClassObj;if(this.isOverlapping(a,a.startTime,a.endTime,c,c)&&c.getHours()>=this.get("minHours")&&60*c.getHours()+c.getMinutes()<60*this.get("maxHours")){this._timeIndicator||(this._timeIndicator=r.create("div",{className:"dojoxCalendarTimeIndicator"}));for(var b=this._timeIndicator,d=0;d<this.renderData.columnCount&&
!this.isSameDay(c,this.renderData.dates[d]);d++);c=this.computeProjectionOnDate(a,this.floorToDay(c),c,a.sheetHeight);if(c!=a.sheetHeight){q.set(b,{top:c+"px",display:"block"});a=a.cells[d*a.subColumnCount].parentNode.parentNode;a!=b.parentNode&&(null!=b.parentNode&&b.parentNode.removeChild(b),a.appendChild(b));null==this._timeIndicatorTimer&&(this._timeIndicatorTimer=setInterval(y.hitch(this,function(){this._layoutTimeIndicator(this.renderData)}),this.timeIndicatorRefreshInterval));return}}}this._timeIndicatorTimer&&
(clearInterval(this._timeIndicatorTimer),this._timeIndicatorTimer=null);this._timeIndicator&&q.set(this._timeIndicator,"display","none")}},beforeDeactivate:function(){this._timeIndicatorTimer&&(clearInterval(this._timeIndicatorTimer),this._timeIndicatorTimer=null)},_overlapLayoutPass2:function(a){var c,b;var d=a[a.length-1];for(b=0;b<d.length;b++)d[b].extent=1;for(c=0;c<a.length-1;c++)for(d=a[c],b=0;b<d.length;b++){var e=d[b];if(-1==e.extent){e.extent=1;for(var f=0,k=!1,h=c+1;h<a.length&&!k;h++){for(var g=
a[h],n=0;n<g.length&&!k;n++){var m=g[n];e.start<m.end&&m.start<e.end&&(k=!0)}k||f++}e.extent+=f}}},_defaultItemToRendererKindFunc:function(a){return"vertical"},_layoutInterval:function(a,c,b,d,e,f){var k=[];a.colW=this.itemContainer.offsetWidth/a.columnCount;if("dataItems"===f){for(var h=0;h<e.length;h++){var g=e[h];"vertical"===this._itemToRendererKind(g)&&k.push(g)}this._layoutRendererWithSubColumns(a,"vertical",!0,c,b,d,k,f)}else this._layoutRendererWithSubColumns(a,"decoration",!1,c,b,d,e,f)},
_layoutRendererWithSubColumns:function(a,c,b,d,e,f,k,h){if(0<k.length)if(1<a.subColumnCount){var g={},n=this.subColumns;D.forEach(n,function(l){g[l]=[]});D.forEach(k,function(l){"decorationItems"===h?l.subColumn?g[l.subColumn]&&g[l.subColumn].push(l):D.forEach(n,function(t){var v=y.mixin({},l);v.subColumn=t;g[t].push(v)}):l.subColumn&&g[l.subColumn]&&g[l.subColumn].push(l)});var m=0;D.forEach(this.subColumns,function(l){this._layoutVerticalItems(a,c,b,d,m++,e,f,g[l],h)},this)}else this._layoutVerticalItems(a,
c,b,d,0,e,f,k,h)},_getColumn:function(a,c,b,d){return("dataItems"===d?a.cells:a.decorationCells)[c*a.subColumnCount+b]},_layoutVerticalItems:function(a,c,b,d,e,f,k,h,g){if(!("dataItems"===g&&null==this.verticalRenderer||"decorationItems"===g&&null==this.verticalDecorationRenderer)){c=this._getColumn(a,d,e,g);b=[];for(d=0;d<h.length;d++){e=h[d];var n=this.computeRangeOverlap(a,e.startTime,e.endTime,f,k),m=this.computeProjectionOnDate(a,f,n[0],a.sheetHeight),l=this.computeProjectionOnDate(a,f,n[1],
a.sheetHeight);l>m&&(e=y.mixin({start:m,end:l,range:n,item:e},e),b.push(e))}f="dataItems"===g?this.computeOverlapping(b,this._overlapLayoutPass2).numLanes:1;k=this.percentOverlap/100;for(d=0;d<b.length;d++){e=b[d];if("dataItems"===g){n=e.lane;m=e.extent;0==k?(h=1==f?a.colW:(a.colW-(f-1)*this.horizontalGap)/f,n*=h+this.horizontalGap,h=1==m?h:h*m+(m-1)*this.horizontalGap,h=100*h/a.colW,n=100*n/a.colW):(h=1==f?100:100/(f-(f-1)*k),n*=h-k*h,h=1==m?h:h*(m-(m-1)*k));m=this._createRenderer(e,"vertical",this.verticalRenderer,
"dojoxCalendarVertical");var t=this.isItemBeingEdited(e),v=this.isItemSelected(e),x=this.isItemHovered(e),w=this.isItemFocused(e);l=m.renderer;l.set("hovered",x);l.set("selected",v);l.set("edited",t);l.set("focused",this.showFocus?w:!1);l.set("storeState",this.getItemStoreState(e));l.set("moveEnabled",this.isItemMoveEnabled(e._item,"vertical"));l.set("resizeEnabled",this.isItemResizeEnabled(e._item,"vertical"));this.applyRendererZIndex(e,m,x,v,t,w)}else h=100,n=0,m=this.decorationRendererManager.createRenderer(e,
"vertical",this.verticalDecorationRenderer,"dojoxCalendarDecoration"),l=m.renderer;q.set(m.container,{top:e.start+"px",left:n+"%",width:h+"%",height:e.end-e.start+1+"px"});l.updateRendering&&l.updateRendering(h,e.end-e.start+1);r.place(m.container,c);q.set(m.container,"display","block")}}},_sortItemsFunction:function(a,c){var b=this.dateModule.compare(a.startTime,c.startTime);0==b&&(b=-1*this.dateModule.compare(a.endTime,c.endTime));return this.isLeftToRight()?b:-b},_getNormalizedCoords:function(a,
c,b,d){null!=a&&(b=C.position(this.itemContainer,!0),a.touches?(d=void 0==d?0:d,c=a.touches[d].pageX-b.x,b=a.touches[d].pageY-b.y):(c=a.pageX-b.x,b=a.pageY-b.y));a=C.getContentBox(this.itemContainer);this.isLeftToRight()||(c=a.w-c);0>c?c=0:c>a.w&&(c=a.w-1);0>b?b=0:b>a.h&&(b=a.h-1);return{x:c,y:b}},getTime:function(a,c,b,d){c=this._getNormalizedCoords(a,c,b,d);a=this.getTimeOfDay(c.y,this.renderData);b=C.getMarginBox(this.itemContainer).w/this.renderData.columnCount;c=Math.floor(c.x/b);b=null;c<this.renderData.dates.length&&
(b=this.newDate(this.renderData.dates[c]),b=this.floorToDay(b,!0),b.setHours(a.hours),b.setMinutes(a.minutes));return b},getSubColumn:function(a,c,b,d){if(null==this.subColumns||1==this.subColumns.length)return null;a=this._getNormalizedCoords(a,c,b,d);c=this.renderData;b=C.getMarginBox(this.itemContainer).w/this.renderData.columnCount;return this.subColumns[Math.floor((a.x-Math.floor(a.x/b)*b)/(b/c.subColumnCount))]},_onGridMouseUp:function(a){this.inherited(arguments);this._gridMouseDown&&(this._gridMouseDown=
!1,this._onGridClick({date:this.getTime(a),triggerEvent:a}))},_onGridTouchStart:function(a){this.inherited(arguments);var c=this._gridProps;c.moved=!1;c.start=a.touches[0].screenY;c.scrollTop=this._getScrollPosition()},_onGridTouchMove:function(a){this.inherited(arguments);if(1<a.touches.length&&!this._isEditing)A.stop(a);else if(this._gridProps&&!this._isEditing){var c=a.touches[0].screenX,b=a.touches[0].screenY,d=this._edProps;if(!d||d&&(25<Math.abs(c-d.start.x)||25<Math.abs(b-d.start.y)))this._gridProps.moved=
!0,c=this._gridProps.scrollTop-(a.touches[0].screenY-this._gridProps.start),b=this.itemContainer.offsetHeight-this.scrollContainer.offsetHeight,0>c?(this._gridProps.start=a.touches[0].screenY,this._setScrollImpl(0),this._gridProps.scrollTop=0):c>b?(this._gridProps.start=a.touches[0].screenY,this._setScrollImpl(b),this._gridProps.scrollTop=b):this._setScrollImpl(c)}},_onGridTouchEnd:function(a){this.inherited(arguments);var c=this._gridProps;c&&(this._isEditing||c.moved||(c.fromItem||c.editingOnStart||
this.selectFromEvent(a,null,null,!0),c.fromItem||(this._pendingDoubleTap&&this._pendingDoubleTap.grid?(this._onGridDoubleClick({date:this.getTime(this._gridProps.event),triggerEvent:this._gridProps.event}),clearTimeout(this._pendingDoubleTap.timer),delete this._pendingDoubleTap):(this._onGridClick({date:this.getTime(this._gridProps.event),triggerEvent:this._gridProps.event}),this._pendingDoubleTap={grid:!0,timer:setTimeout(y.hitch(this,function(){delete this._pendingDoubleTap}),this.doubleTapDelay)}))),
this._gridProps=null)},_onColumnHeaderClick:function(a){this._dispatchCalendarEvt(a,"onColumnHeaderClick")},onColumnHeaderClick:function(a){},getTimeOfDay:function(a,c){var b=60*c.minHours;b+=a*(60*c.maxHours-b)/c.sheetHeight;return{hours:Math.floor(b/60),minutes:Math.floor(b%60)}},_isItemInView:function(a){var c=this.inherited(arguments);if(c){var b=this.renderData;if(b.dateModule.difference(a.startTime,a.endTime,"millisecond")>36E5*(24-b.maxHours+b.minHours))return!0;var d=60*a.startTime.getHours()+
a.startTime.getMinutes(),e=60*a.endTime.getHours()+a.endTime.getMinutes(),f=60*b.minHours;b=60*b.maxHours;if(0<d&&d<f||d>b&&1440>=d||0<e&&e<f||e>b&&1440>=e)return!1}return c},_ensureItemInView:function(a){var c=a.startTime,b=a.endTime,d=this.renderData,e=d.dateModule,f=Math.abs(e.difference(a.startTime,a.endTime,"millisecond"));if(f>36E5*(24-d.maxHours+d.minHours))return!1;c=60*c.getHours()+c.getMinutes();b=60*b.getHours()+b.getMinutes();var k=60*d.minHours,h=60*d.maxHours;if(0<c&&c<k){this.floorToDay(a.startTime,
!0,d);a.startTime.setHours(d.minHours);a.endTime=e.add(a.startTime,"millisecond",f);var g=!0}else c>h&&1440>=c&&(this.floorToDay(a.startTime,!0,d),a.startTime=e.add(a.startTime,"day",1),a.startTime.setHours(d.minHours),a.endTime=e.add(a.startTime,"millisecond",f),g=!0);0<b&&b<k?(this.floorToDay(a.endTime,!0,d),a.endTime=e.add(a.endTime,"day",-1),a.endTime.setHours(d.maxHours),a.startTime=e.add(a.endTime,"millisecond",-f),g=!0):b>h&&1440>=b&&(this.floorToDay(a.endTime,!0,d),a.endTime.setHours(d.maxHours),
a.startTime=e.add(a.endTime,"millisecond",-f),g=!0);return g=g||this.inherited(arguments)},_onScrollTimer_tick:function(){this._scrollToPosition(this._getScrollPosition()+this._scrollProps.scrollStep)},snapUnit:"minute",snapSteps:15,minDurationUnit:"minute",minDurationSteps:15,liveLayout:!1,stayInView:!0,allowStartEndSwap:!0,allowResizeLessThan24H:!0})});