AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlTimelineSeriesPeer",!1);AdfPage.PAGE.getLookAndFeel().registerPeerConstructor("oracle.dss.adf.timeline.TimelineSeries","AdfDhtmlTimelineSeriesPeer");
AdfDhtmlTimelineSeriesPeer.InitSubclass=function(){AdfObject.ensureClassInitialization(AdfDhtmlTimelineSeriesPeer);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.CLICK_EVENT_TYPE,AdfUIInputEvent.MOUSE_IN_EVENT_TYPE,AdfUIInputEvent.MOUSE_OUT_EVENT_TYPE,AdfUIInputEvent.KEY_DOWN_EVENT_TYPE,AdfComponentEvent.CONTEXT_MENU_EVENT_TYPE,AdfDropEvent.DROP_EVENT_TYPE);AdfRichUIPeer.addSuppressedPPRAttributes(this,"blockStart");AdfRichUIPeer.addSuppressedPPRAttributes(this,"blockEnd");AdfRichUIPeer.addComponentPropertyChanges(this,
"selectedRowKeys");this._SEL_UPDATE_ALL_SELECT=0;this._SEL_UPDATE_ALL_UNSELECT=1;this._SEL_UPDATE_ALL_UPDATE=2;this.SELECTALL_KEY_PROPERTY="afrSelectAll";this._SELECTION_SINGLE="single";this._SELECTION_MULTIPLE="multiple";this._SELECTION_NONE="none";this._SELECTED_CLASS="p_AFSelected";this._HIGHLIGHTED_CLASS="p_AFHighlighted";this._FOCUSED_CLASS="p_AFFocused";this.DW_SUB_ID="dataW";this._INPUT_REGEXP=/^INPUT|SELECT|OPTION|BUTTON|^A\b|TEXTAREA/;this._NEEDS_REFRESH_ATTRIBUTE="_afrNdsRfr";this._ROW_KEY=
"_rk";this.AUTO_PPR_FETCH_ID=-99;this.AUTO_PPR_UPDATE_BLOCK=0;this.AUTO_PPR_INSERT_BLOCK=1;this.AUTO_PPR_REMOVE_BLOCK=2;this.AUTO_PPR_REFRESH_BLOCK=3;this.ZOOM_FETCH_ID=-98;this.DISCLOSE_FETCH_ID=-97;this.MISSING_AFTER=1;this.MISSING_BEFORE=2;this.NO_BLOCKS=4;this.VIEWPORT_SATISFIED=0;this.ITEM_GAP=15;this.NAV_ARROW_PADDING=3;this.COMPLETE=0;this.INCOMPLETE=1;this.INDETERMINATE=2;this.DURATIONCOLORS="#267DB3 #68C182 #FAD55C #ED6647 #8561C8 #6DDBDB #FFB54D #E371B2 #47BDEF #A2BF39 #A75DBA #F7F37B".split(" ")};
AdfDhtmlTimelineSeriesPeer.prototype.InitDomElement=function(a,b){AdfDhtmlTimelineSeriesPeer.superclass.InitDomElement.call(this,a,b);AdfTimelineUtils.supportsTouch()||this.setupMouseWheel(b);this._fetchId=0;this._registered=!1;this._vertical=null;this._hotspotsHidden=!1;this._incompleteImageTimerAttempts=0;this._databodyHeight=-1;this._itemMarginTop=parseInt(AdfAgent.AGENT.getAttribute(b,"_timt"));this._itemMarginBottom=parseInt(AdfAgent.AGENT.getAttribute(b,"_timb"));this._itemSpacing=Math.max(this._itemMarginTop,
this._itemMarginBottom)};AdfDhtmlTimelineSeriesPeer.prototype.BindToComponent=function(a,b){AdfDhtmlTimelineSeriesPeer.superclass.BindToComponent.call(this,a,b);a.getParent().getPeer().HandleChildrenInitialized(a)};AdfDhtmlTimelineSeriesPeer.prototype.ComponentRemoved=function(a){var b=this.getTimelinePeer();null!=b&&b.unregisterTimelineSeriesPeer(this);AdfDhtmlTimelineSeriesPeer.superclass.ComponentRemoved.call(this,a)};
AdfDhtmlTimelineSeriesPeer.prototype.setupMouseWheel=function(a){var b=AdfAgent.AGENT,c=b.getPlatform(),d=c==AdfAgent.IE_PLATFORM&&9<=b.getVersion(),b=(c=c==AdfAgent.GECKO_PLATFORM)&&17<=b.getVersion(),e=this.createCallback(this.handleMouseWheel);d||b?a.addEventListener("wheel",e,!0):c?a.addEventListener("DOMMouseScroll",e,!0):a.onmousewheel=e};
AdfDhtmlTimelineSeriesPeer.prototype.handleMouseWheel=function(a){a||(a=AdfPage.PAGE.getDomWindow().event);a=a.wheelDeltaX;null!=a&&(a=Math.round(-1/120*a),this.getTimelinePeer().ScrollByAmount(a,!0))};AdfDhtmlTimelineSeriesPeer.isIE9=function(){return AdfAgent.AGENT.atLeast(AdfAgent.IE_PLATFORM,9)};AdfDhtmlTimelineSeriesPeer.isIE7=function(){var a=AdfAgent.AGENT;return a.getPlatform()==AdfAgent.IE_PLATFORM&&7==a.getVersion()};
AdfDhtmlTimelineSeriesPeer.isIE8=function(){var a=AdfAgent.AGENT;return a.getPlatform()==AdfAgent.IE_PLATFORM&&8==a.getVersion()};AdfDhtmlTimelineSeriesPeer.prototype.supportsCSSTransition=function(){return AdfDvtAnimator.ANIMATOR.supportsCSSTransition()};AdfDhtmlTimelineSeriesPeer.prototype.hasTimeAxis=function(){return null!=AdfAgent.AGENT.getIntAttribute(this.getDomElement(),"_tai")};
AdfDhtmlTimelineSeriesPeer.prototype.getTimeAxis=function(a){return this.hasTimeAxis()?this.isEmptyBlock(a)?a.firstChild.nextSibling:a.firstChild:null};AdfDhtmlTimelineSeriesPeer.prototype.getDummyTimeAxis=function(){var a=this.getComponent().getClientId();return AdfAgent.AGENT.getElementById(AdfRichUIPeer.CreateSubId(a,"dta"))};
AdfDhtmlTimelineSeriesPeer.prototype.getOverviewLabels=function(a){return this.hasTimeAxis()?this.getTimeAxis(a).nextSibling:this.isEmptyBlock(a)?a.firstChild.nextSibling:a.firstChild};AdfDhtmlTimelineSeriesPeer.prototype.isEmptyBlock=function(a){return null!=AdfAgent.AGENT.getAttribute(a.firstChild,"_et")};AdfDhtmlTimelineSeriesPeer.prototype.getTimelinePeer=function(){return this.getComponent().getParent().getPeer()};AdfDhtmlTimelineSeriesPeer.prototype.getAnimationOnDisplay=function(){return this.getComponent().getParent().getAnimationOnDisplay()};
AdfDhtmlTimelineSeriesPeer.prototype.getAnimationOnDataChange=function(){return this.getComponent().getParent().getAnimationOnDataChange()};AdfDhtmlTimelineSeriesPeer.prototype.getTimelineOverviewPeer=function(){return this.getTimelinePeer().getTimelineOverviewPeer()};AdfDhtmlTimelineSeriesPeer.prototype.isVertical=function(){null==this._vertical&&(this._vertical=this.getTimelinePeer().isVertical());return this._vertical};
AdfDhtmlTimelineSeriesPeer.prototype.isOverviewAbove=function(){null==this._overviewAbove&&(this._overviewAbove=this.getTimelinePeer().isOverviewAbove());return this._overviewAbove};AdfDhtmlTimelineSeriesPeer.prototype.DomReplaceNotify=function(a){return 0<a.id.indexOf(AdfDhtmlTimelineSeriesPeer.DW_SUB_ID)?null:a};AdfDhtmlTimelineSeriesPeer.prototype.getElemOffset=function(a){return this.isVertical()?parseInt(a.offsetHeight):parseInt(a.offsetWidth)};
AdfDhtmlTimelineSeriesPeer.prototype.getElemPos=function(a){return this.isVertical()?parseInt(a.style.top):AdfPage.PAGE.getLocaleContext().isRightToLeft()?parseInt(a.style.right):parseInt(a.style.left)};AdfDhtmlTimelineSeriesPeer.prototype.setElemPos=function(a,b){this.isVertical()?a.style.top=b+"px":AdfPage.PAGE.getLocaleContext().isRightToLeft()?a.style.right=b+"px":a.style.left=b+"px"};
AdfDhtmlTimelineSeriesPeer.prototype.getElemSize=function(a,b){void 0==b&&(b=this.isVertical());return b?parseInt(a.style.height):parseInt(a.style.width)};AdfDhtmlTimelineSeriesPeer.prototype.setElemSize=function(a,b,c){void 0==c&&(c="px");this.isVertical()?a.style.height=b+c:a.style.width=b+c};AdfDhtmlTimelineSeriesPeer.prototype.getScrollPos=function(a){return this.isVertical()?parseInt(a.scrollTop):this.getTimelinePeer().getElementScrollLeft(a)};
AdfDhtmlTimelineSeriesPeer.prototype.setScrollPos=function(a,b){this.isVertical()?a.scrollTop=b:this.getTimelinePeer().setElementScrollLeft(a,b)};AdfDhtmlTimelineSeriesPeer.prototype.resetScroller=function(){this.getDomElement().scrollTop=0;this.getDatabody().style.height="100%";this.isOverviewAbove()&&(this.getDummyTimeAxis().style.top="0px")};
AdfDhtmlTimelineSeriesPeer.prototype.ReplaceDomElement=function(a,b){if(0<a.id.indexOf(AdfDhtmlTimelineSeriesPeer.DW_SUB_ID)){var c=AdfAgent.AGENT,d=AdfDhtmlTimelineSeriesPeer.findFirstChildByTagName(a,"DIV");if(this._virtInitialized){this.hideStatus();for(var e=c.getIntAttribute(a,"_fetchId",-1),f=this._pendingFetch,g=b.firstChild;g;)this._unregisterNode(g),b.removeChild(g),g=b.firstChild;g=this.getDatabody();if(void 0!=f&&this._pendingId==e){var h=this._pendingRenderOnly,e=this._pendingRenderTimeAxisOnly;
this.cancelPendingFetch();if(c.getBooleanAttribute(a,AdfDhtmlTimelineSeriesPeer._NEEDS_REFRESH_ATTRIBUTE,!1))AdfPage.PAGE.addPartialTargets(this.getComponent());else{if(f==AdfTimelineDataFetchEvent.AT_INDEX_SUBTYPE){this._blockStartPos=parseInt(d.style.left);this._blockEndPos=parseInt(d.style.left)+parseInt(d.style.width);f=g.childNodes;for(h=f.length-1;0<=h;h--){var l=f[h];this._unregisterNode(l);g.removeChild(l)}g.appendChild(d);c.elementsAdded(d);this.resetScroller()}else{this.getElemPos(d)<this._blockStartPos&&
(this._blockStartPos=this.getElemPos(d));this.getElemPos(d)+this.getElemSize(d)>this._blockEndPos&&(this._blockEndPos=this.getElemPos(d)+this.getElemSize(d));f==AdfTimelineDataFetchEvent.AFTER_POS_SUBTYPE?g.appendChild(d):g.insertBefore(d,g.firstChild);c.elementsAdded(d);h&&this.deleteOffscreenBlocks();f=g.childNodes;1==f.length&&this.resetScroller();for(h=0;h<f.length;h++)f[h].style.zIndex=f.length-h+2}AdfDhtmlTimelineSeriesPeer.setCursor(g,"");e?(this.hasTimeAxis()&&(this.isOverviewAbove()?d.firstChild.style.top=
g.firstChild.firstChild.style.top:d.firstChild.style.bottom=g.firstChild.firstChild.style.bottom),this._fetchingTimeAxis=!1):(this.layoutTimelineItems(!1,!1),this.FillViewPort());this.renderOverviewTicks(d);this.updateBlockInfo();if(null!=this._nextOrPrevSelectedItemPos){g=d.childNodes;for(e=0;e<g.length;e++)if(f=g[e],d=c.getAttribute(f,AdfDhtmlTimelineSeriesPeer._ROW_KEY),h=c.getIntAttribute(f,"x"),!(null==h||null==d)&&h==this._nextOrPrevSelectedItemPos){this._selSelectItem(d,f);this.getTimelinePeer().setLastRowKey(d,
f,this.getComponent().getClientId());break}}this._nextOrPrevSelectedItemPos=null;null!=this._overviewSelectItemId&&(c=document.getElementById(this._overviewSelectItemId),null!=c&&(c=this.GetRowKeyAndItem(c,this.getDomElement()),d=c[0],f=c[1],this.doItemSelection(this._isOverviewMultiSelect,d,f),this._isOverviewMultiSelect=this._overviewSelectItemId=null));this._selectItemId=null}}else e==AdfDhtmlTimelineSeriesPeer.AUTO_PPR_FETCH_ID&&void 0==f?this.handleAutoPPRDataFetch(a,a.childNodes,g):e==AdfDhtmlTimelineSeriesPeer.ZOOM_FETCH_ID&&
void 0==f?this.handleZoom(a)||this.updateBlockInfo():e==AdfDhtmlTimelineSeriesPeer.DISCLOSE_FETCH_ID&&void 0==f&&this.handleDisclosure(a)}else this.cancelPendingFetch(),d&&d.firstChild&&(this._blockStartPos=this.getElemPos(d),this._blockEndPos=this._blockStartPos+this.getElemSize(d),this.initVirtualization(d,!1),c.elementsAdded(d),this.layoutTimelineItems(!0,!1),this.renderOverviewTicks(d),this.updateBlockInfo())}else AdfDhtmlTimelineSeriesPeer.superclass.ReplaceDomElement.call(this,a,b)};
AdfDhtmlTimelineSeriesPeer.prototype.updateBlockInfo=function(){var a=this.getComponent();a.setProperty("blockStart",this._blockStartPos,!0,AdfUIComponent.PROPAGATE_ALWAYS);a.setProperty("blockEnd",this._blockEndPos,!0,AdfUIComponent.PROPAGATE_ALWAYS)};
AdfDhtmlTimelineSeriesPeer.prototype.getBlockInfoWithData=function(){for(var a=0,b=0,c=AdfAgent.AGENT,d=this.getDatabody().childNodes,e=0;e<d.length;e++){var f=d[e];if(null==c.getAttribute(f,"_timeAxisOnly")){var g=this.getElemPos(f),f=g+this.getElemSize(f);g<a&&(a=g);f>b&&(b=f)}}return{start:a,end:b}};AdfDhtmlTimelineSeriesPeer.calculateRandomY=function(a,b,c){return Math.floor(Math.random()*(a-b-c))};
AdfDhtmlTimelineSeriesPeer.calculateY=function(a,b,c,d){var e=AdfAgent.AGENT,f=e.getIntAttribute(a,"x",0),g=e.getIntAttribute(a,"y",c),h=e.getIntAttribute(a,"h");null==h&&(h=AdfDhtmlTimelineSeriesPeer.calculateItemHeight(a),a.setAttribute("h",h));for(var l=0;l<b.length;l++)for(var m=b[l].childNodes,n=0;n<m.length;n++){var p=m[n];if(null!=e.getAttribute(p,"x")&&p!=a){var q=e.getIntAttribute(p,"x",0),r=e.getIntAttribute(p,"y",c),v=e.getIntAttribute(p,"w");null==v&&(v=p.firstChild.offsetWidth,p.setAttribute("w",
v));var u=e.getIntAttribute(p,"h");null==u&&(u=AdfDhtmlTimelineSeriesPeer.calculateItemHeight(p),p.setAttribute("h",u));if(f>=q&&f<=q+v&&(g>=r&&g<=r+u||r>=g&&r<=g+h))g=r+u+d,a.setAttribute("y",g),g=AdfDhtmlTimelineSeriesPeer.calculateY(a,b,c,d)}}return g};AdfDhtmlTimelineSeriesPeer.prototype.getInitialItemY=function(a){return a||!this.hasTimeAxis()||this.isOverviewAbove()?this._itemMarginTop:this.getTimelinePeer().getZoomControlSpacing()+this._itemMarginTop};
AdfDhtmlTimelineSeriesPeer.prototype.getTimeAxisWidth=function(){if(null==this._timeAxisWidth){var a=this.getDummyTimeAxis();this._timeAxisWidth=null==a?0:a.offsetWidth}return this._timeAxisWidth};AdfDhtmlTimelineSeriesPeer.prototype.getTimeAxisHeight=function(){if(null==this._timeAxisHeight){var a=this.getDummyTimeAxis();this._timeAxisHeight=null==a?0:a.offsetHeight}return this._timeAxisHeight};AdfDhtmlTimelineSeriesPeer.prototype.getItemHeight=function(a){return AdfDhtmlTimelineSeriesPeer.calculateItemHeight(a)};
AdfDhtmlTimelineSeriesPeer.calculateItemHeight=function(a){var b=!1;AdfDhtmlCommonUtils.containsCSSClassName(a.firstChild,AdfDhtmlTimelineSeriesPeer._SELECTED_CLASS)&&(AdfDhtmlCommonUtils.removeCSSClassName(a.firstChild,AdfDhtmlTimelineSeriesPeer._SELECTED_CLASS),b=!0);var c=a.firstChild.offsetHeight;b&&AdfDhtmlCommonUtils.addCSSClassName(a.firstChild,AdfDhtmlTimelineSeriesPeer._SELECTED_CLASS);return c};
AdfDhtmlTimelineSeriesPeer.prototype.getTipHeight=function(a){null==this._tipHeight&&(AdfDhtmlCommonUtils.containsCSSClassName(a,AdfDhtmlTimelineSeriesPeer._SELECTED_CLASS)&&AdfDhtmlCommonUtils.removeCSSClassName(a,AdfDhtmlTimelineSeriesPeer._SELECTED_CLASS),this._tipHeight=a.offsetHeight);return this._tipHeight};AdfDhtmlTimelineSeriesPeer.prototype.isGroupItem=function(a){return null!=AdfAgent.AGENT.getAttribute(a,"rks")};
AdfDhtmlTimelineSeriesPeer.prototype.layoutTimelineItem=function(a,b,c,d,e,f,g,h,l){var m=this.isVertical(),n=-1,p=AdfAgent.AGENT,q=p.getIntAttribute(e,"x");if(null!=q){c=q-c;if(f)if(q=p.getIntAttribute(e,"h"),null==q){if(q=this.getItemHeight(e),e.setAttribute("h",q),!m)var r=AdfDhtmlTimelineSeriesPeer.calculateRandomY(h,q,this.getTimeAxisHeight())}else return;else r=AdfDhtmlTimelineSeriesPeer.calculateY(e,b,l,this._itemSpacing),q=p.getIntAttribute(e,"h"),null==q&&(q=this.getItemHeight(e),e.setAttribute("h",
q)),b=this.getDatabody(),d=parseInt(b.style.height),"100%"==b.style.height&&(d=h,b.style.height=d+"px"),!this.hasTimeAxis()||this.isOverviewAbove()?(r=d-r-q-this._durationHeight,0>r&&(n=r),this._databodyHeight=Math.max(this._databodyHeight,d-r),r+=this._durationHeight):(q=r+q+this.getTimeAxisHeight()+this._durationHeight,q>d&&(n=q),this._databodyHeight=Math.max(this._databodyHeight,q));if(this.isGroupItem(e)){p.getPlatform()==AdfAgent.WEBKIT_PLATFORM?e.firstChild.style.webkitBoxShadow="none":p.getPlatform()==
AdfAgent.GECKO_PLATFORM?(e.firstChild.style.mozBoxShadow="none",e.firstChild.style.boxShadow="none"):AdfDhtmlTimelineSeriesPeer.isIE9()&&(e.firstChild.style.boxShadow="none");var v=e.lastChild;AdfDhtmlTimelineSeriesPeer.isIE7()?v.style.zIndex=-1:v.style.zIndex=0;v.style.width=e.firstChild.offsetWidth+"px";v.style.height=e.firstChild.offsetHeight+"px";m?v.style.left="1px":this.getTimelinePeer().setElemPos(v,-19);v.style.top="1px";p.setOpacity(v,0)}m?e.style.top=c-this.getItemHeight(e)/2+"px":AdfPage.PAGE.getLocaleContext().isRightToLeft()?
e.style.right=c+"px":e.style.left=c+"px";this.adjustTip(e);c=e.firstChild;0>c.offsetLeft+c.offsetWidth&&(c.style.left="-6px");d=c.nextSibling;p.setOpacity(d,0);q=d.nextSibling;AdfDhtmlTimelineSeriesPeer.isIE7()||AdfDhtmlTimelineSeriesPeer.isIE8()?g||(p.setOpacity(q.firstChild,0),p.setOpacity(q.lastChild,0)):p.setOpacity(q,0);g&&this.updateTimelineItemForOfflineMode(d,q,v);null!=a?(g=this.getAnimationOnDisplay(),g==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_1?(m?this.adjustBubble(e,h):e.style.top=r+"px",
e.setAttribute("animating",!0),p.setOpacity(c,0),m={alpha:100},r={},r.element=c,r.properties=m,a.push(r),null!=v&&(r={},r.element=v,r.properties=m,a.push(r))):g==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_2&&this.supportsCSSTransition()?(e.style.top=r+"px",e.setAttribute("animating",!0),p.setOpacity(e,100),e.style.width=e.firstChild.offsetWidth+"px",e.style.webkitTransform="scale(0)",m={scale:1},r={},r.element=e,r.properties=m,a.push(r)):g==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_3?(e.style.top="0px",e.setAttribute("animating",
!0),p.setOpacity(e,100),m={},m.top=r,r={},r.element=e,r.properties=m,a.push(r)):g==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_4?(this.getDomElement().style.webkitTransform="perspective(800)",e.style.top=r+"px",e.setAttribute("animating",!0),p.setOpacity(e,100),e.style.width=e.firstChild.offsetWidth+"px",e.firstChild.style.webkitTransform="rotateY(270deg)",m={rotate:0},r={},r.element=e.firstChild,r.properties=m,a.push(r)):(e.style.top=r+"px",p.setOpacity(e,100))):null==p.getAttribute(e,"animating")&&(m?
this.adjustBubble(e,h):e.style.top=r+"px",p.setOpacity(e,100),null!=v&&p.setOpacity(v,100))}else if(null==e.getAttribute("_ox")&&void 0!=e.style){q=this.getElemPos(e);if(isNaN(q))return;e.setAttribute("_ox",q);c=q-c;a=0-c;0<a&&(c=0,this.setElemSize(e,Math.max(0,this.getElemSize(e)-a)));m?e.style.top=c+"px":AdfPage.PAGE.getLocaleContext().isRightToLeft()?e.style.right=c+"px":e.style.left=c+"px";a=q+this.getElemSize(e)-d;0<a&&this.setElemSize(e,this.getElemSize(e)-a)}return n};
AdfDhtmlTimelineSeriesPeer.prototype.delayLayoutTimelineItems=function(a){this.layoutTimelineItems(a.animate,a.isAutoPPR);a=this.getDatabody().childNodes;for(var b=0;b<a.length;b++)this.renderOverviewTicks(a[b])};
AdfDhtmlTimelineSeriesPeer.prototype.isImageLoadComplete=function(a){a=a.getElementsByTagName("img");for(var b=AdfAgent.AGENT,c=a.length,d=0;d<c;d++){var e=a[d];if(e)if(e.complete){if(0==e.offsetHeight)return AdfDhtmlTimelineSeriesPeer.INDETERMINATE}else{var f=b.getComputedStyle(e),e=f.width,f=f.height;if("0px"==e||"auto"==e||"0px"==f||"auto"==f)return AdfDhtmlTimelineSeriesPeer.INCOMPLETE}}return AdfDhtmlTimelineSeriesPeer.COMPLETE};
AdfDhtmlTimelineSeriesPeer.prototype.layoutTimelineItems=function(a,b){var c=this.isImageLoadComplete(this.getDatabody());if(c==AdfDhtmlTimelineSeriesPeer.INCOMPLETE&&10>this._incompleteImageTimerAttempts)this._incompleteImageTimerAttempts++,AdfPage.PAGE.scheduleTimer(this,this.delayLayoutTimelineItems,{animate:a,isAutoPPR:b},100);else if(c==AdfDhtmlTimelineSeriesPeer.INDETERMINATE&&1>this._incompleteImageTimerAttempts)this._incompleteImageTimerAttempts++,AdfPage.PAGE.scheduleTimer(this,this.delayLayoutTimelineItems,
{animate:a,isAutoPPR:b},0);else{this._incompleteImageTimerAttempts=0;c=null;a&&(c=[]);var d=this.getDatabody(),e=d.childNodes,f=this.isAllowOverlap(this.getComponent()),g=this.isVertical()?this.getDomElement().offsetWidth:this.getDomElement().offsetHeight,h=this.hasTimeAxis(),l=this.isOverviewAbove(),m=this.isOfflineMode();this._databodyHeight=-1;for(var n=[],p=0;p<e.length;p++)for(var q=e[p],r=this.getElemPos(q),v=r+this.getElemSize(q),q=q.childNodes,u=0;u<q.length;u++){var w=q[u];this.hasDuration(w)&&
n.push(w)}this.prepareDurations(n);for(var y=-1,t=this.getInitialItemY(m),p=0;p<e.length;p++){q=e[p];r=this.getElemPos(q);v=r+this.getElemSize(q);q=q.childNodes;for(u=0;u<q.length;u++)if(w=q[u],w=b?this.layoutTimelineItemForAutoPPR(c,e,r,v,w,g,t):this.layoutTimelineItem(c,e,r,v,w,f,m,g,t),(!h||l)&&w<y||h&&!l&&w>y)y=w}if(h&&!l){if(g=0,-1!=y?(d.style.height=y+"px",g=y-this.getDomElement().offsetHeight):(g=parseInt(e[0].firstChild.style.bottom),isNaN(g)&&(g=0)),0!=g)for(d=0;d<e.length;d++)q=e[d],q.firstChild.style.bottom=
g+"px"}else if(-1!=y){f=0-y;for(h=0;h<e.length;h++){q=e[h];q=q.childNodes;for(l=0;l<q.length;l++)w=q[l],isNaN(parseInt(w.style.top))||(w.style.top=parseInt(w.style.top)+f+"px")}d.style.height=g+f+"px";this.scrollVertical(f)}this.layoutDurations(n);-1!=y&&null!=this._bottomHotspot&&(this._bottomHotspot.style.visibility="visible");b?(AdfDvtAnimator.ANIMATOR.animate(this,c,1E3,null,null),this.showFeelers()):null!=c&&0<c.length?this.startWaveAnimation({animationObjects:c,index:0}):this.showFeelers();
AdfTimelineUtils.supportsTouch()&&(c=this.getScroller(),c.style.overflow="scroll",c.style.webkitOverflowScrolling="touch")}};AdfDhtmlTimelineSeriesPeer.calculateDurationPosition=function(a,b,c,d){return a.parentNode.offsetHeight-c-b-d};AdfDhtmlTimelineSeriesPeer.calculateInvertedDurationPosition=function(a,b,c,d){return-1*c};AdfDhtmlTimelineSeriesPeer.calculateVerticalDurationPosition=function(a,b,c,d){return a.parentNode.offsetWidth-c-b-d};
AdfDhtmlTimelineSeriesPeer.prototype.adjustDurations=function(){var a=this.getDatabody().childNodes;if(this.isVertical())e=AdfDhtmlTimelineSeriesPeer.calculateVerticalDurationPosition,b="width",c="left",d=this.getTimeAxisWidth()-1;else var b="height",c="top",d=this.getTimeAxisHeight()-1,e=!this.hasTimeAxis()||this.isOverviewAbove()?AdfDhtmlTimelineSeriesPeer.calculateInvertedDurationPosition:AdfDhtmlTimelineSeriesPeer.calculateDurationPosition;for(var f=0;f<a.length;f++)for(var g=a[f].childNodes,
h=0;h<g.length;h++){var l=g[h];if(this.hasDuration(l)){var m=l.childNodes[3],n=parseInt(m.style[b]);if(n){var p=parseInt(l.style[c]);m.style[c]=e(l,n,p,d)+"px"}}}};
AdfDhtmlTimelineSeriesPeer.prototype.prepareDurations=function(a){if(null==this._durationColorMap){this._colorCount=0;var b=this.getTimelinePeer().getTimelineOverviewPeer();this._durationColorMap=b?(b=b.getDurationColorMap())?b:{}:{}}for(b=this._maxDurationY=0;b<a.length;b++){var c=a[b],d=AdfAgent.AGENT.getAttribute(c,"id"),e=c.childNodes[3];e._dL=this.calculateDurationY(c,a);null==e._durationFillColor&&(null==this._durationColorMap[d]?(this._durationColorMap[d]=this._colorCount,e._durationFillColor=
AdfDhtmlTimelineSeriesPeer.DURATIONCOLORS[this._colorCount],this._colorCount++,this._colorCount==AdfDhtmlTimelineSeriesPeer.DURATIONCOLORS.length&&(this._colorCount=0)):e._durationFillColor=AdfDhtmlTimelineSeriesPeer.DURATIONCOLORS[this._durationColorMap[d]],e.style.backgroundColor=e._durationFillColor)}this._durationHeight=0==this._maxDurationY?this._itemMarginBottom:10*this._maxDurationY+Math.max(this._itemMarginBottom,40)};
AdfDhtmlTimelineSeriesPeer.prototype.layoutDurations=function(a){if(!this.hasTimeAxis()||this.isOverviewAbove())for(var b=0;b<a.length;b++){var c=a[b],d=c.childNodes[3];d.style.zIndex=100-d._dL;var e=AdfAgent.AGENT.getIntAttribute(c,"x2")-AdfAgent.AGENT.getIntAttribute(c,"x");d.style.width=e+"px";e=Math.min(10,e/2);for(j=0;3>j;j++){var f=c.childNodes[j];f.style.marginLeft=e+"px"}(f=c.childNodes[4])&&(f.style.marginLeft=e+"px");e=18+10*d._dL;d.style.height=e+"px";d.style.top=-1*parseInt(c.style.top)+
"px"}else if(this.isVertical())for(b=0;b<a.length;b++)c=a[b],d=c.childNodes[3],d.style.zIndex=100-d._dL,e=AdfAgent.AGENT.getIntAttribute(c,"x2")-AdfAgent.AGENT.getIntAttribute(c,"x"),d.style.height=e+"px",e=18+10*d._dL,d.style.width=e+"px",d.style.top=this.getItemHeight(c)/2+"px",d.style.left=c.parentNode.offsetWidth-parseInt(c.style.left)-e-this.getTimeAxisWidth()-1+"px";else for(b=0;b<a.length;b++){c=a[b];d=c.childNodes[3];d.style.zIndex=100-d._dL;e=AdfAgent.AGENT.getIntAttribute(c,"x2")-AdfAgent.AGENT.getIntAttribute(c,
"x");d.style.width=e+"px";e=Math.min(10,e/2);for(j=0;3>j;j++)f=c.childNodes[j],f.style.marginLeft=e+"px";(f=c.childNodes[4])&&(f.style.marginLeft=e+"px");e=18+10*d._dL;d.style.height=e+"px";d.style.top=c.parentNode.offsetHeight-parseInt(c.style.top)-e-this.getTimeAxisHeight()-1+"px"}};
AdfDhtmlTimelineSeriesPeer.prototype.calculateDurationY=function(a,b){var c=b.length,d=AdfAgent.AGENT.getIntAttribute(a,"x"),e=a.childNodes[3],f=e._dL;null==f&&(f=1);for(var g=0;g<c;g++){var h=b[g];if(h!=a){var l=h.childNodes[3],m=AdfAgent.AGENT.getIntAttribute(h,"x2");null!=m&&(h=AdfAgent.AGENT.getIntAttribute(h,"x"),l=l._dL,null==l&&(l=1),d>=h&&(d<=m&&f==l)&&(f=l+1,e._dL=f,f=this.calculateDurationY(a,b)))}}f>this._maxDurationY&&(this._maxDurationY=f);return f};
AdfDhtmlTimelineSeriesPeer.prototype.hasDuration=function(a){return 3<a.childNodes.length?(a=AdfAgent.AGENT.getAttribute(a.childNodes[3],"id"))&&-1!==a.indexOf("duration",a.length-8):!1};
AdfDhtmlTimelineSeriesPeer.prototype.startWaveAnimation=function(a){var b=a.animationObjects,c=a.index;if(c==b.length)this.getAnimationOnDisplay()==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_4&&(this.getDomElement().style.webkitTransform=""),a=AdfAgent.AGENT,(a.getPlatform()==AdfAgent.GECKO_PLATFORM||14<=parseInt(a.getVersion()))&&AdfPage.PAGE.scheduleTimer(this,this.fixTipForGecko,null,1E3);else{a=AdfPage.PAGE;var d=[],e=b[c].element.parentNode,f=this.isOfflineMode();this.getAnimationOnDisplay()==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_4&&
(e=e.parentNode);d.push(b[c]);AdfDvtAnimator.ANIMATOR.animate(this,d,1E3,null,null,f);d=1E3/Math.max(1,b.length);a.scheduleTimer(this,this.startWaveAnimation,{animationObjects:b,index:c+1},d);b=this.getDatabody().offsetHeight;c=1E3;this.getAnimationOnDisplay()==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_1?c=450:this.getAnimationOnDisplay()==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_4&&(c=850);a.scheduleTimer(this,this.delayShowFeelerForItem,{item:e,databodyHeight:b},c)}};
AdfDhtmlTimelineSeriesPeer.prototype.showFeelers=function(){for(var a=this.getDatabody(),b=a.childNodes,a=a.offsetHeight,c=0;c<b.length;c++)this.showFeelersForBlock(b[c],a)};AdfDhtmlTimelineSeriesPeer.prototype.showFeelersForBlock=function(a,b){for(var c=AdfAgent.AGENT,d=a.childNodes,e=0;e<d.length;e++){var f=d[e];null==c.getAttribute(f,"animating")&&this.showFeelerForItem(f,b)}};
AdfDhtmlTimelineSeriesPeer.prototype.adjustFeelerHeight=function(a){for(var b=AdfAgent.AGENT,c=this.getDatabody().childNodes,d=0;d<c.length;d++)for(var e=c[d].childNodes,f=0;f<e.length;f++){var g=e[f];null!=b.getIntAttribute(g,"x")&&(g=g.childNodes[1],g.style.height=parseInt(g.style.height)+a+"px")}};AdfDhtmlTimelineSeriesPeer.prototype.delayShowFeelerForItem=function(a){var b=a.item;a=a.databodyHeight;AdfAgent.AGENT.setOpacity(b.childNodes[2],0);this.showFeelerForItem(b,a)};
AdfDhtmlTimelineSeriesPeer.prototype.adjustTip=function(a){var b=a.childNodes[2],c=AdfAgent.AGENT.getIntAttribute(a,"h");if(null!=c&&this.hasTimeAxis()){var d=this.getTipHeight(b);this.isVertical()?AdfDhtmlTimelineSeriesPeer.isIE7()||AdfDhtmlTimelineSeriesPeer.isIE8()?b.style.left=a.firstChild.offsetWidth+"px":(b.style.left=a.firstChild.offsetWidth-d/2+"px",b.style.top=c/2-d/2+1+"px"):b.style.top=c-d/2+"px"}};
AdfDhtmlTimelineSeriesPeer.prototype.adjustBubbles=function(a){for(var b=AdfAgent.AGENT,c=this.getDatabody().childNodes,d=0;d<c.length;d++)for(var e=c[d].childNodes,f=0;f<e.length;f++){var g=e[f];null!=b.getIntAttribute(g,"x")&&this.adjustBubble(g,a)}};AdfDhtmlTimelineSeriesPeer.prototype.adjustBubble=function(a,b){a.style.left=b-a.firstChild.offsetWidth-this.getTimeAxisWidth()-8-this._durationHeight+"px"};
AdfDhtmlTimelineSeriesPeer.prototype.showFeelerForItem=function(a,b){var c=AdfAgent.AGENT;if(null==c.getIntAttribute(a,"x"))return 0;var d=a.childNodes[1],e=a.childNodes[2],c=c.getIntAttribute(a,"h");if(null!=c){var f=this.getTipHeight(e);!this.hasTimeAxis()||this.isOverviewAbove()?(c=parseInt(a.style.top),AdfDhtmlTimelineSeriesPeer.isIE7()||AdfDhtmlTimelineSeriesPeer.isIE8()?d.style.top=0-c-7+"px":d.style.top=0-c+"px",d.style.height=Math.max(0,c-2)+"px"):this.isVertical()||(d.style.top=c+f/2+"px",
d.style.height=b+"px");var c=[],f={alpha:100},g={};g.element=d;g.properties=f;c.push(g);g={};g.element=e;g.properties=f;c.push(g);d=this.isOfflineMode();if((AdfDhtmlTimelineSeriesPeer.isIE7()||AdfDhtmlTimelineSeriesPeer.isIE8())&&!d)g={},g.element=e.firstChild,g.properties=f,c.push(g),g={},g.element=e.lastChild,g.properties=f,c.push(g);AdfDvtAnimator.ANIMATOR.animate(this,c,2E3,null,null,d)}a.removeAttribute("animating");a.style.width=""};
AdfDhtmlTimelineSeriesPeer.prototype.fixTipForGecko=function(){this.getScroller().parentNode.parentNode.style.maxHeight="0px"};AdfDhtmlTimelineSeriesPeer.prototype.getScroller=function(){return this.getDomElement().parentNode};AdfDhtmlTimelineSeriesPeer.prototype._unregisterNode=function(a){AdfPage.PAGE.removeComponentsInSubtree(a);AdfAgent.AGENT.elementsRemoved(a)};
AdfDhtmlTimelineSeriesPeer.prototype.initVirtualization=function(a,b){this.hideStatus();this._virtInitialized=!0;var c=this.getDatabody();if(!b){for(var d=c.childNodes,e=d.length-1;0<=e;e--)c.removeChild(d[e]);c.appendChild(a)}this._updateComponentSelectionState(a);this.getTimelinePeer().restoreScrollPosition();AdfDhtmlTimelineSeriesPeer.setCursor(c,"");this.FillViewPort()};AdfDhtmlTimelineSeriesPeer.prototype.needsResizeNotify=function(a){return!0};
AdfDhtmlTimelineSeriesPeer.prototype.ResizeNotify=function(a,b,c,d){this._registered||(this.getTimelinePeer().registerTimelineSeriesPeer(this),this._registered=!0);var e=this.getDomElement().parentNode.childNodes.length;this.isVertical()?this.getDomElement().style.width=100/e+"%":this.getDomElement().style.height=100/e+"%";e=this.getDatabody();AdfDhtmlTimelineSeriesPeer.isIE7()&&(e.style.zIndex=2);AdfTimelineUtils.supportsTouch()?e.style.zIndex=2:this.renderAutoScrollHotspots();if(this._virtInitialized)if(this.isVertical())a!=
c&&this.adjustBubbles(c);else{if(a!=c&&this.FillViewPort(),b!=d){this.adjustFeelerHeight(d-b);e.style.height=d>this._databodyHeight?d+"px":this._databodyHeight+"px";if(this.hasTimeAxis()){c=parseInt(e.style.height)-d-this.getDomElement().scrollTop;a=e.childNodes;for(d=0;d<a.length;d++)b=a[d],b.firstChild.style.bottom=c+"px"}this.adjustDurations();a=e.childNodes;for(e=0;e<a.length;e++)b=a[e],this.renderOverviewTicks(b)}}else if(this.isImmediateContentDelivery(this.getComponent()))b=e.firstChild,this._blockStartPos=
parseInt(b.style.left),this._blockEndPos=this._blockStartPos+parseInt(b.style.width),null!=b&&0<b.childNodes.length?(this.initVirtualization(b,!0),this.layoutTimelineItems(!0,!1),this.renderOverviewTicks(b)):(this.addEmptyTextToDataBody(e,e),this._isEmpty=!0),this.updateBlockInfo();else if(!this._firstBlockRequested&&(this._firstBlockRequested=!0,e=this.getComponent(),(AdfPage.PAGE.isStreamingDisabled()||!AdfPage.PAGE.isStreamingRequestPending(e.getClientId()))&&!this.queueFetchEvent(!0,AdfTimelineDataFetchEvent.INITIAL_SUBTYPE,
-1,!1)))AdfDhtmlTimelineSeriesPeer.setCursor(this.getDatabody(),"wait"),this.displayStatus()};
AdfDhtmlTimelineSeriesPeer.prototype.renderAutoScrollHotspots=function(){var a=AdfAgent.AGENT,b=this.getDomElement(),c=this.getTimelinePeer(),d=this.isVertical(),e=AdfPage.PAGE.getLocaleContext().isRightToLeft(),f=this.isOverviewAbove()?this.getTimelineOverviewPeer().getDomElement().offsetHeight:0,g=d?this.getTimelinePeer().getZoomControlSpacing():0,h=b.offsetHeight,l=b.offsetWidth,m=b.offsetTop,n=b.offsetLeft;if(null==this._leftHotspot){this._leftHotspot=document.createElement("div");this._leftHotspot.hotspot=
"leftMost";this._leftHotspot.style.zIndex=998;this._leftHotspot.style.position="absolute";this._innerLeftHotspot=this._leftHotspot.cloneNode(!1);this._innerLeftHotspot.style.zIndex=4;this._innerLeftHotspot.hotspot="left";d?this._innerLeftHotspot.style.top="22px":e?this._innerLeftHotspot.style.right="24px":this._innerLeftHotspot.style.left="24px";this._leftHotspot.style.visibility="hidden";var p=document.createElement("div");p.className=a.getAttribute(b,"_laic");this._leftHotspot.appendChild(p);c.getDomElement().appendChild(this._leftHotspot);
c.getDomElement().appendChild(this._innerLeftHotspot)}d?(this._leftHotspot.style.top="0px",this._leftHotspot.style.left=n+"px",this._leftHotspot.style.width=l-this.getTimeAxisWidth()+"px",this._leftHotspot.style.height="22px"):(this._leftHotspot.style.top=m+f+"px",e?this._leftHotspot.style.right="0px":this._leftHotspot.style.left="0px",this._leftHotspot.style.width="24px",this._leftHotspot.style.height=h-this.getTimeAxisHeight()+"px");d?this._innerLeftHotspot.style.left=this._leftHotspot.style.left:
this._innerLeftHotspot.style.top=this._leftHotspot.style.top;this._innerLeftHotspot.style.width=this._leftHotspot.style.width;this._innerLeftHotspot.style.height=this._leftHotspot.style.height;null==this._rightHotspot&&(this._rightHotspot=document.createElement("div"),this._rightHotspot.hotspot="rightMost",this._rightHotspot.style.zIndex=998,this._rightHotspot.style.position="absolute",this._innerRightHotspot=this._rightHotspot.cloneNode(!1),this._innerRightHotspot.style.zIndex=4,this._innerRightHotspot.hotspot=
"right",d?this._innerRightHotspot.style.bottom=22+g+"px":e?this._innerRightHotspot.style.left="24px":this._innerRightHotspot.style.right="24px",p=document.createElement("div"),p.className=a.getAttribute(b,"_raic"),this._rightHotspot.appendChild(p),c.getDomElement().appendChild(this._rightHotspot),c.getDomElement().appendChild(this._innerRightHotspot));d?(this._rightHotspot.style.bottom=g+"px",this._rightHotspot.style.left=n+"px",this._rightHotspot.style.width=l-this.getTimeAxisWidth()+"px",this._rightHotspot.style.height=
"22px"):(this._rightHotspot.style.top=m+f+"px",e?this._rightHotspot.style.left="0px":this._rightHotspot.style.right="0px",this._rightHotspot.style.width="24px",this._rightHotspot.style.height=h-this.getTimeAxisHeight()+"px");d?this._innerRightHotspot.style.right=this._rightHotspot.style.right:this._innerRightHotspot.style.top=this._rightHotspot.style.top;this._innerRightHotspot.style.width=this._rightHotspot.style.width;this._innerRightHotspot.style.height=this._rightHotspot.style.height;d||(null==
this._topHotspot&&(this._topHotspot=document.createElement("div"),this._topHotspot.hotspot="top",this._topHotspot.seriesId=b.id,this._topHotspot.style.zIndex=998,this._topHotspot.style.position="absolute",this._topHotspot.style.left="0px",this._topHotspot.style.height="22px",this._topHotspot.style.width="100%",this.hasTimeAxis()&&(this._topHotspot.style.visibility="hidden"),p=document.createElement("div"),p.className=a.getAttribute(b,"_taic"),this._topHotspot.appendChild(p),c.getDomElement().appendChild(this._topHotspot)),
this._topHotspot.style.top=m+f+"px",null==this._bottomHotspot&&(this._bottomHotspot=document.createElement("div"),this._bottomHotspot.hotspot="bottom",this._bottomHotspot.seriesId=b.id,this._bottomHotspot.style.position="absolute",this._bottomHotspot.style.zIndex=998,this._bottomHotspot.style.left="0px",this._bottomHotspot.style.height="22px",this._bottomHotspot.style.width="100%",this.hasTimeAxis()&&(this._bottomHotspot.style.visibility="hidden"),p=document.createElement("div"),p.className=a.getAttribute(b,
"_baic"),this._bottomHotspot.appendChild(p),c.getDomElement().appendChild(this._bottomHotspot)),this.hasTimeAxis()?this._bottomHotspot.style.top=m+h-this.getTimeAxisHeight()-22+f+"px":this._bottomHotspot.style.top=m+h-22+f+"px",this.getDatabody().offsetHeight>h?this._bottomHotspot.style.visibility="visible":this._bottomHotspot.style.visibility="hidden")};
AdfDhtmlTimelineSeriesPeer.prototype.hideHotspots=function(a){if(!this._hotspotsHidden&&!(null==this._leftHotspot||null==this._rightHotspot)){if(a)a=AdfAgent.AGENT,a.setOpacity(this._leftHotspot,0),a.setOpacity(this._rightHotspot,0),null!=this._topHotspot&&null!=this._bottomHotspot&&(a.setOpacity(this._topHotspot,0),a.setOpacity(this._bottomHotspot,0));else{a=[];var b={alpha:0},c={};c.element=this._rightHotspot;c.properties=b;a.push(c);c={};c.element=this._leftHotspot;c.properties=b;a.push(c);null!=
this._topHotspot&&null!=this._bottomHotspot&&(c={},c.element=this._topHotspot,c.properties=b,a.push(c),c={},c.element=this._bottomHotspot,c.properties=b,a.push(c));AdfPage.PAGE.scheduleTimer(this,this.hotspotsFadeOutDelay,{animationObjects:a},1E3)}this._hotspotsHidden=!1}};AdfDhtmlTimelineSeriesPeer.prototype.hotspotsFadeOutDelay=function(a){AdfDvtAnimator.ANIMATOR.animate(this,a.animationObjects,1E3,null,null)};
AdfDhtmlTimelineSeriesPeer.prototype.showHotspots=function(){if(!this.isGlassPaneReady()&&!(null==this._leftHotspot||null==this._rightHotspot)){var a=AdfAgent.AGENT;a.setOpacity(this._leftHotspot,100);a.setOpacity(this._rightHotspot,100);null!=this._topHotspot&&null!=this._bottomHotspot&&(a.setOpacity(this._topHotspot,100),a.setOpacity(this._bottomHotspot,100));this._hotspotsHidden=!1}};AdfDhtmlTimelineSeriesPeer.prototype.showThenHideHotspots=function(){};
AdfDhtmlTimelineSeriesPeer.prototype.adjustOverviewTicks=function(a){var b=AdfAgent.AGENT.getAttribute(this.getDomElement(),"_ovlc"),c=20,d=this.getOverviewLabels(a);this.hasTimeAxis()&&(a=parseInt(a.firstChild.style.bottom),isNaN(a)||(c+=a));d=d.childNodes;for(a=0;a<d.length;a++)AdfDhtmlCommonUtils.containsCSSClassName(d[a],b)&&(d[a].style.bottom=c+"px")};
AdfDhtmlTimelineSeriesPeer.prototype.renderOverviewTicks=function(a){var b=this.getTimelineOverviewPeer();if(null!=b){var c=AdfAgent.AGENT,d=this.getTimelinePeer().getDomElement(),e=c.getIntAttribute(d,"start"),f=c.getIntAttribute(d,"end"),g=c.getIntAttribute(d,"width"),h=this.hasTimeAxis(),d=c.getAttribute(d,"_ovi"),l=this.isVertical(),m=this.getOverviewLabels(a);m.innerHTML="";if(l)var n=0;else{var p=20;if(h){var q=parseInt(a.firstChild.style.bottom);isNaN(q)||(p+=q)}}q=b.GetTimeAxis();if(AdfDhtmlTimelineSeriesPeer.isIE8()||
AdfDhtmlTimelineSeriesPeer.isIE7())q=q.cloneNode(!0),b=q.innerHTML,b=b.replace(/<TICKS/g,"\x3cDIV"),b=b.replace(/TICKS>/g,"DIV\x3e"),b=b.replace(/<TICK/g,"\x3cDIV"),b=b.replace(/TICK>/g,"DIV\x3e"),q.innerHTML=b;for(var b=c.getAttribute(this.getDomElement(),"_ovlc"),q=q.firstChild.childNodes,r=0;r<q.length;r++){var v=q[r],u=c.getIntAttribute(v,"time"),v=c.getAttribute(v,"label"),u=AdfTimelineUtils.getDatePosition(e,f,u,g),w=this.getElemPos(a),y=w+this.getElemSize(a);if(u>=w&&u<=y){y=document.createElement("div");
y.className=d;this.setElemPos(y,u-w);var t=-1;r+1<q.length&&(t=c.getIntAttribute(q[r+1],"time"),t=AdfTimelineUtils.getDatePosition(e,f,t,g));var A=document.createElement("div");l?A.style.left=n+"px":A.style.bottom=p+"px";A.className=b;this.setElemPos(A,u-w+2);-1!=t&&this.setElemSize(A,t-u);h&&(A.innerHTML=v);m.appendChild(y);m.appendChild(A)}}}};AdfDhtmlTimelineSeriesPeer.prototype.addEmptyTextToDataBody=function(a,b){};
AdfDhtmlTimelineSeriesPeer.prototype.getDatabody=function(){return AdfAgent.AGENT.getElementById(AdfRichUIPeer.CreateSubId(this.getComponent().getClientId(),"inner"))};
AdfDhtmlTimelineSeriesPeer.prototype.queueFetchEvent=function(a,b,c,d){var e=this._fetchId++,f=this.getComponent();c=new AdfTimelineDataFetchEvent(f,e,b,c);c.setPartial(!0);c.setRenderOnly(a);c.setRenderTimeAxisOnly(d);var g=!1;a?AdfPage.PAGE.queueEventToServer(c):(f.queueEvent(c),g=c.isCanceled());g?this.hideStatus():(this._pendingFetch=b,this._pendingId=e,this._pendingRenderOnly=a,this._pendingRenderTimeAxisOnly=d,this.displayStatus(),AdfDhtmlTimelineSeriesPeer.setCursor(this.getDatabody(),"wait"));
return g?null:c};AdfDhtmlTimelineSeriesPeer.prototype.isAllowOverlap=function(a){return this.getTimelinePeer().isAllowOverlap(a.getParent())};AdfDhtmlTimelineSeriesPeer.prototype.isOfflineMode=function(){return this.getTimelinePeer().isOfflineMode()};AdfDhtmlTimelineSeriesPeer.prototype.isImmediateContentDelivery=function(a){return this.isOfflineMode()?!0:"immediate"==a.getContentDelivery()};AdfDhtmlTimelineSeriesPeer.setCursor=function(a,b){a&&a.style.cursor!=b&&(a.style.cursor=b)};
AdfDhtmlTimelineSeriesPeer.prototype.hideStatus=function(){this.getTimelinePeer().hideStatus()};AdfDhtmlTimelineSeriesPeer.prototype.displayStatus=function(){this.getTimelinePeer().displayStatus()};AdfDhtmlTimelineSeriesPeer.findFirstChildByTagName=function(a,b){AdfAssert.assert(null!=a,"Timeline peer cannot find first child by tag name if the parent is null!");for(var c=a.childNodes,d=0;d<c.length;d++)if(b==c[d].tagName)return c[d];return null};
AdfDhtmlTimelineSeriesPeer.prototype.handleTouchMovement=function(a,b){};AdfDhtmlTimelineSeriesPeer.prototype.isOwnComponentEvent=function(a){a=a.getSource();for(var b=this.getComponent(),c=!1;!c&&a;)if(a==b)c=!0;else{if(a instanceof AdfRichTimeline||a instanceof AdfUIPopup)break;a=a.getParent()}return c};
AdfDhtmlTimelineSeriesPeer.prototype._isTargetCellEditable=function(a){for(var b=AdfAgent.getAgent(),c,d=this.getDomElement(),e=AdfDhtmlTimelineSeriesPeer._INPUT_REGEXP;null!=a&&a!=d&&"TD"!=(c=b.getNodeName(a))&&"TH"!=c;){var f=a.getAttribute("tabIndex",2);if(null!=f&&0<=f&&32768!=f||c.match(e)&&-1!=f)return!0;a=a.parentNode}return!1};
AdfDhtmlTimelineSeriesPeer.prototype.deleteOffscreenBlocks=function(){var a=this.getDatabody();if(this.isVertical())var b=this.getScroller().scrollTop,c=b+this.getScroller().offsetHeight;else b=this.getTimelinePeer().getElementScrollLeft(this.getScroller()),c=b+this.getScroller().offsetWidth;this._blockEndPos=this._blockStartPos=-1;for(var d=a.childNodes,e=d.length-1;0<=e;e--){var f=d[e],g=this.getElemPos(f),h=g+this.getElemSize(f);if(g>c||h<b)this._unregisterNode(f),a.removeChild(f);else{if(-1==
this._blockStartPos||-1<this._blockStartPos&&g<this._blockStartPos)this._blockStartPos=g;if(-1==this._blockEndPos||-1<this._blockEndPos&&h>this._blockEndPos)this._blockEndPos=h}}};
AdfDhtmlTimelineSeriesPeer.prototype.GetRowKeyAndItem=function(a,b){AdfAssert.assertDomElement(a);var c=a,d=AdfAgent.AGENT;if(null==c||1!=c.nodeType)return null;for(var e=d.getAttribute(c,AdfDhtmlTimelineSeriesPeer._ROW_KEY);null==e;){if(null==c||c==b)return null;c=c.parentNode;if(null==c||1!=c.nodeType)return null;e=d.getAttribute(c,AdfDhtmlTimelineSeriesPeer._ROW_KEY)}return a.id==AdfRichUIPeer.CreateSubId(c.id,"connector")||a.id==AdfRichUIPeer.CreateSubId(c.id,"tip")?null:[e,c]};
AdfDhtmlTimelineSeriesPeer.prototype.FillViewPort=function(){var a=this.getDatabody(),b=this.getElemOffset(this.getTimelinePeer().getDomElement());this._fillViewPort(a,b,!1)};
AdfDhtmlTimelineSeriesPeer.prototype._fillViewPort=function(a,b,c,d){c=AdfDhtmlTimelineSeriesPeer.VIEWPORT_SATISFIED;0<b&&(c=this._isViewportSatisfied(a,b),c==AdfDhtmlTimelineSeriesPeer.VIEWPORT_SATISFIED?(this.hideStatus(),AdfDhtmlTimelineSeriesPeer.setCursor(a,"")):c&AdfDhtmlTimelineSeriesPeer.MISSING_BEFORE?(b=this.queueFetchEvent(!0,AdfTimelineDataFetchEvent.BEFORE_POS_SUBTYPE,this._blockStartPos,!1),b||(AdfDhtmlTimelineSeriesPeer.setCursor(a,"wait"),this.displayStatus())):c&AdfDhtmlTimelineSeriesPeer.MISSING_AFTER&&
(b=this.queueFetchEvent(!0,AdfTimelineDataFetchEvent.AFTER_POS_SUBTYPE,this._blockEndPos,!1),b||(AdfDhtmlTimelineSeriesPeer.setCursor(a,"wait"),this.displayStatus())));return c};
AdfDhtmlTimelineSeriesPeer.prototype._isViewportSatisfied=function(a,b){var c=AdfAgent.AGENT,d=this.getTimelinePeer().getDomElement(),c=c.getIntAttribute(d,"width"),d=Math.max(0,this.getScrollPos(this.getScroller())),e=d+b;if(e>=c&&this._blockEndPos>=c&&d>=this._blockStartPos)return 0==d&&this.resizeDatabody(b,!0,!1),AdfDhtmlTimelineSeriesPeer.VIEWPORT_SATISFIED;var f=AdfDhtmlTimelineSeriesPeer.VIEWPORT_SATISFIED;this._blockEndPos<e&&c>this._blockEndPos&&(f|=AdfDhtmlTimelineSeriesPeer.MISSING_AFTER);
this._blockStartPos>d&&(f|=AdfDhtmlTimelineSeriesPeer.MISSING_BEFORE);f!=AdfDhtmlTimelineSeriesPeer.VIEWPORT_SATISFIED&&this._blockEndPos<d&&(f=AdfDhtmlTimelineSeriesPeer.NO_BLOCKS);return f};AdfDhtmlTimelineSeriesPeer.prototype.cancelPendingFetch=function(){this._pendingRenderTimeAxisOnly=this._pendingRenderOnly=this._pendingId=this._pendingFetch=void 0;this.getTimelinePeer().cancelPendingFetch()};
AdfDhtmlTimelineSeriesPeer.prototype.getBlockSize=function(){var a=this.getDatabody().childNodes;if(0<a.length)return parseInt(a[0].style.width)};
AdfDhtmlTimelineSeriesPeer.prototype.scrollVertical=function(a){var b=this.getDomElement();b.scrollTop+=a;var c=this.getDatabody(),d=c.childNodes,e=parseInt(c.offsetHeight)-b.offsetHeight;b.scrollTop>e&&(b.scrollTop=e);var f=this.getDummyTimeAxis(),g=this.isOverviewAbove(),h=c=0;0>a&&0==b.scrollTop?(c=e,h=0,null!=this._topHotspot&&(this._topHotspot.style.visibility="hidden"),this.cancelAutoScroll()):0<a&&b.scrollTop==e?(c=g?e:0,h=g?e:0-e,null!=this._bottomHotspot&&(this._bottomHotspot.style.visibility=
"hidden"),this.cancelAutoScroll()):(e=this.getTimeAxis(d[0]),null==e&&(e=this.getOverviewLabels(d[0])),c=g?Math.max(0,parseInt(e.style.top)-a):Math.max(0,parseInt(e.style.bottom)-a),h=g?b.scrollTop:0-b.scrollTop,null!=this._topHotspot&&null!=this._bottomHotspot&&(this._topHotspot.style.visibility="visible",this._bottomHotspot.style.visibility="visible"));if(null!=f){for(a=0;a<d.length;a++)block=d[a],e=this.getTimeAxis(block),g?e.style.top=c+"px":e.style.bottom=c+"px";g?f.style.top=h+"px":f.style.bottom=
h+"px"}for(a=0;a<d.length;a++)if(block=d[a],b=this.getOverviewLabels(block),null!=b){b=b.childNodes;for(f=0;f<b.length;f++)g=b[f],"span"==g.nodeName.toLowerCase()&&(g.style.bottom=c+20+"px")}};AdfDhtmlTimelineSeriesPeer.prototype.setOverviewSelectItemId=function(a,b){this._overviewSelectItemId=a;this._isOverviewMultiSelect=b};
AdfDhtmlTimelineSeriesPeer.prototype.horizontalScrollItemIntoView=function(a,b){var c=this.getElemPos(a.parentNode),d=this.getScroller(),e=this.getScrollPos(d),f=this.getElemPos(a);if(c+f<e)c=(c+f-e-20)/5,this.repeatScrollHorizontal({increment:c,counter:5,speed:1});else{var d=d.offsetWidth,g=AdfAgent.AGENT.getIntAttribute(a,"w");if(null==g){if(b)return;g=a.firstChild.offsetWidth}g>d&&(g=10);c=c+f+g-(e+d);0<c&&(c/=5,this.repeatScrollHorizontal({increment:c,counter:5,speed:1}))}};
AdfDhtmlTimelineSeriesPeer.prototype.scrollItemIntoView=function(a,b){var c=this.getDomElement();if(parseInt(a.style.top)<c.scrollTop){var c=c.scrollTop-parseInt(a.style.top)+this.getTimelinePeer().getZoomControlSpacing()+this._itemMarginTop,d=Math.floor(c/5),e=c%5;this.showOrHideTimeAxis(!0);this.repeatScrollVertical({increment:-d,reminder:e,counter:5,speed:1})}else{d=AdfAgent.AGENT.getIntAttribute(a,"h");if(null==d)return;c=parseInt(a.style.top)+d-(c.scrollTop+parseInt(c.parentNode.style.height))+
this.getTimeAxisHeight()+5;d=Math.floor(c/5);e=c%5;0<c&&(this.showOrHideTimeAxis(!0),this.repeatScrollVertical({increment:d,reminder:e,counter:5,speed:1}))}b||this.horizontalScrollItemIntoView(a,!0)};AdfDhtmlTimelineSeriesPeer.prototype.HandleComponentClick=function(a){if(this.isOwnComponentEvent(a)){var b=a.getNativeEvent();(b=AdfAgent.AGENT.getEventTarget(b))&&this.handleTargetClick(b,a)}};
AdfDhtmlTimelineSeriesPeer.prototype.handleTargetClick=function(a,b){var c=AdfAgent.AGENT,d=this.GetRowKeyAndItem(a,this.getDomElement());if(null!=d){var e=d[0],d=d[1];if(null!=e&&(null!=b&&b.isLeftButtonPressed()||AdfTimelineUtils.supportsTouch()))!this.isGlassPaneReady()&&null!=c.getAttribute(d,"rks")?this.handleGroupClick(e,d):(c=null,null!=b&&(c=b.getNativeEvent()),this.handleItemClick(c,e,d))}else this.getTimelinePeer().selUnselectAllForAllSeries(),c.getPlatform()==AdfAgent.IE_PLATFORM?this.getDomElement().setActive():
this.getDomElement().focus()};AdfDhtmlTimelineSeriesPeer.prototype.ComponentSelectedRowKeysChanged=function(a,b,c,d){return!0};AdfDhtmlTimelineSeriesPeer.prototype.getItemForEvent=function(a){a=a.getNativeEventTarget();a=this.GetRowKeyAndItem(a,this.getDomElement());return null!=a?a[1]:null};
AdfDhtmlTimelineSeriesPeer.prototype.getTransferable=function(a,b){var c=a.getNativeEventTarget(),c=this.GetRowKeyAndItem(c,this.getDomElement());if(b&&b.length&&(c=c[0])){var d=[],e=[],f=AdfDataFlavor.getRowKeyDataFlavor(b);e.push([c]);d.push(f);return new AdfObjectTransferable(e,d)}return null};
AdfDhtmlTimelineSeriesPeer.prototype.getDragOffsetForRowKey=function(a){var b=a.getNativeEventTarget(),c=this.getDomElement(),d=this.GetRowKeyAndItem(b,c),e=b=0,c=AdfAgent.AGENT;null!=d&&(b=d[1],d=c.getElementPosition(b.firstChild),a=c.getMousePosition(a.getNativeEvent()),b=a.x-d.x-b.firstChild.offsetWidth,e=a.y-d.y);return{x:b,y:e}};
AdfDhtmlTimelineSeriesPeer.prototype.initiateDrag=function(a,b){AdfDhtmlTimelineSeriesPeer.superclass.initiateDrag.call(this,a,b);this.getTimelinePeer()._isScrollingDisabled=!0};AdfDhtmlTimelineSeriesPeer.prototype.stopDrag=function(){this.getTimelinePeer()._isScrollingDisabled=!1};
AdfDhtmlTimelineSeriesPeer.prototype.HandleComponentDrop=function(a){var b=AdfAgent.AGENT,c=this.getTimelinePeer().getDomElement(),d=b.getIntAttribute(c,"width"),e=b.getIntAttribute(c,"start"),b=b.getIntAttribute(c,"end");a=a.GetParams();a.dropSite=new Date(AdfTimelineUtils.getPositionDate(e,b,a.dropX,d));a.dropSiteIndex=0};
AdfDhtmlTimelineSeriesPeer.prototype.hasRefreshAutoPPRBlock=function(a){for(var b=AdfAgent.AGENT,c=0;c<a.length;c++)if(b.getIntAttribute(a[c],"_autopprBlock",-1)==AdfDhtmlTimelineSeriesPeer.AUTO_PPR_REFRESH_BLOCK)return a[c];return null};
AdfDhtmlTimelineSeriesPeer.prototype.handleAutoPPRDataFetch=function(a,b,c){var d=this.hasRefreshAutoPPRBlock(b);a=AdfAgent.AGENT;if(d)return this.handleAutoPPRRefresh(d,c),!1;var d=[],e=null;this.getAnimationOnDataChange()==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_2&&this.supportsCSSTransition()&&(e=[]);var f=null;this.supportsCSSTransition()&&(f=[]);for(var g=[],h=0;h<b.length;h++){var l=a.getIntAttribute(b[h],"_autopprBlock",-1);this._updateComponentSelectionState(b[h]);switch(l){case AdfDhtmlTimelineSeriesPeer.AUTO_PPR_INSERT_BLOCK:l=
b[h].firstChild;this.handleAutoPPRInsert(d,l,c);null!=e&&e.push(l);break;case AdfDhtmlTimelineSeriesPeer.AUTO_PPR_UPDATE_BLOCK:l=b[h].firstChild;this.handleAutoPPRUpdate(d,l,c);null!=f&&f.push(l);break;case AdfDhtmlTimelineSeriesPeer.AUTO_PPR_REMOVE_BLOCK:l=a.getAttribute(b[h],AdfDhtmlTimelineSeriesPeer._ROW_KEY),null!=l&&(l=this.findItemByRowKey(l),null!=l&&(this.handleAutoPPRRemove(d,l,c),g.push(l)))}}0<d.length&&(0<g.length?AdfDvtAnimator.ANIMATOR.animate(this,d,1E3,AdfDhtmlTimelineSeriesPeer.deleteAnimationComplete,
[this,g]):null!=e?AdfDvtAnimator.ANIMATOR.animate(this,d,1E3,AdfDhtmlTimelineSeriesPeer.insertAnimationComplete,[this,e]):null!=f?AdfDvtAnimator.ANIMATOR.animate(this,d,1E3,AdfDhtmlTimelineSeriesPeer.updateAnimationComplete,[this,f]):AdfDvtAnimator.ANIMATOR.animate(this,d,1E3,null,null));this._normalSelectionUpdate(AdfDhtmlTimelineSeriesPeer._SEL_UPDATE_ALL_UNSELECT,!0);this._normalSelectionUpdate(AdfDhtmlTimelineSeriesPeer._SEL_UPDATE_ALL_UPDATE,!0);return!0};
AdfDhtmlTimelineSeriesPeer.prototype.resetY=function(a){for(var b=AdfAgent.AGENT,c=this.getDatabody().childNodes,d=0;d<c.length;d++){var e=c[d];if(!(parseInt(e.style.left)+parseInt(e.style.width)<a))for(var e=e.childNodes,f=0;f<e.length;f++){var g=e[f];b.getIntAttribute(g,"x",0)>=a&&g.removeAttribute("y")}}};AdfDhtmlTimelineSeriesPeer.insertAnimationComplete=function(a,b){if(null!=b&&0<b.length)for(var c=0;c<b.length;c++)b[c].style.webkitTransform=""};
AdfDhtmlTimelineSeriesPeer.updateAnimationComplete=function(a,b){if(null!=b&&0<b.length){for(var c=[],d=AdfAgent.AGENT,e=0;e<b.length;e++){var f=b[e],g=d.getAttribute(f,AdfDhtmlTimelineSeriesPeer._ROW_KEY),g=a.findItemByRowKey(g);g.firstChild.replaceChild(f.firstChild.firstChild,g.firstChild.firstChild);d.setOpacity(g.lastChild,100);c.push(g)}AdfPage.PAGE.scheduleTimer(a,a.allUpdatesAnimationComplete,c,1E3)}};
AdfDhtmlTimelineSeriesPeer.prototype.allUpdatesAnimationComplete=function(a){for(var b=AdfAgent.AGENT,c=!1,d=0;d<a.length;d++)a[d].firstChild.style.webkitTransitionProperty="none",a[d].firstChild.style.webkitTransform="none",null!=b.getAttribute(a[d],"moved")&&!c&&(a[d].removeAttribute("moved"),c=!0);this.getDomElement().style.webkitTransform="";c&&this.layoutTimelineItems(!0,!0)};
AdfDhtmlTimelineSeriesPeer.deleteAnimationComplete=function(a,b){if(null!=b&&0<b.length){for(var c=AdfAgent.AGENT,d=a._blockEndPos,e=0;e<b.length;e++){var f=c.getIntAttribute(b[e],"x",0);b[e].parentNode.removeChild(b[e]);f<d&&(d=f)}a.resetY(d);a.layoutTimelineItems(!0,!0)}};
AdfDhtmlTimelineSeriesPeer.prototype.handleAutoPPRInsert=function(a,b,c){var d=AdfAgent.AGENT,e=c.childNodes;c=this.isAllowOverlap(this.getComponent());for(var f=this.getAnimationOnDataChange(),g=d.getIntAttribute(b,"x"),h=0;h<e.length;h++)if(g>=parseInt(e[h].style.left)&&g<=parseInt(e[h].style.left)+parseInt(e[h].style.width)){for(var l=!1,m=e[h].childNodes,n=0;n<m.length;n++){var p=m[n],q=d.getIntAttribute(p,"x");if(null!=q&&g<q){e[h].insertBefore(b,p);parseInt(e[h].style.left);l=!0;break}}l||e[h].insertBefore(b,
e[h].lastChild);f==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_1?(d.setOpacity(b,0),d={alpha:100},e={},e.element=b,e.properties=d,a.push(e)):f==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_2&&(b.style.width=b.firstChild.offsetWidth+"px",b.style.webkitTransform="scale(0)",d={scale:1},e={},e.element=b,e.properties=d,a.push(e));break}this.horizontalScrollItemIntoView(b,!1);c||this.layoutTimelineItems(!0,!0)};
AdfDhtmlTimelineSeriesPeer.prototype.handleAutoPPRUpdate=function(a,b,c){c=AdfAgent.AGENT;var d=c.getAttribute(b,AdfDhtmlTimelineSeriesPeer._ROW_KEY);if(null!=d&&(d=this.findItemByRowKey(d),null!=d)){var e=c.getIntAttribute(b,"x"),f=c.getIntAttribute(d,"x");if(!(null==e||null==f)){b.style.top=d.style.top;b.style.width=d.style.width;b.setAttribute("h",this.getItemHeight(b));var g=this.getDatabody().offsetHeight;this.showFeelerForItem(b,g);this.getDomElement().style.webkitTransform="perspective(800)";
b={rotate:360};g={};g.element=d.firstChild;g.properties=b;a.push(g);c.setOpacity(d.lastChild,0);e!=f&&(b={},b.left=e,g={},g.element=d,g.properties=b,a.push(g),d.setAttribute("x",e),d.setAttribute("moved",f))}}};
AdfDhtmlTimelineSeriesPeer.prototype.handleAutoPPRRemove=function(a,b,c){c=this.getAnimationOnDataChange();if(c==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_1){c={alpha:0};var d={};d.element=b;d.properties=c;a.push(d)}else c==AdfDhtmlTimelinePeer.ANIMATION_EFFECT_2&&(b.style.width=b.firstChild.offsetWidth+"px",b.style.webkitTransform="scale(1)",c={scale:0},d={},d.element=b,d.properties=c,a.push(d))};
AdfDhtmlTimelineSeriesPeer.prototype.layoutTimelineItemForAutoPPR=function(a,b,c,d,e,f,g){d=-1;f=AdfAgent.AGENT;var h=f.getIntAttribute(e,"x");null!=h&&(c=h-c,b=AdfDhtmlTimelineSeriesPeer.calculateY(e,b,g,this._itemSpacing),f=f.getIntAttribute(e,"h"),null==f&&(f=this.getItemHeight(e),e.setAttribute("h",f)),this.adjustTip(e),h=this.getDatabody(),g=parseInt(h.style.height),"100%"==h.style.height&&(g=this.getDomElement().offsetHeight,h.style.height=g+"px"),!this.hasTimeAxis()||this.isOverviewAbove()?
(b=g-b-f-this._durationHeight,0>b&&(d=b),this._databodyHeight=Math.max(this._databodyHeight,g-b),b+=this._durationHeight):(f=b+f+this.getTimeAxisHeight()+this._durationHeight,f>g&&(d=f),this._databodyHeight=Math.max(this._databodyHeight,f)),null!=a?(g={},AdfPage.PAGE.getLocaleContext().isRightToLeft()?g.right=c:g.left=c,g.top=b,c={},c.element=e,c.properties=g,a.push(c)):(e.style.left=c+"px",e.style.top=b+"px"));return d};
AdfDhtmlTimelineSeriesPeer.prototype.findItemByRowKey=function(a){for(var b=AdfAgent.AGENT,c=this.getGlassPaneContent().childNodes,d=0;d<c.length;d++){var e=c[d];if(a==b.getAttribute(e,AdfDhtmlTimelineSeriesPeer._ROW_KEY))return e}c=this.getDatabody().childNodes;for(d=0;d<c.length;d++)if(e=c[d].childNodes)for(var f=0;f<e.length;f++){var g=e[f];if(a==b.getAttribute(g,AdfDhtmlTimelineSeriesPeer._ROW_KEY))return g}return null};
AdfDhtmlTimelineSeriesPeer.prototype.handleAutoPPRRefresh=function(a,b){for(var c=AdfAgent.AGENT,d=[],e=b.childNodes,f=0;f<e.length;f++)for(var g=e[f].childNodes,h=0;h<g.length;h++){var l=g[h];null!=c.getAttribute(l,AdfDhtmlTimelineSeriesPeer._ROW_KEY)&&this.handleAutoPPRRemove(d,l,b)}AdfDvtAnimator.ANIMATOR.animate(this,d,1E3,AdfDhtmlTimelineSeriesPeer.deleteAllAnimationComplete,[this,b,a.childNodes[0]])};
AdfDhtmlTimelineSeriesPeer.deleteAllAnimationComplete=function(a,b,c){for(var d=b.firstChild;d;)a._unregisterNode(d),b.removeChild(d),d=b.firstChild;a.insertAutoPPRRefreshBlock(b,c)};
AdfDhtmlTimelineSeriesPeer.prototype.insertAutoPPRRefreshBlock=function(a,b){this._blockStartPos=parseInt(b.style.left);this._blockEndPos=this._blockStartPos+parseInt(b.style.width);this.getTimelinePeer().ScrollTo(this._blockStartPos);this.initVirtualization(b,!1);AdfAgent.AGENT.elementsAdded(b);this.layoutTimelineItems(!0,!1);this.updateBlockInfo()};
AdfDhtmlTimelineSeriesPeer.prototype.updateWidth=function(a){var b=this.getDummyTimeAxis();this.setElemSize(this.getDomElement(),a);null!=b&&this.setElemSize(b,a)};
AdfDhtmlTimelineSeriesPeer.prototype.handleZoom=function(a){var b=this.getDatabody(),c=this.isImageLoadComplete(a);if(c==AdfDhtmlTimelineSeriesPeer.INCOMPLETE&&10>this._incompleteImageTimerAttempts)this._incompleteImageTimerAttempts++,AdfPage.PAGE.scheduleTimer(this,this.handleZoom,a,100);else if(c==AdfDhtmlTimelineSeriesPeer.INDETERMINATE&&1>this._incompleteImageTimerAttempts)this._incompleteImageTimerAttempts++,AdfPage.PAGE.scheduleTimer(this,this.handleZoom,a,0);else{this._incompleteImageTimerAttempts=
0;var d=this.hasTimeAxis(),e=AdfAgent.AGENT,f=this.isVertical();f||this.resetScroller();var g=b.offsetHeight,h=f?this.getDomElement().offsetWidth:this.getDomElement().offsetHeight,c=e.getAttribute(a,"zl");this.getTimelinePeer().updateZoomLevel(c);var l=e.getIntAttribute(a,"blockStart"),m=e.getIntAttribute(a,"blockEnd");this._blockStartPos=l;this._blockEndPos=m;var n=b.childNodes,c=n[0].cloneNode(!1);this.setElemPos(c,l);this.setElemSize(c,m-l);b.appendChild(c);var p=[],q=null,r=null,v=this.getOverviewLabels(n[0]);
if(d){q=this.getTimeAxis(n[0]);r=a.removeChild(a.firstChild);e.setOpacity(r,0);this.isOverviewAbove()?(q.style.top="0px",this.getDummyTimeAxis().style.top="0px"):q.style.bottom="0px";c.appendChild(q);var u={alpha:0},w={};w.element=q;w.properties=u;p.push(w)}c.appendChild(v);for(var y=this.isAllowOverlap(this.getComponent()),t=this.isOverviewAbove(),A=this._databodyHeight=-1,D=[c],C=this.getInitialItemY(this.isOfflineMode()),v=[];a.firstChild;){var z=a.removeChild(a.firstChild),x=e.getAttribute(z,
"tid"),w=e.getIntAttribute(z,"x"),u=e.getIntAttribute(z,"x2");null==w?c.appendChild(z):null!=x?(x=document.getElementById(x),null==x&&(z=e.getAttribute(z,AdfDhtmlTimelineSeriesPeer._ROW_KEY),x=this.findItemByRowKey(z)),null!=x&&(f?(z=e.getIntAttribute(x,"x"),x.style.top=z-this.getItemHeight(x)/2+"px",x.setAttribute("x",w),x.setAttribute("x2",u),x.removeAttribute("t"),x.removeAttribute("edt"),x.removeAttribute("et"),c.appendChild(x),u={},u.top=w-l-this.getItemHeight(x)/2,w={},w.element=x,w.properties=
u,p.push(w),this.hasDuration(x)&&v.push(x)):(z=e.getIntAttribute(x,"x"),this.setElemPos(x,z),x.setAttribute("x",w),x.setAttribute("x2",u),x.removeAttribute("t"),x.removeAttribute("edt"),x.removeAttribute("et"),u=e.getIntAttribute(x,"h"),y?itemY=AdfDhtmlTimelineSeriesPeer.calculateRandomY(h,u,this.getTimeAxisHeight()):(x.removeAttribute("y"),itemY=AdfDhtmlTimelineSeriesPeer.calculateY(x,D,C,this._itemSpacing),!d||t?(itemY=g-itemY-u-this._durationHeight,0>itemY&&itemY<A&&(A=itemY),this._databodyHeight=
Math.max(this._databodyHeight,g-itemY),itemY+=this._durationHeight):(u=itemY+u+this.getTimeAxisHeight()+this._durationHeight,u>h&&u>A&&(A=u),this._databodyHeight=Math.max(this._databodyHeight,u))),c.appendChild(x),u={},AdfPage.PAGE.getLocaleContext().isRightToLeft()?u.right=w-l:u.left=w-l,u.top=itemY,w={},w.element=x,w.properties=u,p.push(w),this.hasDuration(x)&&(x._itemY=itemY,v.push(x))))):(f?(z.style.top=m+"px",c.appendChild(z),this.adjustBubble(z,h),u=e.getIntAttribute(z,"h"),null==u&&(u=this.getItemHeight(z),
z.setAttribute("h",u)),u={},u.top=w-l-this.getItemHeight(z)/2,w={},w.element=z,w.properties=u,p.push(w),this.hasDuration(z)&&v.push(z)):(c.appendChild(z),this.setElemPos(z,m),itemY=AdfDhtmlTimelineSeriesPeer.calculateY(z,D,C,this._itemSpacing),u=e.getIntAttribute(z,"h"),null==u&&(u=this.getItemHeight(z),z.setAttribute("h",u)),!d||t?(itemY=g-itemY-u-this._durationHeight,0>itemY&&itemY<A&&(A=itemY),this._databodyHeight=Math.max(this._databodyHeight,g-itemY),itemY+=this._durationHeight):(u=itemY+u+this.getTimeAxisHeight()+
this._durationHeight,u>h&&u>A&&(A=u),this._databodyHeight=Math.max(this._databodyHeight,u)),u=z.firstChild,0>u.offsetLeft+u.offsetWidth&&this.setElemPos(u,-6),u={},AdfPage.PAGE.getLocaleContext().isRightToLeft()?u.right=w-l:u.left=w-l,u.top=itemY,w={},w.element=z,w.properties=u,p.push(w),this.hasDuration(z)&&(z._itemY=itemY,v.push(z))),this.adjustTip(z))}for(z=n.length-2;0<=z;z--)this._unregisterNode(n[z]),b.removeChild(n[z]);if(-1!=A){if(d&&!t)b.style.height=A+"px",q.style.bottom=A-h-this.getDomElement().offsetTop+
"px",r.style.bottom=A-h-this.getDomElement().offsetTop+"px";else{z=0-A;for(a=0;a<p.length;a++)w=p[a],u=w.properties,null!=u.top&&(u.top+=z,w.element._itemY+=z);b.style.height=g+z+"px";this.scrollVertical(z)}null!=this._bottomHotspot&&(this._bottomHotspot.style.visibility="visible")}else null!=this._bottomHotspot&&(this._bottomHotspot.style.visibility="hidden");this.prepareDurations(v);this.isVertical()?(h=AdfDhtmlTimelineSeriesPeer.calculateVerticalDurationPosition,b="width",g="height",a="left",d=
this.getTimeAxisWidth()-1):(b="height",g="width",a="top",d=this.getTimeAxisHeight()-1,h=!this.hasTimeAxis()||this.isOverviewAbove()?AdfDhtmlTimelineSeriesPeer.calculateInvertedDurationPosition:AdfDhtmlTimelineSeriesPeer.calculateDurationPosition);for(e=0;e<v.length;e++)z=v[e],f=z.childNodes[3],f.style.zIndex=100-f._dL,u=AdfAgent.AGENT.getIntAttribute(z,"x2")-AdfAgent.AGENT.getIntAttribute(z,"x"),f.style[g]=u+"px",n=18+10*f._dL,f.style[b]=n+"px",z._itemY?(w=z._itemY,z._itemY=null):w=parseInt(z.style[a]),
f.style[a]?(u={},u[a]=h(z,n,w,d),w={},w.element=f,w.properties=u,p.push(w)):f.style[a]=h(z,n,w,d)+"px";this.renderOverviewTicks(c);this.getTimelinePeer().restoreFocusPos();AdfPage.PAGE.scheduleTimer(this,this.animateDelay,{animationObjects:p,oldTimeAxis:q,newTimeAxis:r},0)}};AdfDhtmlTimelineSeriesPeer.prototype.animateDelay=function(a){AdfDvtAnimator.ANIMATOR.animate(this,a.animationObjects,1E3,AdfDhtmlTimelineSeriesPeer.zoomComplete,[this,a.oldTimeAxis,a.newTimeAxis])};
AdfDhtmlTimelineSeriesPeer.zoomComplete=function(a,b,c){var d=a.getDatabody();a.showFeelersForBlock(d.childNodes[0],d.offsetHeight);null==b||null==c||(d=b.parentNode,a.isOverviewAbove()?c.style.top=b.style.top:c.style.bottom=b.style.bottom,d.replaceChild(c,b),b=[],d={},d.element=c,d.properties={alpha:100},b.push(d),AdfPage.PAGE.scheduleTimer(a,a.timeAxisFadeInDelay,{peer:a,animationObjects:b},0))};
AdfDhtmlTimelineSeriesPeer.prototype.timeAxisFadeInDelay=function(a){AdfDvtAnimator.ANIMATOR.animate(a.peer,a.animationObjects,1E3,null,null)};AdfDhtmlTimelineSeriesPeer.prototype.handleDatabodyWidthChange=function(a,b){this.resizeDatabody(a,b,!0)};
AdfDhtmlTimelineSeriesPeer.prototype.resizeDatabody=function(a,b,c){for(var d=AdfAgent.AGENT,e=this.getTimelinePeer().getDomElement(),f=d.getIntAttribute(e,"start"),g=d.getIntAttribute(e,"end"),h=d.getIntAttribute(e,"width"),l=this.isAllowOverlap(this.getComponent()),m=this.getDatabody(),n=m.offsetHeight,m=m.childNodes,p=this.hasTimeAxis(),q=this.isOverviewAbove(),r=[],v=this.getInitialItemY(this.isOfflineMode()),u=0;u<m.length;u++){var w=m[u],y=this.getElemPos(w),t=d.getIntAttribute(w,"st");null==
t&&(t=AdfTimelineUtils.getPositionDate(f,g,y,h),isNaN(t)||w.setAttribute("st",t));var A=d.getIntAttribute(w,"et"),D=this.getElemPos(w)+this.getElemSize(w);null==A&&(A=AdfTimelineUtils.getPositionDate(f,g,D,h),isNaN(A)||w.setAttribute("et",A));t=AdfTimelineUtils.getDatePosition(f,g,t,a);A=AdfTimelineUtils.getDatePosition(f,g,A,a);this.setElemPos(w,t);this.setElemSize(w,A-t);var A=w.childNodes,D=null,C=0;p&&(D=this.getTimeAxis(w),C=1);for(w=C;w<A.length-1;w++){var C=A[w],z=this.getElemPos(C)+y;if(!isNaN(z)){var x=
d.getIntAttribute(C,"t");null==x&&(x=AdfTimelineUtils.getPositionDate(f,g,z,h),isNaN(x)||C.setAttribute("t",x));if(this.hasDuration(C)){var E=C.childNodes[3],F=d.getIntAttribute(C,"edt");null==F&&(F=AdfTimelineUtils.getPositionDate(f,g,z+(AdfAgent.AGENT.getIntAttribute(C,"x2")-AdfAgent.AGENT.getIntAttribute(C,"x")),h),isNaN(F)||C.setAttribute("edt",F))}var G=-1,H=this.getElemSize(C);null!=H&&!isNaN(H)&&(G=d.getIntAttribute(C,"et"),null==G&&(G=AdfTimelineUtils.getPositionDate(f,g,z+parseInt(H),h),
isNaN(G)||C.setAttribute("et",G)),G=AdfTimelineUtils.getDatePosition(f,g,G,a));z={};x=AdfTimelineUtils.getDatePosition(f,g,x,a);if(F)var s=AdfTimelineUtils.getDatePosition(f,g,F,a);this.setElemPos(C,x-t);if(-1!=G)this.setElemSize(C,G-x);else{if(null!=d.getIntAttribute(C,"x")&&(C.setAttribute("x",x),s&&C.setAttribute("x2",s),!l)){C.removeAttribute("y");var B=AdfDhtmlTimelineSeriesPeer.calculateY(C,m,v,this._itemSpacing);z.top=!p||q?n-B-d.getIntAttribute(C,"h"):B}x={noclean:!0};x.element=C;x.properties=
z;r.push(x);if(this.hasDuration(C)){E.style.zIndex=100-E._dL;z={};this.isVertical()?(G=AdfAgent.AGENT.getIntAttribute(C,"x2")-AdfAgent.AGENT.getIntAttribute(C,"x"),x=18+10*E._dL,z.left=C.parentNode.offsetWidth-parseInt(C.style.left)-x-this.getTimeAxisWidth()-1):(x=AdfAgent.AGENT.getIntAttribute(C,"x2")-AdfAgent.AGENT.getIntAttribute(C,"x"),G=18+10*E._dL,z.top=!p||q?B-n+d.getIntAttribute(C,"h"):n-B-G-this.getTimeAxisHeight()-1);H=Math.min(10,x/2);for(k=0;3>k;k++){var I=C.childNodes[k];I.style.marginLeft=
H+"px"}(I=C.childNodes[4])&&(I.style.marginLeft=H+"px");E.style.height=G+"px";E.style.width=x+"px";x={noclean:!0};x.element=E;x.properties=z;r.push(x)}}}}p&&!AdfTimelineUtils.supportsTouch()&&this.resizeTimeAxis(D,a,b)}AdfDvtAnimator.ANIMATOR.animate(this,r,1E3,AdfDhtmlTimelineSeriesPeer.databodyWidthChangeAnimationComplete,Array(this));this.setElemSize(this.getDomElement(),a);if(c&&p&&(null==this._fetchingTimeAxis||!this._fetchingTimeAxis)){a=this.getScroller();b=m[m.length-1];if(this.getScrollPos(a)+
this.getElemSize(e)-1>this.getElemPos(b)+this.getElemSize(b)&&(e=this.queueFetchEvent(!0,AdfTimelineDataFetchEvent.AFTER_POS_SUBTYPE,this.adjustBlockEndPosForRangeChange(),!0)))this._fetchingTimeAxis=!0;if(this.getElemPos(m[0])>this.getScrollPos(a)&&(e=this.queueFetchEvent(!0,AdfTimelineDataFetchEvent.BEFORE_POS_SUBTYPE,this._blockStartPos,!0)))this._fetchingTimeAxis=!0}};AdfDhtmlTimelineSeriesPeer.databodyWidthChangeAnimationComplete=function(a){a.showFeelers()};
AdfDhtmlTimelineSeriesPeer.prototype.adjustBlockEndPosForRangeChange=function(){if(this.hasTimeAxis()){for(var a=AdfAgent.AGENT,b=this.getDatabody().lastChild.firstChild.lastChild,c=null,d=null;b;){if("none"!=b.style.display){c=b.previousSibling;for(b=c.previousSibling;b;){if("none"!=b.style.display){d=b.previousSibling;break}b=b.previousSibling}break}b=b.previousSibling}if(null!=c&&null!=d){var b=a.getIntAttribute(c,"t"),d=a.getIntAttribute(d,"t"),d=b+(b-d),e=this.getTimelinePeer().getDomElement(),
b=a.getIntAttribute(e,"start"),c=a.getIntAttribute(e,"end"),a=a.getIntAttribute(e,"width");return AdfTimelineUtils.getDatePosition(b,c,d,a)}}return this._blockEndPos};AdfDhtmlTimelineSeriesPeer.prototype.isSeparator=function(a,b){var c=AdfAgent.AGENT.getAttribute(a,"_sc");return b.className==c?!0:!1};
AdfDhtmlTimelineSeriesPeer.prototype.resizeTimeAxis=function(a,b,c){for(var d=AdfAgent.AGENT,e=this.getTimelinePeer().getDomElement(),f=d.getIntAttribute(e,"start"),g=d.getIntAttribute(e,"end"),e=d.getIntAttribute(e,"width"),h=1,l=-1,m=a.childNodes,n=0;n<m.length;n++){var p=m[n],q=d.getIntAttribute(p,"t");null==q&&(q=this.getElemPos(p),q=AdfTimelineUtils.getPositionDate(f,g,q,e),p.setAttribute("t",q));q=AdfTimelineUtils.getDatePosition(f,g,q,b);this.setElemPos(p,q);if(-1==l){if("none"!=p.style.display&&
this.isSeparator(a,p))if(c)1<n&&(r=m[0],"none"!=r.style.display&&(l=this.getElemPos(r),30>q-l?(p.style.display="none",n<m.length-1&&(m[n+1].style.display="none"),l=2*n,h=1):l=0));else{var p=Math.round(n/2),r=m[p];"none"==r.style.display&&(l=this.getElemPos(r),30<q-l?(r.style.display="block",m[p+1].style.display="block",l=2*p,h=p+1):l=0)}}else 0<l&&(h==l?(p.style.display=c?"none":"block",n<m.length-1&&(m[n+1].style.display=c?"none":"block"),h=1):h++)}};
AdfDhtmlTimelineSeriesPeer.prototype.handleKeyboardContextMenu=function(a,b){var c=this.GetLastRowKey();if(null!=c){var d=this.findItemByRowKey(c);null!=d&&this.HandleItemContextMenu(a,c,d,d,null)}};
AdfDhtmlTimelineSeriesPeer.prototype.repeatScrollVertical=function(a){var b=a.increment,c=a.reminder,d=a.counter;a=null!=a.speed?a.speed:10;if(0<=d){if(0==d)if(this.showOrHideTimeAxis(!1),0<c)b=c;else return;var e=this.getDomElement();if(0<b){var f=this.getDatabody(),f=parseInt(f.style.height)-parseInt(e.style.height);if(e.scrollTop==f)return}else if(0==e.scrollTop)return;this.scrollVertical(b);AdfPage.PAGE.scheduleTimer(this,this.repeatScrollVertical,{increment:b,reminder:c,counter:d-1,speed:a},
a)}};AdfDhtmlTimelineSeriesPeer.prototype.getElemOffsetSize=function(a){return this.isVertical()?a.offsetHeight:a.offsetWidth};
AdfDhtmlTimelineSeriesPeer.prototype.repeatScrollHorizontal=function(a){var b=a.callback,c=a.increment,d=a.counter;a=a.scrollOverview;void 0==a&&(a=!0);if(0<d){var e=this.getScroller();if(0<c){var f=this.getElemSize(this.getDomElement())-this.getElemOffsetSize(e)+4;if(this.getScrollPos(e)==f){null!=b&&b();return}}else if(0==this.getScrollPos(e)){null!=b&&b();return}this.getTimelinePeer().ScrollByAmount(c,a);AdfPage.PAGE.scheduleTimer(this,this.repeatScrollHorizontal,{callback:b,increment:c,counter:d-
1,scrollOverview:a},10)}else null!=b&&b()};AdfDhtmlTimelineSeriesPeer.prototype.GetLastRowKey=function(){return this.getTimelinePeer().getLastRowKey(this.getComponent().getClientId())};AdfDhtmlTimelineSeriesPeer.prototype.handleTopAutoScroll=function(a){this._virtInitialized&&null==this._autoScrollTimer&&(0<this.getDomElement().scrollTop?(a.style.visibility="visible",this._autoScrollTimer=AdfPage.PAGE.scheduleTimer(this,this.startAutoScroll,-1,100)):(this.cancelAutoScroll(),a.style.visibility="hidden"))};
AdfDhtmlTimelineSeriesPeer.prototype.handleBottomAutoScroll=function(a){if(this._virtInitialized&&null==this._autoScrollTimer){var b=this.getDomElement();parseInt(this.getDatabody().style.height)>b.scrollTop+this.getDomElement().offsetHeight?(a.style.visibility="visible",this._autoScrollTimer=AdfPage.PAGE.scheduleTimer(this,this.startAutoScroll,1,100)):(this.cancelAutoScroll(),a.style.visibility="hidden")}};
AdfDhtmlTimelineSeriesPeer.prototype.showOrHideOverviewTicks=function(a){for(var b=!0==a?"none":"block",c=this.getDatabody().childNodes,d=0;d<c.length;d++){var e=this.getOverviewLabels(c[d]);a||this.adjustOverviewTicks(c[d]);e.style.display=b}};
AdfDhtmlTimelineSeriesPeer.prototype.showOrHideTimeAxis=function(a){this.showOrHideOverviewTicks(a);if(this.hasTimeAxis()){var b=AdfAgent.AGENT;if(!(b.getPlatform()!=AdfAgent.GECKO_PLATFORM||2<=parseInt(b.getVersion()))){a=!0==a?"none":"block";b=this.getDatabody().childNodes;this.getDummyTimeAxis().style.display=a;for(var c=0;c<b.length;c++)block=b[c],timeAxis=this.getTimeAxis(block),timeAxis.style.display=a}}};
AdfDhtmlTimelineSeriesPeer.prototype.startAutoScroll=function(a){this.showHotspots();this.showOrHideTimeAxis(!0);this.scrollVertical(a);this._autoScrollTimer=AdfPage.PAGE.scheduleTimer(this,this.startAutoScroll,a,10)};AdfDhtmlTimelineSeriesPeer.prototype.cancelAutoScroll=function(){null!=this._autoScrollTimer&&AdfPage.PAGE.cancelTimer(this._autoScrollTimer);this.showOrHideTimeAxis(!1);this._autoScrollTimer=null};AdfDhtmlTimelineSeriesPeer.prototype.isGlassPaneReady=function(){return!0==this._glassPaneReady};
AdfDhtmlTimelineSeriesPeer.prototype.getGlassPaneNavigateUp=function(){return this.getTimelinePeer().getGlassPane().firstChild};AdfDhtmlTimelineSeriesPeer.prototype.getGlassPaneNavigateDown=function(){return this.getGlassPaneNavigateUp().nextSibling};AdfDhtmlTimelineSeriesPeer.prototype.getGlassPaneContent=function(){return this.getGlassPaneNavigateDown().nextSibling};
AdfDhtmlTimelineSeriesPeer.prototype.handleGroupClick=function(a,b){var c=AdfAgent.AGENT;this.unhighlightItem(b);this._initialGroupItemLeft=b.style.left;this._initialGroupItemTop=b.style.top;this._groupClone=b.cloneNode(!0);this._selClearAllStylesOnItem(this._groupClone);c.clearSubtreeIds(this._groupClone);var d=b.parentNode;d.insertBefore(this._groupClone,b);this._groupClone.style.left=this._initialGroupItemLeft;this._groupClone.style.top=this._initialGroupItemTop;this._initialGroupItem=b;b.childNodes[1].style.display=
"none";b.childNodes[2].style.display="none";b.childNodes[3].style.display="none";for(var e=c.getDescendantComponentsForNode(b),f=0;f<e.length;f++){var g=e[f];g._parent=AdfRichUIPeer.getFirstAncestorComponent(AdfRichUIPeer.getDomElementForComponent(g).parentNode)}(this._initialGroupNumberContainer=document.getElementById(c.getAttribute(b,"id")+"::cnt"))&&(this._initialGroupNumberContainer.style.display="none");e=this.getScrollPos(this.getScroller());this.isVertical()?(this._glassPaneItemTop=parseInt(d.style.top)+
(parseInt(this._initialGroupItemTop)-e)+"px",this._glassPaneItemLeft=parseInt(this._initialGroupItemLeft)-this.getDomElement().scrollLeft+"px"):(this._glassPaneItemTop=parseInt(this._initialGroupItemTop)-this.getDomElement().scrollTop+"px",this._glassPaneItemLeft=parseInt(d.style.left)+(parseInt(this._initialGroupItemLeft)-e)+"px");b.style.top=this._glassPaneItemTop;b.style.left=this._glassPaneItemLeft;d=this.getGlassPaneContent();d.appendChild(b);d.parentNode.style.display="block";this.hideTimeline();
this.getTimelinePeer().setExpandedSeriesCallback(this);c=c.getAttribute(b,"rks");this.isOfflineMode()?(c=document.getElementById(AdfRichUIPeer.CreateSubId(b.id,"ris")),null!=c&&this.handleDisclosure(c)):(c=new AdfTimelineDisclosureEvent(this.getComponent(),a,c),c.setPartial(!0),AdfPage.PAGE.queueEventToServer(c))};
AdfDhtmlTimelineSeriesPeer.prototype.getTimelineFadeAnimationSpeed=function(){var a=AdfAgent.AGENT,b=a.getPlatform(),a=a.getVersion();return b==AdfAgent.IE_PLATFORM&&9>a||b==AdfAgent.GECKO_PLATFORM&&2>a?400:800};
AdfDhtmlTimelineSeriesPeer.prototype.hideTimeline=function(){var a=this.getGlassPaneContent(),b=this.getTimelinePeer().getMask();if(null!=b){b.style.display="block";var c=[],d={alpha:50},e={};e.element=b}else c=[],d={alpha:20},e={},e.element=a.parentNode.nextSibling;e.properties=d;c.push(e);AdfDvtAnimator.ANIMATOR.animate(this,c,this.getTimelineFadeAnimationSpeed(),null,null)};AdfDhtmlTimelineSeriesPeer.prototype.handleDisclosure=function(a){a?this.showDisclosedItems(a):this.hideDisclosedItems()};
AdfDhtmlTimelineSeriesPeer.prototype.showDisclosedItems=function(a){var b=AdfAgent.AGENT,c=this.getGlassPaneContent(),d=this.getGlassPaneNavigateDown(),e=this.getTimelineOverviewPeer(),f=0;this.isVertical()&&null!=e&&(f=e.getDomElement().offsetWidth);var e=Math.max(0,(c.offsetWidth-d.offsetWidth-f)/2),f=[],g=d.offsetHeight+AdfDhtmlTimelineSeriesPeer.NAV_ARROW_PADDING,h=g,g=c.parentNode.offsetHeight-g,l=[];for(l.push(this._initialGroupItem);a.firstChild;){var m=a.firstChild;m.style.left=this._glassPaneItemLeft;
m.style.top=this._glassPaneItemTop;m.lastChild.style.display="none";b.setOpacity(m,100);c.appendChild(m);b.elementsAdded(m);l.push(m)}for(a=0;a<l.length;a++){var m=l[a],n={};n.left=e;n.top=h;var p={};p.element=m;p.properties=n;f.push(p);n=this.getItemHeight(m);m.setAttribute("h",n);h+n>g&&(m.style.display="none",d.style.visibility="visible",d.style.left=e+"px",null==b.getIntAttribute(c,"bottomIndex")&&c.setAttribute("bottomIndex",c.childNodes.length-1));h=h+n+AdfDhtmlTimelineSeriesPeer.ITEM_GAP}AdfDhtmlTimelineSeriesPeer.isIE9()||
this.getDomElement().focus();AdfPage.PAGE.scheduleTimer(this,this.animateDisclosedItems,f,this.getTimelineFadeAnimationSpeed())};AdfDhtmlTimelineSeriesPeer.prototype.animateDisclosedItems=function(a){this._glassPaneReady=!0;AdfDvtAnimator.ANIMATOR.animate(this,a,1E3,null,null)};AdfDhtmlTimelineSeriesPeer.prototype.resetGlassPane=function(a){this.getGlassPaneNavigateUp().style.visibility="hidden";this.getGlassPaneNavigateDown().style.visibility="hidden";a.removeAttribute("topIndex");a.removeAttribute("bottomIndex")};
AdfDhtmlTimelineSeriesPeer.prototype.hideDisclosedItems=function(){this._glassPaneReady=null;var a=this.getGlassPaneContent();this.resetGlassPane(a);for(var b=parseInt(this._glassPaneItemLeft),c=parseInt(this._glassPaneItemTop),d=[],a=a.childNodes,e=0;e<a.length;e++){var f=a[e],g={};g.left=b;g.top=c;var h={};h.element=f;h.properties=g;d.push(h)}AdfDvtAnimator.ANIMATOR.animate(this,d,this.getTimelineFadeAnimationSpeed(),AdfDhtmlTimelineSeriesPeer.disclosureAnimationComplete,Array(this))};
AdfDhtmlTimelineSeriesPeer.disclosureAnimationComplete=function(a){a._animator=null;AdfPage.PAGE.scheduleTimer(a,a.delayHideGlassPane,null,100)};
AdfDhtmlTimelineSeriesPeer.prototype.delayHideGlassPane=function(){var a=this.getGlassPaneContent(),b=a.childNodes;if(this.isOfflineMode()&&1<b.length){if(b=document.getElementById(AdfRichUIPeer.CreateSubId(a.firstChild.nextSibling.id,"ris")),null!=b)for(;a.firstChild.nextSibling;){var c=a.firstChild.nextSibling;b.appendChild(c)}}else for(var d=1;d<b.length;d++)c=b[d],this._unregisterNode(c),a.removeChild(c);this._initialGroupItem.childNodes[1].style.display="";this._initialGroupItem.childNodes[2].style.display=
"";this._initialGroupItem.childNodes[3].style.display="";this._initialGroupNumberContainer&&(this._initialGroupNumberContainer.style.display="");this._groupClone.parentNode.insertBefore(this._initialGroupItem,this._groupClone);this._initialGroupItem.style.left=this._initialGroupItemLeft;this._initialGroupItem.style.top=this._initialGroupItemTop;this._groupClone.parentNode.removeChild(this._groupClone);this._glassPaneItemTop=this._glassPaneItemLeft=this._groupClone=this._initialGroupNumberContainer=
this._initialGroupItemTop=this._initialGroupItemLeft=this._initialGroupItem=null;AdfPage.PAGE.scheduleTimer(this,this.hideGlassPane,null,this.getTimelineFadeAnimationSpeed())};
AdfDhtmlTimelineSeriesPeer.prototype.hideGlassPane=function(){var a=this.getGlassPaneContent();for(a.parentNode.style.display="none";a.firstChild;)a.removeChild(a.firstChild);var b=this.getTimelinePeer().getMask();if(null!=b)b.style.display="none",b.style.filter="alpha(opacity\x3d0)";else{var b=[],c={};c.element=a.parentNode.nextSibling;c.properties={alpha:100};b.push(c);AdfDvtAnimator.ANIMATOR.animate(this,b,this.getTimelineFadeAnimationSpeed(),null,null)}this.getTimelinePeer().setExpandedSeriesCallback(null)};
AdfDhtmlTimelineSeriesPeer.prototype.handleGlassPaneResize=function(a){var b=AdfAgent.AGENT,c=this.getGlassPaneContent(),d=this.getGlassPaneNavigateDown(),e=d.offsetHeight+AdfDhtmlTimelineSeriesPeer.NAV_ARROW_PADDING,f=e,g=-1;this.resetGlassPane(c);a-=e;for(var e=c.childNodes,h=1;h<e.length;h++){var l=e[h];l.style.top=f+"px";-1==g&&(g=parseInt(l.style.left));var m=parseInt(l.getAttribute("h"));f+m>a?(l.style.display="none",d.style.visibility="visible",d.style.left=g+"px",null==b.getIntAttribute(c,
"bottomIndex")&&c.setAttribute("bottomIndex",h)):l.style.display="block";f=f+m+AdfDhtmlTimelineSeriesPeer.ITEM_GAP}};
AdfDhtmlTimelineSeriesPeer.prototype.handleNavigateUp=function(){var a=AdfAgent.AGENT,b=this.getGlassPaneContent(),c=this.getGlassPaneNavigateDown(),d=c.offsetHeight+AdfDhtmlTimelineSeriesPeer.NAV_ARROW_PADDING,e=a.getIntAttribute(b,"topIndex"),f=b.childNodes[e];f.style.display="block";var g=f.firstChild.offsetHeight+AdfDhtmlTimelineSeriesPeer.ITEM_GAP;"visible"==this.getGlassPaneNavigateUp().style.visibility&&(c.style.visibility="visible",c.style.left=f.style.left);1<e?b.setAttribute("topIndex",
e-1):this.getGlassPaneNavigateUp().style.visibility="hidden";c=b.parentNode.offsetHeight-d;d=[];e=b.childNodes;for(f=1;f<e.length;f++){var h=e[f],l={};l.top=parseInt(h.style.top)+g;var m={};m.element=h;m.properties=l;d.push(m);m=a.getIntAttribute(h,"h");l.top+m>c&&"block"==h.style.display&&(h.style.display="none",b.setAttribute("bottomIndex",f))}AdfDvtAnimator.ANIMATOR.animate(this,d,500,null,null)};
AdfDhtmlTimelineSeriesPeer.prototype.handleNavigateDown=function(){var a=this.getGlassPaneContent(),b=this.getGlassPaneNavigateDown(),c=b.offsetHeight+AdfDhtmlTimelineSeriesPeer.NAV_ARROW_PADDING,d=AdfAgent.AGENT.getIntAttribute(a,"bottomIndex"),e=a.childNodes[d];e.style.display="block";var f=e.firstChild.offsetHeight+AdfDhtmlTimelineSeriesPeer.ITEM_GAP;if("visible"==b.style.visibility){var g=this.getGlassPaneNavigateUp();g.style.visibility="visible";g.style.left=e.style.left}null!=e.nextSibling?
a.setAttribute("bottomIndex",d+1):b.style.visibility="hidden";b=[];d=a.childNodes;for(e=1;e<d.length;e++){var g=d[e],h={};h.top=parseInt(g.style.top)-f;var l={};l.element=g;l.properties=h;b.push(l);h.top<c&&(g.style.display="none",a.setAttribute("topIndex",e))}AdfDvtAnimator.ANIMATOR.animate(this,b,500,null,null)};
AdfDhtmlTimelineSeriesPeer.prototype.handleDisclosedItemClick=function(a){var b=AdfAgent.AGENT.getEventTarget(a),c=this.GetRowKeyAndItem(b,this.getDomElement());null!=c&&(b=c[0],c=c[1],null!=b&&this.handleItemClick(a,b,c))};AdfDhtmlTimelineSeriesPeer.prototype.handleDisclosedItemMouseOver=function(a){AdfTimelineUtils.supportsTouch()?AdfAgent.AGENT.preventDefault(a):(a=AdfAgent.AGENT.getEventTarget(a),a=this.GetRowKeyAndItem(a,this.getDomElement()),null!=a&&(a=a[1],this.isItemSelectionEnabled()&&this.highlightItem(a)))};
AdfDhtmlTimelineSeriesPeer.prototype.handleDisclosedItemMouseOut=function(a){AdfTimelineUtils.supportsTouch()||(a=a.getNativeEventTarget(),a=this.GetRowKeyAndItem(a,this.getDomElement()),null!=a&&this.unhighlightItem(a[1]))};AdfDhtmlTimelineSeriesPeer.prototype.unselectDisclosedItem=function(a){var b=AdfAgent.AGENT.getAttribute(a,AdfDhtmlTimelineSeriesPeer._ROW_KEY);null!=b&&this._selUnselectItem(b,a)};
AdfDhtmlTimelineSeriesPeer.prototype.handleGlassPaneUpArrow=function(a){var b=this.GetLastRowKey();if(null!=b&&(b=this.findItemByRowKey(b),null!=b)){var b=b.previousSibling,c=AdfAgent.AGENT.getAttribute(b,AdfDhtmlTimelineSeriesPeer._ROW_KEY);if(null!=c){var d=this.isMultipleItemSelect();"none"==b.style.display&&this.handleNavigateUp();if(a.shiftKey&&d)this._selIsSelected(c)?this._selUnselectItem(c,b):this._selSelectItem(c,b);else if(!a.ctrlKey||!d)this.getTimelinePeer().selUnselectAllForAllSeries(),
this._selSelectItem(c,b);this.getTimelinePeer().setLastRowKey(c,b,this.getComponent().getClientId())}}};
AdfDhtmlTimelineSeriesPeer.prototype.handleGlassPaneDownArrow=function(a){var b=this.GetLastRowKey();if(null!=b&&(b=this.findItemByRowKey(b),null!=b&&(b=b.nextSibling,null!=b))){var c=AdfAgent.AGENT.getAttribute(b,AdfDhtmlTimelineSeriesPeer._ROW_KEY);if(null!=c){var d=this.isMultipleItemSelect();"none"==b.style.display&&this.handleNavigateDown();if(a.shiftKey&&d)this._selIsSelected(c)?this._selUnselectItem(c,b):this._selSelectItem(c,b);else if(!a.ctrlKey||!d)this.getTimelinePeer().selUnselectAllForAllSeries(),
this._selSelectItem(c,b);this.getTimelinePeer().setLastRowKey(c,b,this.getComponent().getClientId())}}};
AdfDhtmlTimelineSeriesPeer.prototype.updateTimelineItemForOfflineMode=function(a,b,c){var d=AdfAgent.AGENT,e=d.getPlatform(),d=d.getVersion();if(null!=b){var f="rotate(45deg)";if(!this.hasTimeAxis()||this.isOverviewAbove())f="rotate(-135deg)";e==AdfAgent.WEBKIT_PLATFORM?b.style.webkitTransform=f:e==AdfAgent.GECKO_PLATFORM&&16>d?b.style.mozTransform=f:e==AdfAgent.IE_PLATFORM&&9==d&&(b.style.msTransform=f)}e==AdfAgent.IE_PLATFORM&&9>d&&(null!=b&&(b.style.display="none"),null!=a&&(a.style.marginTop=
null!=c?"-1px":"-4px"))};AdfDhtmlTimelineSeriesPeer.prototype.ConvertClientIdToLocator=function(a,b,c,d){b=AdfAgent.AGENT;var e=a.getClientId();a=AdfStrings.count(e,":");AdfAssert.assert(0<=c.indexOf(e));c=c.substring(e.length+1);e=c.indexOf(":");if(0<e)if(c=c.substring(0,e),e=this.findItemByRowKey(c),null==e)d.push([a+1,null]);else{for(var f=0,g=e.parentNode.childNodes,h=0;h<g.length;h++)if(c=b.getAttribute(g[h],AdfDhtmlTimelineSeriesPeer._ROW_KEY),null!=c){if(g[h]==e)break;f++}d.push([a+1,f])}};
AdfDhtmlTimelineSeriesPeer.prototype.convertLocatorToClientId=function(a,b){var c=AdfAgent.AGENT,d=a.getClientId(),e=this.getDatabody();if(null!=e)for(var e=e.childNodes,f=0;f<e.length;f++){var g=e[f],h=this.getBlockInfo(g);if(b>=h.startRow&&b<h.endRow)for(var g=g.childNodes,l=0,m=0;m<g.length;m++){var n=c.getAttribute(g[m],AdfDhtmlTimelineSeriesPeer._ROW_KEY);if(null!=n){if(h.startRow+l==b)return d+":"+n;l++}}}return null};
AdfDhtmlTimelineSeriesPeer.prototype.getBlockInfo=function(a){var b=AdfAgent.AGENT;a=a.lastChild;var c={};c.startRow=b.getIntAttribute(a,"startRow");c.endRow=b.getIntAttribute(a,"endRow");c.prevItemPos=b.getIntAttribute(a,"prevItemPos");c.nextItemPos=b.getIntAttribute(a,"nextItemPos");return c};