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 for(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(),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)for(g=d.childNodes,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),w=e.getIntAttribute(p,"w");null==w&&(w=p.firstChild.offsetWidth,p.setAttribute("w",
w));var v=e.getIntAttribute(p,"h");null==v&&(v=AdfDhtmlTimelineSeriesPeer.calculateItemHeight(p),p.setAttribute("h",v));f>=q&&f<=q+w&&(g>=r&&g<=r+v||r>=g&&r<=g+h)&&(g=r+v+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 w=e.lastChild;AdfDhtmlTimelineSeriesPeer.isIE7()?w.style.zIndex=-1:w.style.zIndex=0;w.style.width=e.firstChild.offsetWidth+"px";w.style.height=e.firstChild.offsetHeight+"px";m?w.style.left="1px":this.getTimelinePeer().setElemPos(w,-19);w.style.top="1px";p.setOpacity(w,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,w);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!=w&&(r={},r.element=w,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!=w&&p.setOpacity(w,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){var f=b.getComputedStyle(e),e=f.width,f=f.height;if("0px"==e||"auto"==e||"0px"==f||"auto"==f)return AdfDhtmlTimelineSeriesPeer.INCOMPLETE}else if(0==e.offsetHeight)return AdfDhtmlTimelineSeriesPeer.INDETERMINATE}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),w=r+this.getElemSize(q),q=q.childNodes,v=0;v<q.length;v++){var x=q[v];this.hasDuration(x)&&
n.push(x)}this.prepareDurations(n);for(var z=-1,t=this.getInitialItemY(m),p=0;p<e.length;p++)for(q=e[p],r=this.getElemPos(q),w=r+this.getElemSize(q),q=q.childNodes,v=0;v<q.length;v++)if(x=q[v],x=b?this.layoutTimelineItemForAutoPPR(c,e,r,w,x,g,t):this.layoutTimelineItem(c,e,r,w,x,f,m,g,t),(!h||l)&&x<z||h&&!l&&x>z)z=x;if(h&&!l){if(g=0,-1!=z?(d.style.height=z+"px",g=z-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!=z){f=0-z;for(h=0;h<e.length;h++)for(q=e[h],q=q.childNodes,l=0;l<q.length;l++)x=q[l],isNaN(parseInt(x.style.top))||(x.style.top=parseInt(x.style.top)+f+"px");d.style.height=g+f+"px";this.scrollVertical(f)}this.layoutDurations(n);-1!=z&&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);a.scheduleTimer(this,this.startWaveAnimation,{animationObjects:b,index:c+1},1E3/Math.max(1,b.length));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();!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())for(c=parseInt(e.style.height)-d-this.getDomElement().scrollTop,a=e.childNodes,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 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()):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 w=q[r],v=c.getIntAttribute(w,"time"),w=c.getAttribute(w,"label"),v=AdfTimelineUtils.getDatePosition(e,f,v,g),x=this.getElemPos(a),z=x+this.getElemSize(a);if(v>=x&&v<=z){z=document.createElement("div");
z.className=d;this.setElemPos(z,v-x);var t=-1;r+1<q.length&&(t=c.getIntAttribute(q[r+1],"time"),t=AdfTimelineUtils.getDatePosition(e,f,t,g));var B=document.createElement("div");l?B.style.left=n+"px":B.style.bottom=p+"px";B.className=b;this.setElemPos(B,v-x+2);-1!=t&&this.setElemSize(B,t-v);h&&(B.innerHTML=w);m.appendChild(z);m.appendChild(B)}}}};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)for(b=b.childNodes,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)this.repeatScrollHorizontal({increment:(c+f-e-20)/5,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&&this.repeatScrollHorizontal({increment:c/5,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];null!=e&&(null!=b&&b.isLeftButtonPressed()||AdfTimelineUtils.supportsTouch())&&(this.isGlassPaneReady()||null==c.getAttribute(d,"rks")?(c=null,null!=b&&(c=b.getNativeEvent()),this.handleItemClick(c,e,d)):this.handleGroupClick(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,w=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 v={alpha:0},x={};x.element=q;x.properties=v;p.push(x)}c.appendChild(w);for(var z=this.isAllowOverlap(this.getComponent()),t=this.isOverviewAbove(),B=this._databodyHeight=-1,F=[c],D=this.getInitialItemY(this.isOfflineMode()),w=[];a.firstChild;){var A=a.removeChild(a.firstChild),y=e.getAttribute(A,
"tid"),x=e.getIntAttribute(A,"x"),v=e.getIntAttribute(A,"x2");null==x?c.appendChild(A):null!=y?(y=document.getElementById(y),null==y&&(A=e.getAttribute(A,AdfDhtmlTimelineSeriesPeer._ROW_KEY),y=this.findItemByRowKey(A)),null!=y&&(f?(A=e.getIntAttribute(y,"x"),y.style.top=A-this.getItemHeight(y)/2+"px",y.setAttribute("x",x),y.setAttribute("x2",v),y.removeAttribute("t"),y.removeAttribute("edt"),y.removeAttribute("et"),c.appendChild(y),v={},v.top=x-l-this.getItemHeight(y)/2,x={},x.element=y,x.properties=
v,p.push(x),this.hasDuration(y)&&w.push(y)):(A=e.getIntAttribute(y,"x"),this.setElemPos(y,A),y.setAttribute("x",x),y.setAttribute("x2",v),y.removeAttribute("t"),y.removeAttribute("edt"),y.removeAttribute("et"),v=e.getIntAttribute(y,"h"),z?itemY=AdfDhtmlTimelineSeriesPeer.calculateRandomY(h,v,this.getTimeAxisHeight()):(y.removeAttribute("y"),itemY=AdfDhtmlTimelineSeriesPeer.calculateY(y,F,D,this._itemSpacing),!d||t?(itemY=g-itemY-v-this._durationHeight,0>itemY&&itemY<B&&(B=itemY),this._databodyHeight=
Math.max(this._databodyHeight,g-itemY),itemY+=this._durationHeight):(v=itemY+v+this.getTimeAxisHeight()+this._durationHeight,v>h&&v>B&&(B=v),this._databodyHeight=Math.max(this._databodyHeight,v))),c.appendChild(y),v={},AdfPage.PAGE.getLocaleContext().isRightToLeft()?v.right=x-l:v.left=x-l,v.top=itemY,x={},x.element=y,x.properties=v,p.push(x),this.hasDuration(y)&&(y._itemY=itemY,w.push(y))))):(f?(A.style.top=m+"px",c.appendChild(A),this.adjustBubble(A,h),v=e.getIntAttribute(A,"h"),null==v&&(v=this.getItemHeight(A),
A.setAttribute("h",v)),v={},v.top=x-l-this.getItemHeight(A)/2,x={},x.element=A,x.properties=v,p.push(x),this.hasDuration(A)&&w.push(A)):(c.appendChild(A),this.setElemPos(A,m),itemY=AdfDhtmlTimelineSeriesPeer.calculateY(A,F,D,this._itemSpacing),v=e.getIntAttribute(A,"h"),null==v&&(v=this.getItemHeight(A),A.setAttribute("h",v)),!d||t?(itemY=g-itemY-v-this._durationHeight,0>itemY&&itemY<B&&(B=itemY),this._databodyHeight=Math.max(this._databodyHeight,g-itemY),itemY+=this._durationHeight):(v=itemY+v+this.getTimeAxisHeight()+
this._durationHeight,v>h&&v>B&&(B=v),this._databodyHeight=Math.max(this._databodyHeight,v)),v=A.firstChild,0>v.offsetLeft+v.offsetWidth&&this.setElemPos(v,-6),v={},AdfPage.PAGE.getLocaleContext().isRightToLeft()?v.right=x-l:v.left=x-l,v.top=itemY,x={},x.element=A,x.properties=v,p.push(x),this.hasDuration(A)&&(A._itemY=itemY,w.push(A))),this.adjustTip(A))}for(A=n.length-2;0<=A;A--)this._unregisterNode(n[A]),b.removeChild(n[A]);if(-1!=B){if(d&&!t)b.style.height=B+"px",q.style.bottom=B-h-this.getDomElement().offsetTop+
"px",r.style.bottom=B-h-this.getDomElement().offsetTop+"px";else{A=0-B;for(a=0;a<p.length;a++)x=p[a],v=x.properties,null!=v.top&&(v.top+=A,x.element._itemY+=A);b.style.height=g+A+"px";this.scrollVertical(A)}null!=this._bottomHotspot&&(this._bottomHotspot.style.visibility="visible")}else null!=this._bottomHotspot&&(this._bottomHotspot.style.visibility="hidden");this.prepareDurations(w);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<w.length;e++)A=w[e],f=A.childNodes[3],f.style.zIndex=100-f._dL,v=AdfAgent.AGENT.getIntAttribute(A,"x2")-AdfAgent.AGENT.getIntAttribute(A,"x"),f.style[g]=v+"px",n=18+10*f._dL,f.style[b]=n+"px",A._itemY?(q=A._itemY,A._itemY=null):q=parseInt(A.style[a]),
f.style[a]?(v={},v[a]=h(A,n,q,d),x={},x.element=f,x.properties=v,p.push(x)):f.style[a]=h(A,n,q,d)+"px";this.renderOverviewTicks(c);this.getTimelinePeer().restoreFocusPos();AdfPage.PAGE.scheduleTimer(this,this.animateDelay,{animationObjects:p,newTimeAxis:r},0)}};AdfDhtmlTimelineSeriesPeer.prototype.animateDelay=function(a){AdfDvtAnimator.ANIMATOR.animate(this,a.animationObjects,1E3,AdfDhtmlTimelineSeriesPeer.zoomComplete,[this,a.newTimeAxis])};
AdfDhtmlTimelineSeriesPeer.zoomComplete=function(a,b){var c=a.getDatabody(),d=c.childNodes;a.showFeelersForBlock(d[0],c.offsetHeight);if(a.hasTimeAxis())var e=d[0],f=a.getTimeAxis(e);null!=f&&null!=b&&(a.isOverviewAbove()?b.style.top=f.style.top:b.style.bottom=f.style.bottom,e.replaceChild(b,f),c=[],d={},d.element=b,d.properties={alpha:100},c.push(d),AdfPage.PAGE.scheduleTimer(a,a.timeAxisFadeInDelay,{peer:a,animationObjects:c},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=[],w=this.getInitialItemY(this.isOfflineMode()),v=0;v<m.length;v++){var x=m[v],z=this.getElemPos(x),t=d.getIntAttribute(x,"st");null==
t&&(t=AdfTimelineUtils.getPositionDate(f,g,z,h),isNaN(t)||x.setAttribute("st",t));var B=d.getIntAttribute(x,"et"),F=this.getElemPos(x)+this.getElemSize(x);null==B&&(B=AdfTimelineUtils.getPositionDate(f,g,F,h),isNaN(B)||x.setAttribute("et",B));t=AdfTimelineUtils.getDatePosition(f,g,t,a);B=AdfTimelineUtils.getDatePosition(f,g,B,a);this.setElemPos(x,t);this.setElemSize(x,B-t);var B=x.childNodes,F=null,D=0;p&&(F=this.getTimeAxis(x),D=1);for(x=D;x<B.length-1;x++){var D=B[x],A=this.getElemPos(D)+z;if(!isNaN(A)){var y=
d.getIntAttribute(D,"t");null==y&&(y=AdfTimelineUtils.getPositionDate(f,g,A,h),isNaN(y)||D.setAttribute("t",y));if(this.hasDuration(D)){var E=D.childNodes[3],G=d.getIntAttribute(D,"edt");null==G&&(G=AdfTimelineUtils.getPositionDate(f,g,A+(AdfAgent.AGENT.getIntAttribute(D,"x2")-AdfAgent.AGENT.getIntAttribute(D,"x")),h),isNaN(G)||D.setAttribute("edt",G))}var H=-1,I=this.getElemSize(D);null==I||isNaN(I)||(H=d.getIntAttribute(D,"et"),null==H&&(H=AdfTimelineUtils.getPositionDate(f,g,A+parseInt(I),h),isNaN(H)||
D.setAttribute("et",H)),H=AdfTimelineUtils.getDatePosition(f,g,H,a));A={};y=AdfTimelineUtils.getDatePosition(f,g,y,a);if(G)var u=AdfTimelineUtils.getDatePosition(f,g,G,a);this.setElemPos(D,y-t);if(-1!=H)this.setElemSize(D,H-y);else{if(null!=d.getIntAttribute(D,"x")&&(D.setAttribute("x",y),u&&D.setAttribute("x2",u),!l)){D.removeAttribute("y");var C=AdfDhtmlTimelineSeriesPeer.calculateY(D,m,w,this._itemSpacing);A.top=!p||q?n-C-d.getIntAttribute(D,"h"):C}y={noclean:!0};y.element=D;y.properties=A;r.push(y);
if(this.hasDuration(D)){E.style.zIndex=100-E._dL;A={};this.isVertical()?(H=AdfAgent.AGENT.getIntAttribute(D,"x2")-AdfAgent.AGENT.getIntAttribute(D,"x"),y=18+10*E._dL,A.left=D.parentNode.offsetWidth-parseInt(D.style.left)-y-this.getTimeAxisWidth()-1):(y=AdfAgent.AGENT.getIntAttribute(D,"x2")-AdfAgent.AGENT.getIntAttribute(D,"x"),H=18+10*E._dL,A.top=!p||q?C-n+d.getIntAttribute(D,"h"):n-C-H-this.getTimeAxisHeight()-1);I=Math.min(10,y/2);for(k=0;3>k;k++){var J=D.childNodes[k];J.style.marginLeft=I+"px"}(J=
D.childNodes[4])&&(J.style.marginLeft=I+"px");E.style.height=H+"px";E.style.width=y+"px";y={noclean:!0};y.element=E;y.properties=A;r.push(y)}}}}p&&!AdfTimelineUtils.supportsTouch()&&this.resizeTimeAxis(F,a,b)}AdfDvtAnimator.ANIMATOR.animate(this,r,1E3,AdfDhtmlTimelineSeriesPeer.databodyWidthChangeAnimationComplete,Array(this));this.setElemSize(this.getDomElement(),a);!c||!p||null!=this._fetchingTimeAxis&&this._fetchingTimeAxis||(a=this.getScroller(),b=m[m.length-1],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),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=1==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=1==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 1==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();a.shiftKey&&d?this._selIsSelected(c)?this._selUnselectItem(c,b):this._selSelectItem(c,b):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();a.shiftKey&&d?this._selIsSelected(c)?this._selUnselectItem(c,b):this._selSelectItem(c,b):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};