(function(dvt) {
dvt.AdfDiagram=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(dvt.AdfDiagram,dvt.BaseDiagram,"dvt.AdfDiagram");dvt.AdfDiagram.INIT_ANIM_EXPLODE="initAnimExplode";dvt.AdfDiagram.INIT_ANIM_ELASTIC_EXPLODE="initAnimElasticExplode";dvt.AdfDiagram.INIT_ANIM_GROW_LINKS="initAnimGrowLinks";dvt.AdfDiagram.INIT_ANIM_POP="initAnimPop";dvt.AdfDiagram.INIT_ANIM_EXPLODE_GROW_LINKS="initAnimExplodeGrowLinks";dvt.AdfDiagram.INIT_ANIM_ELASTIC_EXPLODE_GROW_LINKS="initAnimElasticExplodeGrowLinks";
dvt.AdfDiagram.INIT_ANIM_POP_GROW_LINKS="initAnimPopGrowLinks";dvt.AdfDiagram.ISOLATE_TYPE_INTERSECT="isolateTypeIntersect";dvt.AdfDiagram.ISOLATE_TYPE_UNION="isolateTypeUnion";dvt.AdfDiagram.ISOLATE_TYPE_REPLACE="isolateTypeReplace";dvt.AdfDiagram._ELEM_RESOURCES_CONTROLPANEL="controlPanelResources";dvt.AdfDiagram._ELEM_RESOURCES_LEGEND="legendResources";dvt.AdfDiagram._ELEM_RESOURCES_OVERVIEW="overviewResources";dvt.AdfDiagram._ELEM_RESOURCES_PALETTE="paletteResources";
dvt.AdfDiagram._ELEM_RESOURCES_PANELDRAWER="panelDrawerResources";dvt.AdfDiagram._ELEM_RESOURCES_SEARCHPANEL="searchPanelResources";dvt.AdfDiagram._ELEM_RESOURCES_TRANSIENT_TOOLBAR="transientToolbarResources";dvt.AdfDiagram._ELEM_RESOURCES_NODE="nodeResources";dvt.AdfDiagram.OVERVIEW_MAX_WIDTH=145;dvt.AdfDiagram.OVERVIEW_MAX_HEIGHT=118;dvt.AdfDiagram.OVERVIEW_STYLE="overviewStyle";dvt.AdfDiagram.OVERVIEW_CONTAINER_STYLE="overviewContainerStyle";dvt.AdfDiagram.BUTTON_STATE_ENA=0;
dvt.AdfDiagram.BUTTON_STATE_OVR=1;dvt.AdfDiagram.BUTTON_STATE_DWN=2;dvt.AdfDiagram.BUTTON_STATE_DIS=3;dvt.AdfDiagram._HIGHLIGHT_ANIM_DELAY=.15;dvt.AdfDiagram.UNGROUPED_ID="__UNGROUPED__";dvt.AdfDiagram._SEARCH_PANEL_POS_PADDING=5;dvt.AdfDiagram.LAYOUT_KEY="layoutInfo";dvt.AdfDiagram.ROW_DISCLOSURE_KEY="rowDisclosureInfo";dvt.AdfDiagram.HAS_ROW_DISCLOSURE_LISTENER_KEY="hasRowDisclosureListener";dvt.AdfDiagram.HAS_DRILL_LISTENER_KEY="hasDrillListener";dvt.AdfDiagram.ISOLATED_NODES_KEY="isolatedNodesInfo";
dvt.AdfDiagram.GROUP_BY_KEY="groupByInfo";dvt.AdfDiagram.GROUP_BY_UNGROUPED_KEY="groupByUngroupedInfo";dvt.AdfDiagram.GROUP_BY_HIDDEN_KEY="groupByHiddenInfo";dvt.AdfDiagram.ROOT_ROW_KEY="rootRowKeyInfo";dvt.AdfDiagram.PREVIEW_ROW_KEY="previewRowKey";dvt.AdfDiagram.PREVIEW_PAN_ZOOM_KEY="previewPanZoom";dvt.AdfDiagram._NODE_DETAIL_DELAY=800;dvt.AdfDiagram.PANELCARD_FETCH_EVENT="hv_pcfet";dvt.AdfDiagram.ROWKEY_DELIMITER="$afr$";dvt.AdfDiagram.SYNC_PANEL_CARDS_KEY="syncCards";
dvt.AdfDiagram._BUTTON_SIZE=44;dvt.AdfDiagram._WIDE_BUTTON_SIZE=90;dvt.AdfDiagram._RERENDER_WAIT_TIME_DESKTOP=250;dvt.AdfDiagram._RERENDER_WAIT_TIME_MOBILE=350;dvt.AdfDiagram.newInstance=function(a,b,c){return new dvt.AdfDiagram(a,b,c)};
dvt.AdfDiagram.prototype.Init=function(a,b,c){dvt.AdfDiagram.superclass.Init.call(this,a,b,c);dvt.Agent.isTouchDevice()?this.RerenderWaitTime=dvt.AdfDiagram._RERENDER_WAIT_TIME_MOBILE:this.RerenderWaitTime=dvt.AdfDiagram._RERENDER_WAIT_TIME_DESKTOP;this.EventManager=new dvt.AdfDiagramEventManager(a,this._handleEvent,this);this.EventManager.addListeners(this);this.EventManager.addRolloverType(dvt.AdfDiagramNode);this.EventManager.addRolloverType(dvt.AdfDiagramLink);this._dragSource=this.CreateDragSource(a);
this._dropTarget=new DvtAdfDiagramDropTarget(this);this.EventManager.setDragSource(this._dragSource);this.EventManager.setKeyboardHandler(new DvtAdfDiagramKeyboardHandler(this,this.EventManager));this._nodes={};this._nodesByRowIndex={};this._arNodeIds=[];this._links={};this._linksByRowIndex={};this._arLinkIds=[];this._nodeDefs={};this._linkDefs={};this._layoutAttrs=this._layoutCallback=this._layout=null;this._rootNodes=[];this._linkHighlightBehavior=this._nodeHighlightBehavior=null;this._bPreventNodeDetailWindow=
this._bNodeDetail=!1;this._dataChangeAnim;this._bAnimTransition=!1;this._isolatedNodeMap=this._isolatedNodes=this._arHiddenAttrGrps=this._attrGrpsMap=this._compoundAttrGrpsMap=this._arAttrGrps=null;this._readOnly=!0;this._overviewContent=this._overviewWindow=this._palette=this._legend=null;this._oldOverviewAlpha=this._oldLegendAlpha=1;this._rolloverBehavior=null;this._bCrossedZoomThreshold=!1;this._highlightOverTimer=null;this._stackNodeMap;this._nodeStackMap;this._restoreButton;this._oldDrillBreadcrumbs=
this._drillBreadcrumbs=this._drilledNodePath=this._arCrossContainerLinkIds=null;this._fakeNodeDefCount=0;this._linkCreateEnabled=this._nodeCreateEnabled=!0;this._ignoreRollover=!1;this._zoomingEnabled=this._panningEnabled=!0;this._transientToolbarDataId=this._searchPanel=this._panelDrawer=this._dropFeedbackFillAlpha=this._dropFeedbackBorderColor=this._dropFeedbackFillColor=this._centerNode=this._showRestore=null;this.addEvtListener(dvt.MouseEvent.CLICK,this.HandleClick,!1,this);this.addEvtListener(dvt.MouseEvent.MOUSEDOWN,
this.HandleMouseDown,!1,this);this._bHandleSelectionClick=!1;this._stackPreviewNodeId=null;this._bKeyboardHoverDetails=!1;this._ovContentStyle=null;this._nodeStyles={};this._linkStyles={};this._cardCSSStyle=this._buttonBorderRadius=this._eventType=null;this._cardHeaderStyle={};this._cardNavButtonDisabledStyle=this._cardNavButtonActiveStyle=this._cardNavButtonHoverStyle=this._cardNavButtonStyle=null;this._cardTrainButtonVisible=!0;this._cardPrevButtonDisabledIcon=this._cardPrevButtonActiveIcon=this._cardPrevButtonHoverIcon=
this._cardPrevButtonIcon=this._cardNextButtonDisabledIcon=this._cardNextButtonActiveIcon=this._cardNextButtonHoverIcon=this._cardNextButtonIcon=this._cardTrainButtonActiveStyle=this._cardTrainButtonStyle=null;this._cardIndexes=[];this._nodeAndLoadedCardsMap={};this._visibleNodesByGroupDepth=null;this._bSyncCardOff=!1;this.setDisplayedControls(dvt.ControlPanel.CONTROLS_ALL&~dvt.ControlPanel.CONTROLS_CENTER_BUTTON);this._showPopupBehaviors=null;this._interactionDisableCounter=0;this._automationStatesMap=
null};
dvt.AdfDiagram.prototype.setInteractionEnabled=function(a){a=a?this._interactionDisableCounter-1:this._interactionDisableCounter+1;0==this._interactionDisableCounter&&1==a?(this.EventManager.removeListeners(this),this.getPanZoomCanvas().setInteractionEnabled(!1),this._palette&&this._palette.setInteractionEnabled(!1)):1==this._interactionDisableCounter&&0==a&&(this.EventManager.addListeners(this),this.getPanZoomCanvas().setInteractionEnabled(!0),this._palette&&this._palette.setInteractionEnabled(!0));this._interactionDisableCounter=
a};dvt.AdfDiagram.prototype.resetInteractionEnabled=function(){this._interactionDisableCounter=0;this.clearAutomationState()};dvt.AdfDiagram.prototype.setAnimation=function(a){this.Animation=a};dvt.AdfDiagram.prototype.CreateDragSource=function(a){return new DvtAdfDiagramDragSource(a,this)};dvt.AdfDiagram.prototype.GetInitAnimHelper=function(){return new dvt.AdfDiagramInitAnim(this.getCtx(),this)};dvt.AdfDiagram.prototype.setNodeHighlightBehavior=function(a){this._nodeHighlightBehavior=a};
dvt.AdfDiagram.prototype.getNodeHighlightBehavior=function(){return this._nodeHighlightBehavior};dvt.AdfDiagram.prototype.setLinkHighlightBehavior=function(a){this._linkHighlightBehavior=a};dvt.AdfDiagram.prototype.getLinkHighlightBehavior=function(){return this._linkHighlightBehavior};dvt.AdfDiagram.prototype.setNodeDetail=function(a){this._bNodeDetail=a};dvt.AdfDiagram.prototype.isNodeDetail=function(){return this._bNodeDetail};
dvt.AdfDiagram.prototype.setSelectionMode=function(a){!a||a!=dvt.SelectionHandler.TYPE_SINGLE&&a!=dvt.SelectionHandler.TYPE_MULTIPLE?(this._selectionHandler=null,this._bHandleSelectionClick=!0):(this._selectionHandler=new dvt.SelectionHandler(a),this._bHandleSelectionClick=!1);this.EventManager.setSelectionHandler(this._selectionHandler)};dvt.AdfDiagram.prototype.setRolloverBehavior=function(a){this._rolloverBehavior=a};dvt.AdfDiagram.prototype.getRolloverBehavior=function(){return this._rolloverBehavior};
dvt.AdfDiagram.prototype.SetLegendJson=function(a){this._legendJson=a};dvt.AdfDiagram.prototype.SetPaletteJson=function(a){this._paletteJson=a};dvt.AdfDiagram.prototype.processLegendEvent=function(a,b){var c=a.type;"categoryHide"==c||"categoryShow"==c?this._processHideShowEvent(a):"categoryHighlight"==c?this._processRolloverEvent(a):c==dvt.ResizeEvent.RESIZE_EVENT&&this._legend&&this._legend.FireListener(a)};
dvt.AdfDiagram.prototype._processHideShowEvent=function(a){var b=a.type;a=a.category;var c=this.getHiddenAttributeGroups();c||(c=[]);var c=c.slice(0),d=dvt.ArrayUtils.getIndex(c,a);"categoryHide"==b&&-1==d&&("dim"==this.getRolloverBehavior()&&this._fireRolloverEvent(dvt.EventFactory.newCategoryHighlightEvent(a,!1)),c.push(a));"categoryShow"==b&&-1!=d&&c.splice(d,1);0==c.length&&(c=null);this.setHiddenAttributeGroups(c)};
dvt.AdfDiagram.prototype._processRolloverEvent=function(a){if(!this._ignoreRollover){var b=a.categories,c=this.getHiddenAttributeGroups();c||(c=[]);-1==dvt.ArrayUtils.getIndex(c,b)&&this._fireRolloverEvent(a)}};dvt.AdfDiagram.prototype._fireRolloverEvent=function(a){var b=[],c;for(c in this._nodes){var d=this.getNodeById(c);b.push(d)}for(var e in this._links)c=this.getLinkById(e),b.push(c);dvt.CategoryRolloverHandler.highlight(a.categories,b,!1,.1)};
dvt.AdfDiagram.prototype.StopNodeDetailTimer=function(){this._nodeDetailTimer&&(this._nodeDetailTimer.stop(),this._nodeDetailTimer=null)};dvt.AdfDiagram.prototype.StartNodeDetailTimer=function(){this._nodeDetailTimer=new dvt.Timer(this.getCtx(),dvt.AdfDiagram._NODE_DETAIL_DELAY,this.HandleNodeDetailTimer,this,1);this._nodeDetailTimer.start()};
dvt.AdfDiagram.prototype.HandleNodeDetailTimer=function(){this.StopNodeDetailTimer();var a=null;this._bKeyboardHoverDetails||(a=this.getEventManager().getCurrentMouseTarget());for(var b=!1;a;){if(a instanceof dvt.Button||a instanceof dvt.Train||(a instanceof dvt.OutputText||a instanceof dvt.BackgroundOutputText)&&a.isTruncated()||a instanceof dvt.Text&&a.isTruncated()){b=!0;break}else{var c=dvt.AfComponentFactory.getAfComponent(a);if(c&&c.getShowPopupBehaviors()){b=!0;break}}a=a.getParent()}b&&this.HideNodeHoverDetails();
this._detailNode&&(a=this.CreateNodeDetailContent())&&(b=dvt.AfComponentFactory.getBounds(a),c=new dvt.Dimension(.1*b.w,.1*b.h),this._detailNodeContents=this.CreateNodeDetailWindow(a,b,c),this.PositionNodeDetailWindow(this._detailNodeContents,b,c))};dvt.AdfDiagram.prototype.CreateNodeDetailContent=function(){var a=this.createAfContext(),b=this._detailNode.createDetailContents(a);b&&this._detailNode.renderDetailContents(a);return b};
dvt.AdfDiagram.prototype.CreateNodeDetailWindow=function(a,b,c){b=new dvt.Rect(this.getCtx(),0,0,b.w+2*c.w,b.h+2*c.h);var d=new dvt.SolidFill("#cccccc",.8);b.setFill(d);a.getParent().addChild(b);b.addChild(a);a.setTranslate(c.w,c.h);return b};dvt.AdfDiagram.prototype.PositionNodeDetailWindow=function(a,b,c){var d=1/this.getPanZoomCanvas().getZoom();a.setTranslate(this._detailNode.getTranslateX()-d*(b.w+2*c.w),this._detailNode.getTranslateY()-d*(b.h+2*c.h));a.setScale(d,d)};
dvt.AdfDiagram.prototype._handleEvent=function(a){a.type==dvt.ClientBehaviorEvent.TYPE?this.HandleClientBehaviorEvent(a):this.dispatchEvent(a)};
dvt.AdfDiagram.prototype.HandleClientBehaviorEvent=function(a){var b=a.getParamValue("suppressAnimation"),c=a.getClientBehavior(),d=c.getType();dvt.ClientBehavior.TYPE_RESTORE==d?this.HandleRestore(null,null,b):(a=a.getParamValue("clientRowKey"))&&1<a.length&&"N"==a.charAt(0)&&(a=this.getNodeById(a))&&(dvt.ClientBehavior.TYPE_ISOLATE_LEVELS==d?(d=parseInt(c.getProperty("levels")),a.HandleIsolate(null,null,b,d)):a.isContainer()&&(a.getData().isChildrenFetched()||(c=this.getEventManager().ClientBehaviorHandler,
c.suspendAnimation&&c.suspendAnimation()),dvt.ClientBehavior.TYPE_ROW_DISCLOSURE==d?a.isDisclosed()?a.HandleContainerClose(null,null,b):a.HandleContainerOpen(null,null,b):dvt.ClientBehavior.TYPE_DRILL==d&&a.HandleDrill(null,null,b)))};dvt.AdfDiagram.prototype.HandleMouseDown=function(a){this._bDragged=!1;this.addEvtListener(dvt.MouseEvent.MOUSEMOVE,this.HandleMouseMove,!1,this);this.addEvtListener(dvt.MouseEvent.MOUSEUP,this.HandleMouseUp,!1,this)};
dvt.AdfDiagram.prototype.HandleMouseMove=function(a){this._bDragged=!0};dvt.AdfDiagram.prototype.HandleMouseUp=function(a){this._bDragged=!1;this.removeEvtListener(dvt.MouseEvent.MOUSEMOVE,this.HandleMouseMove,!1,this);this.removeEvtListener(dvt.MouseEvent.MOUSEUP,this.HandleMouseUp,!1,this)};dvt.AdfDiagram.prototype.HandleClick=function(a){this._bDragged||(this._bIgnoreNextClick?this._bIgnoreNextClick=!1:this.HideNodeTransientToolbar())};
dvt.AdfDiagram.prototype.HandleNodeClick=function(a,b){this._bDragged||(this._transientToolbarDataId!=a.getId()?this.ShowNodeTransientToolbar(a,b):this.HideNodeTransientToolbar(!1),this._bIgnoreNextClick=!0,this.getSelectionMode())};dvt.AdfDiagram.prototype.HandleNodeDblClick=function(a){var b=dvt.EventFactory.newActionEvent("setAnchor",a.getData().getTemplateId());b[dvt.BaseComponentEvent.CLIENT_ROW_KEY]=a.getData().getId();this.EventManager.FireEvent(b,this)};
dvt.AdfDiagram.prototype.HandleLinkClick=function(a){this.HideNodeTransientToolbar();this._bIgnoreNextClick=!0;this.getSelectionMode()};dvt.AdfDiagram.prototype.ShowNodeHoverEffect=function(a,b){this._selectedObj||this.ShowHideNodeHoverEffect(a,!0,b)};dvt.AdfDiagram.prototype.HideNodeHoverEffect=function(a){this._selectedObj||this.ShowHideNodeHoverEffect(a,!1)};
dvt.AdfDiagram.prototype.ShowNodeHoverDetails=function(a,b){this._detailNode&&this.HideNodeHoverDetails();this.isNodeDetail()&&.75>=this.getPanZoomCanvas().getZoom()&&(this._detailNode=a,this.StopNodeDetailTimer(),b?this.HandleNodeDetailTimer():this.StartNodeDetailTimer())};
dvt.AdfDiagram.prototype.HideNodeHoverDetails=function(){this.StopNodeDetailTimer();this._detailNode=null;this._detailNodeContents&&(this._detailNodeContents.getParent().removeChild(this._detailNodeContents),this._detailNodeContents=null)};dvt.AdfDiagram.prototype.ShowLinkHoverEffect=function(a,b){this._selectedObj||this.ShowHideLinkHoverEffect(a,!0,b)};dvt.AdfDiagram.prototype.HideLinkHoverEffect=function(a){this._selectedObj||this.ShowHideLinkHoverEffect(a,!1)};
dvt.AdfDiagram.prototype.ShowHideNodeHoverEffect=function(a,b,c){this._ignoreRollover||(b?this._highlightOverTimer||(c?this.ShowHideNodeHoverEffectHelper(a,b):(this._highlightOverTimer=new dvt.Timer(this.getCtx(),1E3*dvt.AdfDiagram._HIGHLIGHT_ANIM_DELAY,function(){this.ShowHideNodeHoverEffectHelper(a,b)},this,1),this._highlightOverTimer.start())):(this._highlightOverTimer&&(this._highlightOverTimer.stop(),this._highlightOverTimer=null),this.ShowHideNodeHoverEffectHelper(a,b)))};
dvt.AdfDiagram.prototype.ShowHideNodeHoverEffectHelper=function(a,b){this.getSelectionMode()&&(a._hover=b);if(null!=this._nodeHighlightBehavior&&-1!=this._nodeHighlightBehavior.indexOf("Node")){var c={},d=this._addHighlightedObjects(a.getData().getId(),c),e=-1!=this._nodeHighlightBehavior.indexOf("In"),f=-1!=this._nodeHighlightBehavior.indexOf("Out"),g=-1!=this._nodeHighlightBehavior.indexOf("End");if(e||f)for(var h in d){var k=this.getNodeById(h),l,m;if(e){var n=k.getInLinkIds();if(n)for(d=0;d<n.length;d++)if(l=
n[d],m=this.getLinkById(l),c[l]=m,g){var p=m.getData().getStartId();m.isPromoted()&&(p=this._containerLinkPromotionMap[l][0]);m&&this._addHighlightedObjects(p,c)}}if(f&&(k=k.getOutLinkIds()))for(d=0;d<k.length;d++)l=k[d],m=this.getLinkById(l),c[l]=m,g&&(n=m.getData().getEndId(),m.isPromoted()&&(n=this._containerLinkPromotionMap[l][1]),this._addHighlightedObjects(n,c))}this._updateAlphas(b,c)}};
dvt.AdfDiagram.prototype._addHighlightedObjects=function(a,b){var c={},d=this._getDescendants(a,!0),e;for(e in d)c[e]=this.getNodeById(e),b[e]=c[e];for(var f in this._links){d=this.getLinkById(f);e=d.getData().getStartId();var g=d.getData().getEndId();c[e]&&c[g]&&(b[f]=d)}return c};
dvt.AdfDiagram.prototype._updateAlphas=function(a,b){if(this._isFlatDiagram()){dvt.CategoryRolloverHandler._updateAlpha([this._linksPane,this._nodesPane],a?.1:1);for(var c in b)b[c]instanceof dvt.AdfDiagramLink&&(a?this.moveToDiagramFront(b[c]):this.moveToLinks(b[c]));for(c in b)b[c]instanceof dvt.AdfDiagramNode&&(a?this.moveToDiagramFront(b[c]):this.moveToNodes(b[c]))}else{c=[];for(var d in this._nodes){var e=this.getNodeById(d);c.push(e)}for(var f in this._links)d=this.getLinkById(f),c.push(d);
for(f=0;f<c.length;f++)d=c[f],e=d.getData().getId(),e=!a||b[e]?1:.1,dvt.CategoryRolloverHandler._updateAlpha(d.getDisplayables(),e)}};dvt.AdfDiagram.prototype._isFlatDiagram=function(){return 1==this.getSortedVisibleNodesByGroupDepth().length};dvt.AdfDiagram.prototype._processNodeHighlight=function(a,b){b&&a.unhighlight()};dvt.AdfDiagram.prototype._processLinkHighlight=function(a,b){a.unhighlight()};
dvt.AdfDiagram.prototype.ShowHideLinkHoverEffect=function(a,b,c){this._ignoreRollover||(b?this._highlightOverTimer||(c?this.ShowHideLinkHoverEffectHelper(a,b):(this._highlightOverTimer=new dvt.Timer(this.getCtx(),1E3*dvt.AdfDiagram._HIGHLIGHT_ANIM_DELAY,function(){this.ShowHideLinkHoverEffectHelper(a,b)},this,1),this._highlightOverTimer.start())):(this._highlightOverTimer&&(this._highlightOverTimer.stop(),this._highlightOverTimer=null),this.ShowHideLinkHoverEffectHelper(a,b)))};
dvt.AdfDiagram.prototype.ShowHideLinkHoverEffectHelper=function(a,b){this.getSelectionMode()&&(a._hover=b);if(null!=this._linkHighlightBehavior&&-1!=this._linkHighlightBehavior.indexOf("Link")){var c={};c[a.getData().getId()]=a;var d=-1!=this._linkHighlightBehavior.indexOf("Start"),e=-1!=this._linkHighlightBehavior.indexOf("End");d&&this._addHighlightedObjects(a.getData().getStartId(),c);e&&this._addHighlightedObjects(a.getData().getEndId(),c);this._updateAlphas(b,c)}};
dvt.AdfDiagram.prototype.setLayout=function(a){var b=this._layout!=a;this._layout=a;this._bRendered&&b&&(a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.AdfDiagram.LAYOUT_KEY,a),this.dispatchEvent(a),this.UpdateLayout(),this.UpdateAriaAttributes())};dvt.AdfDiagram.prototype.UpdateLayout=function(a){dvt.AdfDiagramTransitionUtils.processFilter(this)};dvt.AdfDiagram.prototype.getLayout=function(a){return this._layout};dvt.AdfDiagram.prototype.setLayoutCallback=function(a){this._layoutCallback=a};
dvt.AdfDiagram.prototype.getLayoutCallback=function(){this._layoutCallback||(this._layoutCallback=new DvtAdfDiagramLayoutCallback);return this._layoutCallback};dvt.AdfDiagram.prototype.setLayoutAttributes=function(a,b){this._layoutAttrs||(this._layoutAttrs={});this._layoutAttrs[a]=b};dvt.AdfDiagram.prototype.getLayoutAttributes=function(a){return this._layoutAttrs?this._layoutAttrs[a]:null};
dvt.AdfDiagram.prototype.zoomToFit=function(){var a=new dvt.Animator(this.getCtx(),this.getAnimationDuration());this.getPanZoomCanvas().zoomToFit(a,this.GetViewBounds());a.play()};dvt.AdfDiagram.prototype.zoomAndCenter=function(){this.getPanZoomCanvas()&&this.getPanZoomCanvas().zoomAndCenter()};
dvt.AdfDiagram.prototype.SyncOverviewAndZoomToFit=function(a,b,c,d){var e=!1;a||c||(e=!0,a=new dvt.Animator(this.getCtx(),this.getAnimationDuration()));(c=this.GetLayoutViewport(a))&&(b=c);d||(this.getPanZoomCanvas().zoomToFit(a,b),this._processCenterNode(!0,a),this._processPanZoomSettings(!0,a));this._overviewWindow&&DvtAdfDiagramOverviewUtils.SyncOverviewContent(this,a);e&&a.play()};
dvt.AdfDiagram.prototype.SortNodesByGroupDepth=function(a){for(var b=[],c,d=0;d<this._rootNodes.length;d++)if(c=this.getNodeById(this._rootNodes[d]),a||c.getVisible())1>b.length&&b.push([]),b[0].push(c);0<b.length&&this._sortNodesByGroupDepthHelper(b,b[0],1,a);return b};
dvt.AdfDiagram.prototype._sortNodesByGroupDepthHelper=function(a,b,c,d){for(var e=!1,f=0;f<b.length;f++){var g=b[f],h=g.getChildNodeIds();if(h&&0<h.length&&(g.isDisclosed()||d))for(g=0;g<h.length;g++){var k=this.getNodeById(h[g]);if(d||k.getVisible())a.length<=c&&(e=!0,a.push([])),a[c].push(k)}}e&&this._sortNodesByGroupDepthHelper(a,a[c],c+1,d)};dvt.AdfDiagram.prototype.IsSkinAlta=function(){return this._skinName==dvt.CSSStyle.SKIN_ALTA};dvt.AdfDiagram.prototype.UsePanelDrawer=function(){return!0};
dvt.AdfDiagram.prototype.PreRender=function(){dvt.AdfDiagram.superclass.PreRender.call(this);this._hiddenStackPreviewNode=null;if(this.IsResize()){var a=this.GetStackPreviewNodeId();a&&(this._hiddenStackPreviewNode=this.getNodeById(a),this._hiddenStackPreviewNode.HideStackPreview(!0))}};
dvt.AdfDiagram.prototype.Render=function(){this._handledEventXml||(dvt.AdfDiagram.superclass.Render.call(this),this.InitComponentInternal(),this.RenderComponentInternal());this._handledEventXml=!1;this._hiddenStackPreviewNode&&(this._hiddenStackPreviewNode.ShowStackPreview(!0),this._hiddenStackPreviewNode=null);this.clearAutomationState()};dvt.AdfDiagram.prototype.SetOptions=function(a){dvt.AdfDiagram.superclass.SetOptions.call(this,a);this.GetJsonParser().loadJsonInitial(this.Options)};
dvt.AdfDiagram.prototype.InitComponentInternal=function(){dvt.AdfDiagram.superclass.InitComponentInternal.call(this);var a=null,b=!1;this._panelDrawer&&(b=!0,this._panelDrawer.isDisclosed()&&(a=this._panelDrawer.getDisplayedPanelId()),this._panelDrawer.destroy(),this.removeChild(this._panelDrawer),this._panelDrawer=null);this._overviewWindowPanel&&(this._overviewWindowPanel.destroy(),this.removeChild(this._overviewWindowPanel),this._overviewWindowPanel=null);this.AddPanelDrawer(b,a);this.hasSpaceForOverviewWindowPanel()&&
this._overviewWindow&&this.AddOverviewWindow();this.setContextKeyboardHandlers()};
dvt.AdfDiagram.prototype.AddPanelDrawer=function(a,b){var c,d,e,f,g,h=this._paletteJson&&!this.isReadOnly()&&(this.isNodeCreateEnabled()||this.isLinkCreateEnabled());this._searchPanel&&this._searchPanel.getInitialBehavior()!=dvt.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_HIDDEN&&(g=this._searchPanel);if(this.UsePanelDrawer()&&(this._legendJson||h||g)){this._panelDrawer=this.CreatePanelDrawer("pd");var k;g&&(this.IsSkinAlta()&&(this._panelDrawer.setContentPadding(0),g.setButtonStyle(this.getButtonStyle()),
g.setLabelStyle(this.getLabelStyle())),g.setResultsMaxWidth(this._panelDrawer.getMaxContentWidth()),g.setResultsMaxHeight(this._panelDrawer.getMaxContentHeight()),g.setVisible(!1),g.setState(dvt.SearchPanel.STATE_EMBEDDED),this.RenderSearchPanel(),this._panelDrawer.setMaxContainerHeight(g.getDimensions().h),g.getParent().removeChild(g),g.setVisible(!0),c=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_SEARCH_ICON_ENA],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),
d=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_SEARCH_ICON_OVR],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),e=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_SEARCH_ICON_DWN],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),f=dvt.Bundle.getTranslatedString(dvt.Bundle.SUBCOMPONENT_PREFIX,"SEARCH"),this._panelDrawer.addPanel(g,c,d,e,f,dvt.PanelDrawer.PANEL_SEARCH),k||g.getInitialBehavior()!=dvt.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_EXPANDED||
(k=dvt.PanelDrawer.PANEL_SEARCH));h&&(this._palette=new dvt.Palette(this.getCtx(),"palette",this._panelDrawer.getMaxContentWidth(),this._panelDrawer.getMaxContentHeight(),this.handlePaletteEvent,this,this._dragSource,this.getResourcesMap(),this.getPaletteStyles()),this._palette.setJSON(this._paletteJson),this.addChild(this._palette),this._palette.render(),this._panelDrawer.setMaxContainerHeight(this._palette.getExpandedHeight()),this.removeChild(this._palette),c=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_PALETTE_ICON_ENA],
0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),d=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_PALETTE_ICON_OVR],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),e=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_PALETTE_ICON_DWN],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),f=dvt.Bundle.getTranslatedString(dvt.Bundle.SUBCOMPONENT_PREFIX,"PALETTE"),this._panelDrawer.addPanel(this._palette,c,d,e,f,dvt.PanelDrawer.PANEL_PALETTE),
!k&&this._palette.isDisclosed()&&(k=dvt.PanelDrawer.PANEL_PALETTE));this._legendJson&&(g=this._legendJson,this._legend=dvt.Legend.newInstance(this.getCtx(),this.processLegendEvent,this),this.addChild(this._legend),c=this._getLegendMaxWidthValue(g.maxWidth,this.getWidth()),c=this._legend.getPreferredSize(g,c,this._panelDrawer.getMaxContentHeight()),this._legend.render(g,c.w,c.h),this._panelDrawer.setMaxContainerHeight(this._legend.getContentDimensions().h),this.removeChild(this._legend),c=new dvt.Image(this.getCtx(),
this.getResourcesMap()[dvt.PanelDrawer.PANEL_LEGEND_ICON_ENA],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),d=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_LEGEND_ICON_OVR],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),e=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_LEGEND_ICON_DWN],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),f=dvt.Bundle.getTranslatedString(dvt.Bundle.SUBCOMPONENT_PREFIX,"LEGEND"),this._panelDrawer.addPanel(this._legend,
c,d,e,f,dvt.PanelDrawer.PANEL_LEGEND),k||"true"!=g.disclosed||(k=dvt.PanelDrawer.PANEL_LEGEND));c=null;d=!0;!this.hasSpaceForOverviewWindowPanel()&&this._overviewWindow?(this.AddOverviewWindowTab(this._panelDrawer),this._refreshOverviewContent=!0,e=DvtAdfDiagramOverviewUtils.CalcAdjustedViewport(this,null),this._overviewWindow.setViewportDimensions(e),this._overviewWindowPanel=this._panelDrawer):b===dvt.PanelDrawer.PANEL_OVERVIEW&&(d=!1);a?a&&!b?c=null:a&&b&&d?c=b:a&&b&&!d&&(c=k):c=k;this._panelDrawer.renderComponent();
c&&(this._panelDrawer.setDisplayedPanelId(c),this._panelDrawer.isDisclosed()||this._panelDrawer.setDisclosed(!0,!0))}};dvt.AdfDiagram.prototype.hasSpaceForOverviewWindowPanel=function(){var a=!0,b=this.getHeight();this._panelDrawer&&this._panelDrawer.getMaxContainerHeight()+dvt.AdfDiagram.OVERVIEW_MAX_HEIGHT>=b&&(a=!1);return a};
dvt.AdfDiagram.prototype.AddOverviewWindow=function(){if(this._overviewWindow){this._overviewWindowPanel||(this._overviewWindowPanel=this.CreateOverviewWindowPanel(),this.PositionOverviewWindowPanel(),this.AddOverviewWindowTab(this._overviewWindowPanel),this._overviewWindowPanel.renderComponent(),this._overviewWindowPanel.setDisplayedPanelId(dvt.PanelDrawer.PANEL_OVERVIEW),this._overviewWindowPanel.setDisclosed(this._overviewWindow.isDisclosed(),!0),this._refreshOverviewContent=!0);var a=DvtAdfDiagramOverviewUtils.CalcAdjustedViewport(this,
null);this._overviewWindow.setViewportDimensions(a)}};
dvt.AdfDiagram.prototype.AddOverviewWindowTab=function(a){this._overviewWindow.setVisible(!1);this.addChild(this._overviewWindow);this._overviewWindow.render();this.removeChild(this._overviewWindow);this._overviewWindow.setVisible(!0);var b=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_OVERVIEW_ICON_ENA],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),c=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_OVERVIEW_ICON_OVR],0,0,dvt.PanelDrawer.IMAGE_SIZE,
dvt.PanelDrawer.IMAGE_SIZE),d=new dvt.Image(this.getCtx(),this.getResourcesMap()[dvt.PanelDrawer.PANEL_OVERVIEW_ICON_DWN],0,0,dvt.PanelDrawer.IMAGE_SIZE,dvt.PanelDrawer.IMAGE_SIZE),e=dvt.Bundle.getTranslatedString(dvt.Bundle.SUBCOMPONENT_PREFIX,"OVERVIEW");a.addPanel(this._overviewWindow,b,c,d,e,dvt.PanelDrawer.PANEL_OVERVIEW)};
dvt.AdfDiagram.prototype.CreateOverviewWindowPanel=function(){var a=new dvt.PanelDrawer(this.getCtx(),null,this,"ov");a.addEvtListener(dvt.PanelDrawerEvent.TYPE,this.HandlePanelDrawerEvent,!1,this);a.setDockSide(dvt.PanelDrawer.DOCK_BOTTOM);a.setMaxWidth(dvt.AdfDiagram.OVERVIEW_MAX_WIDTH);a.setMaxHeight(dvt.AdfDiagram.OVERVIEW_MAX_HEIGHT);this.addChild(a);return a};
dvt.AdfDiagram.prototype.CreatePanelDrawer=function(a){this._panelDrawer=new dvt.PanelDrawer(this.getCtx(),null,this,a);this._panelDrawer.addEvtListener(dvt.PanelDrawerEvent.TYPE,this.HandlePanelDrawerEvent,!1,this);this.addChild(this._panelDrawer);this.PositionPanelDrawer();return this._panelDrawer};
dvt.AdfDiagram.prototype.PositionOverviewWindowPanel=function(){this._overviewWindowPanel&&(this._overviewWindowPanel.setTranslateY(this.getHeight()),dvt.Agent.isRightToLeft(this.getCtx())?(this._overviewWindowPanel.setDiscloseDirection(dvt.PanelDrawer.DIR_RIGHT),this._overviewWindowPanel.setTranslateX(0)):this._overviewWindowPanel.setTranslateX(this.getWidth()))};
dvt.AdfDiagram.prototype.PositionPanelDrawer=function(){this._panelDrawer.setMaxWidth(.5*this.getWidth());this._panelDrawer.setMaxHeight(.8*this.getHeight());dvt.Agent.isRightToLeft(this.getCtx())?(this._panelDrawer.setDiscloseDirection(dvt.PanelDrawer.DIR_RIGHT),this._panelDrawer.setTranslateX(0)):this._panelDrawer.setTranslateX(this.getWidth())};
dvt.AdfDiagram.prototype.ProcessNodesAndLinks=function(a){if(!this._bRendered&&!this._bCrossedZoomThreshold||this._renderZoom100Nodes){this._renderZoom100Nodes||this._processHighlighting();for(var b=this.SortNodesByGroupDepth(!0),c=b.length-1;0<=c;c--){var d=this.createAfContext(),e=b[c];this.CreateNodeContentsAtDepth(e,d,a,!0);this.RenderNodesAtDepth(e,d,a,!0)}this._renderZoom100Nodes||this.SetInitialVisibility()}this.RenderLinks();if("global"===this._layoutBehavior)this.LayoutNodesWithGlobalLayout(a);
else for(this.resetSortedNodesArray(),b=this.getSortedVisibleNodesByGroupDepth(),c=b.length-1;0<=c;c--)d=this.createAfContext(),e=b[c],this.CreateNodeContentsAtDepth(e,d,a),this.RenderNodesAtDepth(e,d,a),this._bCrossedZoomThreshold||this.LayoutNodesAtDepth(b,c,a)};
dvt.AdfDiagram.prototype.RenderComponentInternal=function(a){this.setInteractionEnabled(!1);var b=0==this.GetAllNodes().length;if(!b){if(!this._bRendered){var c=this.getDiagramButtonStyles();this._buttonBorderRadius=dvt.AdfDiagram.getButtonBorderRadius(c)}this._bAnimTransition||this.ClearLayoutViewport();this.ProcessNodesAndLinks(a);if(c=null==this._cachedViewBounds)this._cachedViewBounds=this.GetViewBounds(a);if(this._overviewWindow&&this._refreshOverviewContent){var d=DvtAdfDiagramOverviewUtils.CreateOverviewContent(this,
this._cachedViewBounds,this.getOverviewWindowContentStyle());this._overviewWindow.setContent(d);this._refreshOverviewContent=!1}d=this.getPanZoomCanvas();if(this.IsResize()&&!this.IsLayoutViewport()){var e=this.AdjustMinZoom(a,this._cachedViewBounds);e||(e=this.GetViewBounds());d.center(null,e)}this._processInitialSelections();if(!this._bRendered&&!this._bCrossedZoomThreshold||this._renderZoom100Nodes){this._bInitDisclosedNodes=!1;this.AdjustMinZoom(a,this._cachedViewBounds);if(!this.IsResize()){var f=
(e=this.IsLayoutViewport())?this.GetLayoutViewport():this._cachedViewBounds;e&&d.setZoomToFitPadding(0);this._renderZoom100Nodes||this._panZoom&&!e||d.zoomToFit(null,f)}this._syncOverviewAndPanZoom&&this._overviewWindow&&(DvtAdfDiagramOverviewUtils.ZoomToFitOverviewContent(this,this._cachedViewBounds,a),d.zoomTo(d.getZoom(),d.getPanX(),d.getPanY(),a),d.panTo(d.getPanX(),d.getPanY(),a));e=this._bAnimTransition||this._imageNotReadyList&&0<this._imageNotReadyList.length?!1:!0;this._processCenterNode(e,
a);this._processPanZoomSettings(e,a);d.setPanningEnabled(this._panningEnabled);d.setPanDirection(this.getPanDirection());d.setZoomingEnabled(this._zoomingEnabled);d.setZoomToFitEnabled(this._zoomingEnabled);dvt.Agent.isEnvironmentBrowser()&&this.getInitAnim()&&this.IsInitAnimEnabled()&&(d=this.GetInitAnimHelper(),this._overviewWindow&&(this._overviewWindowPanel.setAlpha(0),e=new dvt.AnimFadeIn(this.getCtx(),this._overviewWindowPanel,this.getAnimationDuration()),d.setOnEnd(e.play,e)),d.play(this.getInitAnim()));
this._bAnimTransition&&(this._bAnimTransition=!1,dvt.AdfDiagramTransitionUtils.__animateTransition(this,!0),this.ClearLayoutViewport())}a?dvt.Playable.appendOnEnd(a,this._toggleRestoreButton,this):this._toggleRestoreButton();this.UpdateDrillBreadcrumbs(a);this.UpdateKeyboardFocus();this._bRendered=!0;this._currentViewport=null;this.UsePanelDrawer()||(this.getSearchPanel()&&this.getSearchPanel().getInitialBehavior()!=dvt.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_HIDDEN?this.RenderSearchPanel():this.RemoveSearchPanel())}this.RefreshEmptyText(b);
this.IsPanningEnabled()&&(b=this._cachedViewBounds,null!=b&&(d=this.getPanZoomCanvas().getZoom(a),this.ConstrainPanning(b.x,b.y,b.w,b.h,d)));this._renderZoom100Nodes=null;this._bAfImageLoaded=!1;a||this.processPreviewStack(this);c&&(this._cachedViewBounds=null);this.setInteractionEnabled(!0)};
dvt.AdfDiagram.prototype.processPreviewStack=function(){if(this._stackPreviewNode){var a=this.getNodeById(this._stackPreviewNode);a&&a._stackBadgeHandler.ShowDialog(null,!0);this._stackPreviewPanZoom&&(a._stackBadgeHandler.ApplyLayoutPanZoom(this._stackPreviewPanZoom),this._stackPreviewPanZoom=null);this._stackPreviewNode=null}};dvt.AdfDiagram.prototype.SetInitialVisibility=function(){dvt.AdfDiagramTransitionUtils.setVisibility(this)};
dvt.AdfDiagram.prototype._toggleRestoreButton=function(){this._isolatedNodes&&0<this._isolatedNodes.length?this.ShowRestoreButton():this.HideRestoreButton()};
dvt.AdfDiagram.prototype._processInitialSelections=function(){if(this._selectionHandler&&(this._selectedNodes||this._selectedLinks)){var a=[],b;for(b in this._nodes){var c=this.getNodeById(b);c.setSelected(!1);a.push(c)}for(var d in this._links)b=this.getLinkById(d),b.setSelected(!1),a.push(b);d=[];if(this._selectedNodes)for(var e in this._selectedNodes)d.push(this._selectedNodes[e]);if(this._selectedLinks)for(e in this._selectedLinks)d.push(this._selectedLinks[e]);this._selectionHandler.processInitialSelections(d,
a);this._selectedLinks=this._selectedNodes=null}};
dvt.AdfDiagram.prototype._processHighlighting=function(){if(this._highlightedNodes||this._highlightedLinks){var a={};if(this._highlightedNodes)for(var b=0;b<this._highlightedNodes.length;b++)a[this._highlightedNodes[b]]=this._highlightedNodes[b];if(this._highlightedLinks)for(b=0;b<this._highlightedLinks.length;b++)a[this._highlightedLinks[b]]=this._highlightedLinks[b];for(var c in this._nodes)this.getNodeById(c).SetMaxAlpha(a[c]?1:.1);for(var d in this._links)this.getLinkById(d).SetMaxAlpha(a[d]?1:
.1)}};dvt.AdfDiagram.prototype.RenderLinks=function(){for(var a in this._links){var b=this.getLinkById(a);b.getVisible()&&b.renderLink()}};
dvt.AdfDiagram.prototype.RenderNodesAtDepth=function(a,b,c,d){for(var e,f=0;f<a.length;f++){var g=a[f];this._renderZoom100Nodes&&d?this._renderZoom100Nodes[g.getData().getId()]&&(e=g.getForceZoom100Facet(),g.setForceZoom100Facet(!0),g.ClearNodeSize(),g.isDisclosed()?(g.setDisclosed(!1),g.renderNode(b,c),g.setDisclosed(!0)):g.renderNode(b,c),g.setForceZoom100Facet(e)):g.renderNode(b,c)}};
dvt.AdfDiagram.prototype.LayoutNodesWithGlobalLayout=function(a){for(var b=this.getLayout(),c=this.CreateLayoutContext(b),d=0;d<this._rootNodes.length;d++){var e=this.getNodeById(this._rootNodes[d]),f=this.CreateLayoutContextNode(e,b,!0,c);this._addChildren(e,f,b,c);c.addNode(f)}for(var g in this._links)if(d=this.getLinkById(g),d.getVisible()){e=d.getData().getStartId();f=d.getData().getEndId();if(this._containerLinkPromotionMap&&this._containerPromotionLinkMap){var h=this._containerLinkPromotionMap[g];
h&&(e=h[0],f=h[1])}this.getNodeById(e).getVisible()&&this.getNodeById(f).getVisible()&&(d=this.CreateLayoutContextLink(d,e,f,b,c),c.addLink(d))}if(0<c.getNodeCount()&&(c=this.getLayoutCallback().doLayout(this,c))){b=c.getNodeCount();for(d=0;d<b;d++)e=c.getNodeByIndex(d),e.IsRendered||this.renderNodeFromContext(e);this.ApplyLayoutContext(c,a)}};
dvt.AdfDiagram.prototype._addChildren=function(a,b,c,d){if(a.isDisclosed()){a=a.getChildNodeIds();for(var e=[],f=0;f<a.length;f++){var g=this.getNodeById(a[f]);if(g.getVisible()){var h=this.CreateLayoutContextNode(g,c,!0,d);d.addNodeToMap(h);h.setParentNode(b);e.push(h);this._addChildren(g,h,null,d)}}b.setChildNodes(e)}};
dvt.AdfDiagram.prototype.LayoutNodesAtDepth=function(a,b,c){a=a[b];b={};for(var d=0;d<a.length;d++){var e=a[d];if(e.getVisible()){var f=e.getData().getGroupId();f||(f=dvt.AdfDiagram.UNGROUPED_ID);b[f]||(b[f]=[]);b[f].push(e)}}for(var g in b)this.LayoutNodes(g,b[g],this.GetLayoutAppliedToNode(b[g][0]),c)};
dvt.AdfDiagram.prototype.LayoutNodes=function(a,b,c,d){if(this.getLayoutCallback()){var e=a;e==dvt.AdfDiagram.UNGROUPED_ID&&(e=null);for(var e=this.CreateLayoutContext(c,null,e),f={},g=0;g<b.length;g++)e.addNode(this.CreateLayoutContextNode(b[g],c,!1,e)),f[b[g].getData().getId()]=!0;b=null;g=!0;a!=dvt.AdfDiagram.UNGROUPED_ID&&(b=this.getNodeById(a),g=!1);a=null;a=b?b.getCrossChildLinkIds():this._arCrossContainerLinkIds;for(var h in this._links){var k=this.getLinkById(h);if(k.getVisible()&&(!a||-1==
dvt.ArrayUtils.getIndex(a,h))){var l=k.getData().getStartId(),m=k.getData().getEndId();if(this._containerLinkPromotionMap&&this._containerPromotionLinkMap){var n=this._containerLinkPromotionMap[h];n&&(l=n[0],m=n[1])}f[l]&&f[m]&&(k=this.CreateLayoutContextLink(k,l,m,c,e),e.addLink(k))}}this.AddCrossContainerLinksToLayoutContext(e,b,d);0<e.getNodeCount()&&(this.SortLayoutContext(e),(e=this.getLayoutCallback().doLayout(this,e))&&this.ApplyLayoutContext(e,d,g))}};
dvt.AdfDiagram.prototype.AddCrossContainerLinksToLayoutContext=function(a,b,c){var d=null,e=null,f=a.getLayout();b?(d=b.getCrossChildLinkIds(),e=b.getData().getId()):d=this._arCrossContainerLinkIds;if(d)for(b=0;b<d.length;b++){var g=d[b],h=this.getLinkById(g);if(h.getVisible()){var k=h.getData().getStartId(),l=h.getData().getEndId();this._containerLinkPromotionMap&&this._containerPromotionLinkMap&&(g=this._containerLinkPromotionMap[g])&&(k=g[0],l=g[1]);h=this.CreateLayoutContextLink(h,k,l,f,a);a.addLink(h);
k=this.getNodeById(k);l=this.getNodeById(l);k=this.GetContainerIdArray(k);l=this.GetContainerIdArray(l);this._addCrossContainerNodes(a,e,k,c);this._addCrossContainerNodes(a,e,l,c)}}};
dvt.AdfDiagram.prototype.SortLayoutContext=function(a){var b=this,c=function(a,b){var c=a.getData().getRowIndex(),g=b.getData().getRowIndex();return c==g?0:c>g?1:-1};a._arNodes.sort(function(a,e){return c(b.getNodeById(a.getId()),b.getNodeById(e.getId()))});a._arLinks.sort(function(a,e){return c(b.getLinkById(a.getId()),b.getLinkById(e.getId()))})};
dvt.AdfDiagram.prototype.GetLayoutAppliedToNode=function(a){var b=this.getLayout();a&&(a=a.getData().getGroupId())&&(a=this.getNodeById(a).getLayout())&&(b=a);return b};
dvt.AdfDiagram.prototype.CreateLayoutContext=function(a,b,c){a||(a=this.getLayout());b||(b=this.getLayoutAttributes(a));var d=this.CreateEmptyLayoutContext();d.setLayout(a);d.setLayoutAttributes(b);c&&(d.setContainerId(c),(a=this.getNodeById(c))&&(a=a.getContainerPadding())&&d.setContainerPadding(dvt.BaseDiagram.getLayoutContainerPadding(a)));if(this._bRendered||this._currentViewport)a=this._currentViewport?this._currentViewport:this.getPanZoomCanvas().getViewport(),b=this._layoutOffset?this._layoutOffset:
new dvt.Point(0,0),a=new dvt.DiagramRectangle(a.x-b.x,a.y-b.y,a.w,a.h),d.setCurrentViewport(a);return d};dvt.AdfDiagram.prototype._resetTransitionState=function(){this._linksPostStack=this._nodesPostStack=this._linksPostIsolate=this._nodesPostIsolate=this._linksPostDrill=this._nodesPostDrill=this._linksPostFilter=this._nodesPostFilter=null};dvt.AdfDiagram.prototype.GetXmlDomParser=function(){return new dvt.AdfDiagramParser(this)};
dvt.AdfDiagram.prototype.GetJsonParser=function(){return new dvt.AdfDiagramJsonParser(this.GetXmlDomParser(),this)};dvt.AdfDiagram.prototype.CreateNode=function(a){return new dvt.AdfDiagramNode(this.getCtx(),a,this)};dvt.AdfDiagram.prototype.CreateLink=function(a){return new dvt.AdfDiagramLink(this.getCtx(),a,this)};
dvt.AdfDiagram.prototype.addNodeData=function(a){var b=a.getId(),c=this.getNodeById(b);if(c)if(c.getData().isStructureOnly())c._data=a;else return;else c=this.CreateNode(a),this._nodes[b]=c,this._nodesByRowIndex[a.getRowIndex()]=c,this._arNodeIds.push(b);if(!a.isStructureOnly()){c.setNodeDef(this.GetNodeDef(a.getTemplateId()));var d=a.getGroupId();d?this.getNodeById(d).addChildNode(c):(this._nodesPane.addChild(c),this._rootNodes.push(b));this._bRendered&&this._newNodes&&this._newNodes.push(c);if(a=
a.getAttributeGroups()){this._attrGrpsMap||(this._attrGrpsMap={});for(var d=a.length,e=0;e<d;e++){var f=a[e];if(f){var g=this._attrGrpsMap[f];g||(g=[],this._attrGrpsMap[f]=g);g.push(b)}}}if(a=this._cardIndexes){e=d=-1;if(0<a.length)for(f=dvt.AfPanelCard.DISPLAYED_DETAIL_ITEM_INDEX_KEY,g=0;g<a.length;g++){var h=a[g];h&&2==h.length&&(h[0]==dvt.AdfDiagram.SYNC_PANEL_CARDS_KEY?(d=g,h=this._findPanelCardIndex(c,h[1]),c.setStateProp(f,h)):h[0]==b&&(e=g,c.setStateProp(f,h[1])))}d>e&&-1!=e&&a.splice(e,1)}}};
dvt.AdfDiagram.prototype.addLinkData=function(a){if(!this.getLinkById(a.getId())){var b=this.CreateLink(a);b.setLinkDef(this.GetLinkDef(a.getTemplateId()));this._links[a.getId()]=b;this._linksByRowIndex[a.getRowIndex()]=b;this._arLinkIds.push(a.getId());var c=this.getNodeById(a.getStartId()),d=this.getNodeById(a.getEndId());if(c&&d){c.addOutLinkId(a.getId());d.addInLinkId(a.getId());var e=a.getGroupId(),c=c.getData().getGroupId(),d=d.getData().getGroupId();e?e==c&&e==d?this.getNodeById(e).addChildLink(b):
this.getNodeById(e).addCrossChildLink(b):c||d?(this._nodesPane.addChild(b),b._linkParent=this._nodesPane,b._bCrossContainerLink=!0,this._arCrossContainerLinkIds||(this._arCrossContainerLinkIds=[]),this._arCrossContainerLinkIds.push(a.getId())):(this._linksPane.addChild(b),b._linkParent=this._linksPane,b._bCrossContainerLink=!1)}}};
dvt.AdfDiagram.prototype.GetContainerIdArray=function(a){var b=[a.getData().getId()];for(a=a.getData().getGroupId();a;)b||(b=[]),b.push(a),a=this.getNodeById(a).getData().getGroupId();b&&b.reverse();return b};dvt.AdfDiagram.prototype.getNodeById=function(a){return this._nodes[a]};dvt.AdfDiagram.prototype.GetNodeByRowIndex=function(a){return this._nodesByRowIndex[a]};dvt.AdfDiagram.prototype.getLinkById=function(a){return this._links[a]};dvt.AdfDiagram.prototype.GetLinkByRowIndex=function(a){return this._linksByRowIndex[a]};
dvt.AdfDiagram.prototype.addNodeDef=function(a){this._nodeDefs[a.getId()]=a};dvt.AdfDiagram.prototype.addLinkDef=function(a){this._linkDefs[a.getId()]=a};dvt.AdfDiagram.prototype.GetNodeDef=function(a){return this._nodeDefs[a]};dvt.AdfDiagram.prototype.GetLinkDef=function(a){return this._linkDefs[a]};
dvt.AdfDiagram.prototype.CreateNodeContentsAtDepth=function(a,b,c,d){for(var e=0;e<a.length;e++){var f=a[e];if(d)if(this._renderZoom100Nodes){if(this._renderZoom100Nodes[f.getData().getId()]){var g=f.getForceZoom100Facet();f.setForceZoom100Facet(!0);f.isDisclosed()?(f.setDisclosed(!1),f.createNodeContents(b,c),f.setDisclosed(!0)):f.createNodeContents(b,c);f.setForceZoom100Facet(g)}}else f.createNodeContents(b,c);else f.createNodeContents(b,c)}};
dvt.AdfDiagram.prototype.SetStackPreviewNodeId=function(a){this._stackPreviewNodeId=a};dvt.AdfDiagram.prototype.GetStackPreviewNodeId=function(){return this._stackPreviewNodeId};dvt.AdfDiagram.prototype.IsStackPreview=function(){return this._stackPreviewNodeId?!0:!1};
dvt.AdfDiagram.prototype.HandlePanelDrawerEvent=function(a){var b=a.getActivePanel();a=a.getSubType()==dvt.PanelDrawerEvent.SUBTYPE_SHOW;var c=dvt.EventFactory.newAdfPropertyChangeEvent();if(b==dvt.PanelDrawer.PANEL_OVERVIEW&&this._overviewWindowPanel!=this._panelDrawer)c.properties[dvt.OverviewWindow.OVERVIEW_DISCLOSED_KEY]=a;else if(this._legend&&(c.properties[dvt.PanZoomComponent.LEGEND_DISCLOSED_EVENT_KEY]=b==dvt.PanelDrawer.PANEL_LEGEND&&a),this._palette&&(c.properties[dvt.Palette.PALETTE_DISCLOSED_KEY]=
b==dvt.PanelDrawer.PANEL_PALETTE&&a),this._overviewWindow&&this._overviewWindowPanel==this._panelDrawer&&(c.properties[dvt.OverviewWindow.OVERVIEW_DISCLOSED_KEY]=b==dvt.PanelDrawer.PANEL_OVERVIEW&&a),this._searchPanel){b=new dvt.SearchEvent(b==dvt.PanelDrawer.PANEL_SEARCH&&a?dvt.SearchEvent.SEARCH_EXPAND_EVENT:dvt.SearchEvent.SEARCH_COLLAPSE_EVENT);this.dispatchEvent(b);return}this.dispatchEvent(c);this.setContextKeyboardHandlers()};
dvt.AdfDiagram.prototype.HandlePanEvent=function(a){var b=a.getSubType();dvt.AdfDiagram.superclass.HandlePanEvent.call(this,a);if(b===dvt.PanEvent.SUBTYPE_PANNED){if(this.IsStackPreview()){this._updatePreviewStackPanZoomState(!1);return}this._updatePanZoomState(!1)}this.HideNodeTransientToolbar(!0);this.HideNodeHoverDetails();this._legendPanel&&(b===dvt.PanEvent.SUBTYPE_DRAG_PAN_BEGIN?this._legendPanel.setMouseEnabled(!1):b===dvt.PanEvent.SUBTYPE_DRAG_PAN_END&&this._legendPanel.setMouseEnabled(!0));
this._palettePanel&&(b===dvt.PanEvent.SUBTYPE_DRAG_PAN_BEGIN?this._palettePanel.setMouseEnabled(!1):b===dvt.PanEvent.SUBTYPE_DRAG_PAN_END&&this._palettePanel.setMouseEnabled(!0));this._overviewWindowPanel&&(b===dvt.PanEvent.SUBTYPE_PANNING?DvtAdfDiagramOverviewUtils.HandlePanEvent(this,a):b===dvt.PanEvent.SUBTYPE_DRAG_PAN_BEGIN?this._overviewWindowPanel.setMouseEnabled(!1):b===dvt.PanEvent.SUBTYPE_DRAG_PAN_END&&this._overviewWindowPanel.setMouseEnabled(!0));this._panelDrawer?b===dvt.PanEvent.SUBTYPE_DRAG_PAN_BEGIN?
this._panelDrawer.deEmphasizeStart():b===dvt.PanEvent.SUBTYPE_DRAG_PAN_END&&this._panelDrawer.deEmphasizeEnd():this.getSearchPanel()&&(b===dvt.PanEvent.SUBTYPE_DRAG_PAN_BEGIN?this.getSearchPanel().deEmphasizeStart():b===dvt.PanEvent.SUBTYPE_DRAG_PAN_END&&this.getSearchPanel().deEmphasizeEnd())};
dvt.AdfDiagram.prototype.HandleZoomEvent=function(a){var b=a.getSubType();dvt.AdfDiagram.superclass.HandleZoomEvent.call(this,a);if(this.IsStackPreview())this._updatePreviewStackPanZoomState(b==dvt.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_END);else{switch(b){case dvt.ZoomEvent.SUBTYPE_ADJUST_PAN_CONSTRAINTS:if(this.IsPanningEnabled()){var c=a.getNewZoom(),d=this._cachedViewBounds?this._cachedViewBounds:this.GetViewBounds(a.getAnimator());this.ConstrainPanning(d.x,d.y,d.w,d.h,c)}break;case dvt.ZoomEvent.SUBTYPE_ZOOMING:this.HideNodeFlyOuts(!0);
this.HideNodeHoverDetails();break;case dvt.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_CALC_BOUNDS:this.IsLayoutViewport()||(d=this._cachedViewBounds?this._cachedViewBounds:this.GetViewBounds(a.getAnimator()),a.setZoomToFitBounds(d));break;case dvt.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_BEGIN:this._setRerenderImmediate(!0);break;case dvt.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_END:this._updatePanZoomState(!0);this._setRerenderImmediate(!1);break;case dvt.ZoomEvent.SUBTYPE_ZOOM_AND_CENTER:this.HandleZoomAndCenter(a);break;case dvt.ZoomEvent.SUBTYPE_ZOOMED:a.getOldZoom()!==
a.getNewZoom()&&(this._zoomBeforeRender||(this._zoomBeforeRender=a.getOldZoom()),d=this.getCtx(),dvt.Agent.isEnvironmentBrowser()&&this._bRendered&&!this._getRerenderImmediate()?(this.RerenderTimer?this.RerenderTimer.reset():this.RerenderTimer=new dvt.Timer(d,this.RerenderWaitTime,this.Rerender,this,1),this.RerenderTimer.start()):this.Rerender());(d=this.GetTransientToolbarDataId())&&(d=this.getNodeById(d))&&d.IsTransientToolbarOnClick()&&d.RefreshTransientToolbar();for(c in this._nodes)d=this.getNodeById(c),
d.getVisible()&&d.RefreshContainerBadgeVisibility();this._updatePanZoomState(!1);break;case dvt.ZoomEvent.SUBTYPE_ZOOM_END:for(c in this._nodes)d=this.getNodeById(c),d.cleanUp()}this._legendPanel&&(b===dvt.ZoomEvent.SUBTYPE_DRAG_ZOOM_BEGIN?(this._oldLegendAlpha=this._legendPanel.getAlpha(),this._legendPanel.setAlpha(dvt.AdfDiagram._MOUSE_DRAG_ALPHA),this._legendPanel.setMouseEnabled(!1)):b===dvt.ZoomEvent.SUBTYPE_DRAG_ZOOM_END&&(this._legendPanel.setAlpha(this._oldLegendAlpha),this._legendPanel.setMouseEnabled(!0)));
this._overviewWindowPanel&&(b===dvt.ZoomEvent.SUBTYPE_ZOOMING?DvtAdfDiagramOverviewUtils.HandleZoomEvent(this,a):b===dvt.ZoomEvent.SUBTYPE_DRAG_ZOOM_BEGIN?(this._oldOverviewAlpha=this._overviewWindowPanel.getAlpha(),this._overviewWindowPanel.setAlpha(dvt.AdfDiagram._MOUSE_DRAG_ALPHA),this._overviewWindowPanel.setMouseEnabled(!1)):b===dvt.ZoomEvent.SUBTYPE_DRAG_ZOOM_END&&(this._overviewWindowPanel.setAlpha(this._oldOverviewAlpha),this._overviewWindowPanel.setMouseEnabled(!0)))}};
dvt.AdfDiagram.prototype.Rerender=function(){var a=this.getPanZoomCanvas().getZoom();if(this._zoomBeforeRender!=a){var b=Math.min(this._zoomBeforeRender,1),a=Math.min(a,1),b=Math.ceil(b/.25),a=Math.ceil(a/.25);if(b!==a)this._bCrossedZoomThreshold=!0,this.RenderComponentInternal(),this._bCrossedZoomThreshold=!1;else if(!this.supportsVectorEffects())for(b=this.getSortedVisibleNodesByGroupDepth(),a=b.length-1;0<=a;a--)for(var c=b[a],d=0;d<c.length;d++)c[d].RefreshSelectionEffect()}this._zoomBeforeRender=
null};
dvt.AdfDiagram.prototype.HandleZoomAndCenter=function(a){var b=[];a=[];var c;if(this._selectionHandler){var d=this._selectionHandler.getSelection();if(d)for(c=0;c<d.length;c++){var e=d[c];e instanceof dvt.AdfDiagramNode?e.getVisible()&&!e.isHiddenAncestor()&&b.push(e):e instanceof dvt.AdfDiagramLink&&e.getVisible()&&a.push(e)}if(0<b.length||0<a.length){for(var f,d=0;d<b.length;d++)c=b[d],c=c.getDimensions(this.getPanZoomCanvas().getContentPane()),f?(f.grow(c.x,c.y),f.grow(c.x+c.w,c.y+c.h)):f=new dvt.Rectangle(c.x,
c.y,c.w,c.h);for(d=0;d<a.length;d++)b=a[d],b=b.getDimensions(this.getPanZoomCanvas().getContentPane()),f?(f.grow(b.x,b.y),f.grow(b.x+b.w,b.y+b.h)):f=new dvt.Rectangle(b.x,b.y,b.w,b.h)}a=new dvt.Animator(this.getCtx(),this.getAnimationDuration());this.getPanZoomCanvas().center(a,f);this.getPanZoomCanvas().zoomTo(1,null,null,a);a.play()}};
dvt.AdfDiagram.prototype.IsInView=function(a){var b=this.getPanZoomCanvas(),c=b.getPanX(),d=b.getPanY(),b=b.getZoom();a=new dvt.Rectangle(a.x,a.y,a.w,a.h);a.x+=c;a.y+=d;a.w*=b;a.h*=b;return 0<=a.x&&a.x<=this.Width&&0<=a.y&&a.y<=this.Height&&0<=a.x+a.w&&a.x+a.w<=this.Width&&0<=a.y+a.h&&a.y+a.h<=this.Height};
dvt.AdfDiagram.prototype.SetAttributeGroupsHelper=function(a,b){this._arOldAttrGrps=this._arAttrGrps;this._arOldExplodedStacks=this._arExplodedStacks;this._arAttrGrps=a;this._arExplodedStacks=b;if(this._bRendered&&!this._eventType){var c=dvt.EventFactory.newAdfPropertyChangeEvent();c.properties[dvt.AdfDiagram.GROUP_BY_KEY]=a?a.join(dvt.AdfDiagram.ROWKEY_DELIMITER):"";c.properties[dvt.AdfDiagram.GROUP_BY_UNGROUPED_KEY]=b?b.join(dvt.AdfDiagram.ROWKEY_DELIMITER):"";this.dispatchEvent(c);dvt.AdfDiagramTransitionUtils.processStack(this)}this._arOldExplodedStacks=
this._arOldAttrGrps=null};dvt.AdfDiagram.prototype.setAttributeGroups=function(a){this.SetAttributeGroupsHelper(a,null)};dvt.AdfDiagram.prototype.getAttributeGroups=function(){return this._arAttrGrps};dvt.AdfDiagram.prototype.setExplodedStacks=function(a){this.SetAttributeGroupsHelper(this.getAttributeGroups(),a)};dvt.AdfDiagram.prototype.getExplodedStacks=function(){return this._arExplodedStacks};
dvt.AdfDiagram.prototype.setHiddenAttributeGroups=function(a){this._arHiddenAttrGrps=a;this._bRendered&&!this._eventType&&(a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.AdfDiagram.GROUP_BY_HIDDEN_KEY,a?a.join(dvt.AdfDiagram.ROWKEY_DELIMITER):""),this.dispatchEvent(a),dvt.AdfDiagramTransitionUtils.processFilter(this))};dvt.AdfDiagram.prototype.getHiddenAttributeGroups=function(){return this._arHiddenAttrGrps};
dvt.AdfDiagram.prototype.setOverviewWindow=function(a){this._overviewWindow&&this._overviewWindow.removeEvtListener(dvt.ViewportChangeEvent.TYPE,this.HandleViewportChange,!1,this);this._overviewWindow=a;this._overviewWindow.addEvtListener(dvt.ViewportChangeEvent.TYPE,this.HandleViewportChange,!1,this)};dvt.AdfDiagram.prototype.getOverviewWindow=function(){return this._overviewWindow};dvt.AdfDiagram.prototype.__getOverviewWindowPanel=function(){return this._overviewWindowPanel};
dvt.AdfDiagram.prototype.HandleViewportChange=function(a){var b=a.getNewDimensions(),c=a.getOldDimensions(),d=this.getPanZoomCanvas().getZoom();a=(b.x-c.x)*d;b=(b.y-c.y)*d;this.getPanZoomCanvas().panBy(-a,-b)};dvt.AdfDiagram.prototype.UpdateOverviewNode=function(a,b){this._overviewWindow&&!this.IsStackPreview()&&DvtAdfDiagramOverviewUtils.UpdateOverviewNode(this,a,b,this.getOverviewWindowContentStyle())};
dvt.AdfDiagram.prototype.VisitNodes=function(a,b){for(var c in this._nodes){var d=this.getNodeById(c);a.call(b,d)}};dvt.AdfDiagram.prototype.VisitLinks=function(a,b){for(var c in this._links){var d=this.getLinkById(c);a.call(b,d)}};
dvt.AdfDiagram.prototype.setNodeDisclosed=function(a,b,c,d){if(b&&!this.getNodeById(a).getData().isChildrenFetched())this.setInteractionEnabled(!1),this.dispatchEvent(new dvt.AdfDiagramFetchEvent(dvt.AdfDiagramFetchEvent.DISCLOSE,a));else{var e=!1,f=-1;this._disclosedNodes&&(f=dvt.ArrayUtils.getIndex(this._disclosedNodes,a));!b&&-1<f?(this._disclosedNodes.splice(f,1),e=!0):b&&0>f&&(this._disclosedNodes||(this._disclosedNodes=[]),this._disclosedNodes.push(a),e=!0);if(e||d)b?this._disclosingNode=a:
this._undisclosingNode=a,c||dvt.AdfDiagramTransitionUtils.processContainerDisclosure(this,!1),e&&(a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.AdfDiagram.ROW_DISCLOSURE_KEY,this._disclosedNodes.join(dvt.AdfDiagram.ROWKEY_DELIMITER)),this.dispatchEvent(a))}};
dvt.AdfDiagram.prototype.drillNode=function(a,b){var c=null,d=!0;if(a)if(c=this.getNodeById(a),!c.isContainer())d=!1;else if(!c.getData().isChildrenFetched()){this.setInteractionEnabled(!1);this.dispatchEvent(new dvt.AdfDiagramFetchEvent(dvt.AdfDiagramFetchEvent.DRILL,a));return}if(d&&(this._drilledNodePath=this._createDrillPath(a),c&&c.isFocused()&&(c=c.getChildNodeIds())&&0<c.length))for(var e=0;e<c.length;e++){var f=this.getNodeById(c[e]);if(f.getVisible()){this.EventManager.setFocusObj(f);break}}b||
dvt.AdfDiagramTransitionUtils.processDrill(this,!1);this._bRendered&&d&&(d=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.AdfDiagram.ROOT_ROW_KEY,a?a:"null"),this.dispatchEvent(d))};dvt.AdfDiagram.prototype._createDrillPath=function(a){var b=null;if(a){for(b=[];a;)b.push(a),a=this.getNodeById(a).getData().getGroupId();b.reverse()}return b};dvt.AdfDiagram.prototype.isolateNode=function(a,b,c,d){a=this._getNodeNetwork(a,b);this._isolateNodeMap(a,c,d)};
dvt.AdfDiagram.prototype._getNodeNetwork=function(a,b){var c=this._getDescendants(a,!0),d=this._mapUnion(null,c);if(0<b)for(var e in c){var f=this.getNodeById(e),g=f.getOutLinkIds();if(g)for(c=0;c<g.length;c++)var h=this.getLinkById(g[c]),d=this._mapUnion(d,this._getNodeNetwork(h.getData().getEndId(),b-1));if(f=f.getInLinkIds())for(c=0;c<f.length;c++)h=this.getLinkById(f[c]),d=this._mapUnion(d,this._getNodeNetwork(h.getData().getStartId(),b-1))}return d};
dvt.AdfDiagram.prototype._getDescendants=function(a,b){var c={},d=this.getNodeById(a),e=d.isContainer()&&!d.getData().isChildrenFetched();b&&(c[a]=e);if(d.isContainer()&&d.getData().isChildrenFetched())for(d=d.getChildNodeIds(),e=0;e<d.length;e++)c=this._mapUnion(c,this._getDescendants(d[e],!0));return c};
dvt.AdfDiagram.prototype._getAncestors=function(a,b){var c={};b&&(d=this.getNodeById(d),d=d.isContainer()&&!d.getData().isChildrenFetched(),c[a]=d);for(var d=a;d;)d=this.getNodeById(d),(d=d.getData().getGroupId())&&(c[d]=!1);return c};dvt.AdfDiagram.prototype.getNode=function(a){return this.GetNodeByRowIndex(a)};dvt.AdfDiagram.prototype.getLink=function(a){return this.GetLinkByRowIndex(a)};dvt.AdfDiagram.prototype.GetAllLinks=function(){var a=[],b;for(b in this._links)a.push(b);return a};
dvt.AdfDiagram.prototype.GetAllNodes=function(){var a=[],b;for(b in this._nodes)a.push(b);return a};dvt.AdfDiagram.prototype._getAllNodeMap=function(){var a={},b;for(b in this._nodes){var c=this.getNodeById(b),c=c.isContainer()&&!c.isChildrenFetched();a[b]=c}return a};dvt.AdfDiagram.prototype._getAllNodeObjects=function(){var a=[],b;for(b in this._nodes)a.push(this._nodes[b]);return a};
dvt.AdfDiagram.prototype.isolateLink=function(a,b,c,d){var e=this.getLinkById(a);a=e.getData().getStartId();e=e.getData().getEndId();a=this._getNodeNetwork(a,b);b=this._getNodeNetwork(e,b);b=this._mapUnion(a,b);this._isolateNodeMap(b,c,d)};
dvt.AdfDiagram.prototype.isolateMultiple=function(a,b){for(var c={},d=0;d<a.length;d++){var e=a[d];if("L"===e.charAt(0))var f=this.getLinkById(e),e=f.getData().getStartId(),f=f.getData().getEndId(),e=this._getNodeNetwork(e,0),c=this._mapUnion(c,e),e=this._getNodeNetwork(f,0),c=this._mapUnion(c,e);else"N"===e.charAt(0)&&(c=this._mapUnion(c,this._getNodeNetwork(e,0)))}this._isolateNodeMap(c,dvt.AdfDiagram.ISOLATE_TYPE_INTERSECT,b)};
dvt.AdfDiagram.prototype.isolateStack=function(a,b,c,d){var e=this._nodeStackMap[a],f=null,g=this.getAttributeGroups();e?f=this._stackNodeMap[e]:(e=this.CreateStackName(a,g),f=[a]);if(e){a={};for(var h=0;h<f.length;h++){var k=this._getNodeNetwork(f[h],b),l;for(l in k){var m=this.CreateStackName(l,g);e===m&&-1==dvt.ArrayUtils.getIndex(f,l)&&f.push(l)}a=this._mapUnion(a,k)}this._isolateNodeMap(a,c,d)}};
dvt.AdfDiagram.prototype._concatMap=function(a){var b="",c=!0,d;for(d in a)c||(b+=dvt.AdfDiagram.ROWKEY_DELIMITER),b+=d,b+=dvt.AdfDiagram.ROWKEY_DELIMITER,b+=a[d],c=!1;return b};dvt.AdfDiagram.prototype.restore=function(a){var b=this._isolatedNodes;this._isolatedNodeMap=this._isolatedNodes=null;b&&(a||dvt.AdfDiagramTransitionUtils.processIsolate(this));a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.AdfDiagram.ISOLATED_NODES_KEY,this._concatMap(this._isolatedNodeMap));this.dispatchEvent(a)};
dvt.AdfDiagram.prototype._isolateNodeMap=function(a,b,c){if(b===dvt.AdfDiagram.ISOLATE_TYPE_UNION)this._isolatedNodeMap=this._isolatedNodeMap?this._isolatedNodeMap:this._getAllNodeMap(),this._isolatedNodeMap=this._mapUnion(this._isolatedNodeMap,a);else if(b===dvt.AdfDiagram.ISOLATE_TYPE_REPLACE)this._isolatedNodeMap=a;else if(a)if(this._isolatedNodeMap){this._isolatedNodeMap={};b={};for(var d in a)for(var e=d;e;)(e=this.getNodeById(e).getData().getGroupId())&&(b[e]=e);for(d in a)-1!=dvt.ArrayUtils.getIndex(this._isolatedNodes,
d)?this._isolatedNodeMap[d]=a[d]:b[d]&&(this._isolatedNodeMap[d]=!1)}else this._isolatedNodeMap=this._mapUnion(null,a);this._isolatedNodes=this._keyList(this._isolatedNodeMap);c||dvt.AdfDiagramTransitionUtils.processIsolate(this);a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.AdfDiagram.ISOLATED_NODES_KEY,this._concatMap(this._isolatedNodeMap));this.dispatchEvent(a)};dvt.AdfDiagram.prototype._keyList=function(a){var b=null;if(a){var b=[],c;for(c in a)b.push(c)}return b};
dvt.AdfDiagram.prototype._mapUnion=function(a,b){var c={};if(a)for(var d in a)c[d]=a[d];if(b)for(var e in b)c[e]=b[e];return c};dvt.AdfDiagram.prototype.GetStackNodeMap=function(){return this._stackNodeMap};dvt.AdfDiagram.prototype.GetNodeStackMap=function(){return this._nodeStackMap};
dvt.AdfDiagram.prototype.CreateStackName=function(a,b){for(var c="",d=this.getNodeById(a),e=d.getData().getAttributeGroups(),f=0;f<b.length;f++){var g=null;if(e)for(var h=0;h<e.length;h++)if(0===e[h].indexOf(b[f])){g=e[h];break}g&&(c+=g,c+=";")}if(0==c.length)return null;(d=d.getData().getGroupId())&&(c=d+":"+c);return c};
dvt.AdfDiagram.prototype.CreateButton=function(a,b,c,d,e,f,g){var h=this.getDiagramButtonStyles(),k=dvt.PanelDrawer.IMAGE_SIZE;d||(d=dvt.AdfDiagram._BUTTON_SIZE);e||(e=dvt.AdfDiagram._BUTTON_SIZE);var l=this._buttonBorderRadius,m=new dvt.Rect(this.getCtx(),0,0,d,e);m.setRx(l);m.setRy(l);var n=dvt.AdfDiagram.getButtonFill(h,dvt.AdfDiagram.BUTTON_STATE_ENA),p=dvt.AdfDiagram.getButtonStroke(h,dvt.AdfDiagram.BUTTON_STATE_ENA);m.setFill(n);m.setStroke(p);a&&(n=new dvt.Image(this.getCtx(),a,0,0,k,k),m.addChild(n),
n.setTranslate(.5*(d-n.getWidth()),f+.5*(e-f-n.getHeight())));a=new dvt.Rect(this.getCtx(),0,0,d,e);a.setRx(l);a.setRy(l);n=dvt.AdfDiagram.getButtonFill(h,dvt.AdfDiagram.BUTTON_STATE_OVR);p=dvt.AdfDiagram.getButtonStroke(h,dvt.AdfDiagram.BUTTON_STATE_OVR);a.setFill(n);a.setStroke(p);b&&(n=new dvt.Image(this.getCtx(),b,0,0,k,k),a.addChild(n),n.setTranslate(.5*(d-n.getWidth()),f+.5*(e-f-n.getHeight())));b=new dvt.Rect(this.getCtx(),0,0,d,e);b.setRx(l);b.setRy(l);n=dvt.AdfDiagram.getButtonFill(h,dvt.AdfDiagram.BUTTON_STATE_DWN);
p=dvt.AdfDiagram.getButtonStroke(h,dvt.AdfDiagram.BUTTON_STATE_DWN);b.setFill(n);b.setStroke(p);c&&(n=new dvt.Image(this.getCtx(),c,0,0,k,k),b.addChild(n),n.setTranslate(.5*(d-n.getWidth()),f+.5*(e-f-n.getHeight())));c=new dvt.Button(this.getCtx(),m,a,b,null,g);c.setPixelHinting(!0);return c};
dvt.AdfDiagram.prototype.CreateRestoreButton=function(){var a=this.getResourcesMap().restoreEna,b=this.getResourcesMap().restoreOvr,c=this.getResourcesMap().restoreDwn,d=this.getResourcesMap().restoreTip,a=this.CreateButton(a,b,c,dvt.AdfDiagram._WIDE_BUTTON_SIZE,dvt.AdfDiagram._BUTTON_SIZE+this._buttonBorderRadius,this._buttonBorderRadius,"restore"),b={getTooltip:function(){return d}},e=this;b.HandleClick=function(a){dvt.EventManager.consumeEvent(a);e.HandleRestore()};b.isUnrelatedToSelection=function(){return!0};
this.getEventManager().associate(a,b);return a};dvt.AdfDiagram.prototype.HandleRestore=function(a,b,c){dvt.EventManager.consumeEvent(a);this.restore(c);this.HideRestoreButton()};
dvt.AdfDiagram.prototype.ShowRestoreButton=function(){if(!this._restoreButton&&dvt.Agent.isEnvironmentBrowser()&&"off"!=this._showRestore){this._restoreButton=new dvt.Container(this.getCtx());var a=this.CreateRestoreButton();this._restoreButton.addChild(a);this.addChild(this._restoreButton);var b=this._restoreButton.getDimensions();a.setTranslateY(-this._buttonBorderRadius);a.setClipPath(this.CreateClipRect(-5,0,b.w+10,b.h+5,"restoreButtonClip"));a=this.getPanZoomCanvas().getTranslateY();this._restoreButton.setTranslate(.5*
(this.getWidth()-(b.x+b.w)),a);this._restoreButton.setAlpha(0);b=new dvt.Animator(this.getCtx(),.25);b.addProp(dvt.Animator.TYPE_NUMBER,this._restoreButton,this._restoreButton.getAlpha,this._restoreButton.setAlpha,1);b.play()}};
dvt.AdfDiagram.prototype.HideRestoreButton=function(){if(this._restoreButton){var a=new dvt.Animator(this.getCtx(),.25);a.addProp(dvt.Animator.TYPE_NUMBER,this._restoreButton,this._restoreButton.getAlpha,this._restoreButton.setAlpha,0);a.setOnEnd(this.RemoveRestoreButton,this);a.play()}};
dvt.AdfDiagram.prototype.RemoveRestoreButton=function(){this._restoreButton&&(this._restoreButton.destroy(),this._restoreButton.getParent().removeChild(this._restoreButton),this._restoreButton=null);var a=this.getCtx().getTooltipManager();a&&a.hideTooltip()};dvt.AdfDiagram.prototype.getRestoreButton=function(){return this._restoreButton};
dvt.AdfDiagram.prototype.CalcOffsetToPanNodeIntoView=function(a,b){var c=this.GetViewBounds(b,[a],[]),d=this.getPanZoomCanvas().getViewport(),e=this.getPanZoomCanvas().getZoomToFitPadding()/this.getPanZoomCanvas().getZoom();d.x+=e;d.y+=e;d.w-=2*e;d.h-=2*e;var f=e=0;c.x+c.w>d.x+d.w&&(e+=d.x+d.w-(c.x+c.w),d.x-=e);c.x<d.x&&(e+=d.x-c.x,d.x-=e);c.y+c.h>d.y+d.h&&(f+=d.y+d.h-(c.y+c.h),d.y-=f);c.y<d.y&&(f+=d.y-c.y,d.y-=f);return new dvt.Point(e,f)};dvt.AdfDiagram.prototype.getEditor=function(){return this._editor};
dvt.AdfDiagram.prototype.setReadOnly=function(a){this._editor=a?null:new DvtAdfDiagramEditorManager(this.getCtx(),this);this._readOnly=a};dvt.AdfDiagram.prototype.isReadOnly=function(){return this._readOnly};dvt.AdfDiagram.prototype.setHasDragSource=function(a){this._hasDragSource=a};dvt.AdfDiagram.prototype.setLinkToolEnabled=function(a){this._linkToolEnabled=a};dvt.AdfDiagram.prototype.isLinkToolEnabled=function(){return this._linkToolEnabled};
dvt.AdfDiagram.prototype.setStickyNodeEnabled=function(a){this._stickyNodeEnabled=a};dvt.AdfDiagram.prototype.isStickyNodeEnabled=function(){return this._stickyNodeEnabled};dvt.AdfDiagram.prototype.setNodeCreateEnabled=function(a){this._nodeCreateEnabled=a};dvt.AdfDiagram.prototype.isNodeCreateEnabled=function(){return this._nodeCreateEnabled};dvt.AdfDiagram.prototype.setLinkCreateEnabled=function(a){this._linkCreateEnabled=a};dvt.AdfDiagram.prototype.isLinkCreateEnabled=function(){return this._linkCreateEnabled};
dvt.AdfDiagram.prototype.setCreateLinkDef=function(a,b){this._createLinkDef=b;this._createLinkPaletteId=a;this.addLinkDef(b)};dvt.AdfDiagram.prototype.getCreateLinkData=function(){if(!this._createLinkDef){var a=new dvt.AdfDiagramLinkDef;a.setId("FakeLinkDef");a.setLinkWidth("3px");a.setLinkColor("green");a.setLinkStyle(dvt.AdfDiagramLinkDef.LINK_STYLE_DOT);this.setCreateLinkDef("fake",a)}a={};a.linkDef=this._createLinkDef;a.paletteId=this._createLinkPaletteId;return a};
dvt.AdfDiagram.prototype.setCreateNodeStamp=function(a,b){this._createNodeDef=this.createNodeDef(b);this._createNodePaletteId=a};dvt.AdfDiagram.prototype.getCreateNodeData=function(){var a={};a.nodeDef=this._createNodeDef;a.paletteId=this._createNodePaletteId;return a};
dvt.AdfDiagram.prototype.handlePaletteEvent=function(a){if("selection"==a.type){var b=a.selection;if(b&&1<=b.length){this.setStickyNodeEnabled(!1);this.setLinkToolEnabled(!1);for(var c=0;c<b.length;c++){a=b[c];var d=a.paletteId,e=a.id,f=a.def;a.type==DvtPaletteLinkItem.LINK_TYPE?(this.setLinkToolEnabled(!0),this.setCreateLinkDef(d,f),a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.Palette.PALETTE_ACTIVE_LINK_KEY,e),this.dispatchEvent(a)):a.type==DvtPaletteLinkItem.NODE_TYPE&&(this.setCreateNodeStamp(d,
f),this.setStickyNodeEnabled(!0))}}else this.setStickyNodeEnabled(!1),this.setLinkToolEnabled(!1)}};dvt.AdfDiagram.prototype.createNodeDef=function(a){var b=new dvt.AdfDiagramNodeDef;b.setId("FakeNodeDef"+this._fakeNodeDefCount);this._fakeNodeDefCount++;b.setNodeTemplate(a,"zoom100");b.setNodeTemplate(a,"zoom75");b.setNodeTemplate(a,"zoom50");b.setNodeTemplate(a,"zoom25");this.addNodeDef(b);return b};
dvt.AdfDiagram.prototype.createDropNode=function(a,b,c,d){this._editor&&(a=new dvt.Point(a,b),a=this.getCtx().pageToStageCoords(a.x,a.y),b=null,(d=this.getDropSite(a.x,a.y))&&(b=d.clientRowKey?"N"+d.clientRowKey:null),c=dvt.AdfDiagramEventManager.GetCreateNodeEvent(b,a,c),this.dispatchEvent(c))};
dvt.AdfDiagram.prototype.__getNodeUnderPoint=function(a,b){for(var c=this._getAllNodeObjects(),d=new dvt.Point(a,b),e=null,f=0;f<c.length;f++){var g=c[f];if(g.getVisible()){var h=g.getLayoutBounds(),k=g.stageToLocal(d);h.containsPoint(k.x,k.y)&&(e=g)}}return e};dvt.AdfDiagram.prototype.__isDragAvailable=function(a){return this._hasDragSource?this._selectionHandler?a[0]:null:null};
dvt.AdfDiagram.prototype.__getDragTransferable=function(a){a.isSelected()||(this._selectionHandler.processClick(a,!1),this.EventManager.fireSelectionEvent());a=[];for(var b=this._selectionHandler.getSelection(),c=0;c<b.length;c++){var d=b[c].getId();this.__addRowKeyToDragTransferable(d,a)}return a};dvt.AdfDiagram.prototype.__addRowKeyToDragTransferable=function(a,b){"N"==a.substring(0,1)&&b.push(a.substring(1))};
dvt.AdfDiagram.prototype.__getDragFeedback=function(){for(var a=[],b=this._selectionHandler.getSelection(),c=0;c<b.length;c++)this.__addDisplayableToDragFeedback(b[c].__getDisplayable(),a);return a};dvt.AdfDiagram.prototype.__addDisplayableToDragFeedback=function(a,b){b.push(a)};dvt.AdfDiagram.prototype.__removeDropSiteFeedback=function(){this._dropSiteFeedback&&(this._dropSiteFeedback.getParent().removeChild(this._dropSiteFeedback),this._dropSiteFeedback=null)};
dvt.AdfDiagram.prototype.__showDropSiteFeedback=function(a){this.__removeDropSiteFeedback();if(this._dropSiteFeedback=a?a.getDropSiteFeedback():new dvt.Rect(this.getCtx(),0,0,this.Width,this.Height)){var b=this.getDropFeedbackFillColor(),c=this.getDropFeedbackFillAlpha(),d=this.getDropFeedbackBorderColor();this._dropSiteFill=new dvt.SolidFill(b,c);this._dropSiteStroke=new dvt.SolidStroke(d);this._dropSiteFeedback.setFill(this._dropSiteFill);this._dropSiteFeedback.setStroke(this._dropSiteStroke);a?
this.addChild(this._dropSiteFeedback):this.addChildAt(this._dropSiteFeedback,1)}return this._dropSiteFeedback};dvt.AdfDiagram.prototype.setDropFeedbackFillColor=function(a){this._dropFeedbackFillColor=a};dvt.AdfDiagram.prototype.getDropFeedbackFillColor=function(){return this._dropFeedbackFillColor};dvt.AdfDiagram.prototype.setDropFeedbackBorderColor=function(a){this._dropFeedbackBorderColor=a};dvt.AdfDiagram.prototype.getDropFeedbackBorderColor=function(){return this._dropFeedbackBorderColor};
dvt.AdfDiagram.prototype.setDropFeedbackFillAlpha=function(a){this._dropFeedbackFillAlpha=a};dvt.AdfDiagram.prototype.getDropFeedbackFillAlpha=function(){return this._dropFeedbackFillAlpha};dvt.AdfDiagram.prototype.Log=function(a,b){this.dispatchEvent(dvt.EventFactory.newAdfLogEvent(b,a))};
dvt.AdfDiagram.prototype.setResources=function(a){this._addToResourcesMap(a);a=a.getChildNodes();for(var b=0;b<a.length;b++){var c=a[b],d=c.getName();d==dvt.AdfDiagram._ELEM_RESOURCES_LEGEND?this._addToResourcesMap(c):d==dvt.AdfDiagram._ELEM_RESOURCES_PALETTE?this._addToResourcesMap(c):d==dvt.AdfDiagram._ELEM_RESOURCES_SEARCHPANEL?this._addToResourcesMap(c):d==dvt.AdfDiagram._ELEM_RESOURCES_PANELDRAWER?this._addToResourcesMap(c):d==dvt.AdfDiagram._ELEM_RESOURCES_CONTROLPANEL?this._addToResourcesMap(c):
d==dvt.AdfDiagram._ELEM_RESOURCES_TRANSIENT_TOOLBAR?this._addToResourcesMap(c):d==dvt.AdfDiagram._ELEM_RESOURCES_NODE&&this._addToResourcesMap(c)}};dvt.AdfDiagram.prototype._addToResourcesMap=function(a){a=a.getAttributes();for(var b=0;b<a.length;b++){var c=a[b];this.getResourcesMap()[c.name]=c.value}};
dvt.AdfDiagram.prototype.AdjustViewSpace=function(a,b){this.getPanZoomCanvas().setTranslateY(a);this.getPanZoomCanvas().setSize(this.getWidth(),this.getHeight()-a);this._panelDrawer&&this._panelDrawer.setTranslateY(a);this._restoreButton&&this._restoreButton.setTranslateY(a)};dvt.AdfDiagram.prototype.CreateClipRect=function(a,b,c,d,e){e=new dvt.ClipPath(e);e.addRect(a,b,c,d);return e};
dvt.AdfDiagram.prototype.UpdateDrillBreadcrumbs=function(a){if(this._drilledNodePath){var b=!0;this._oldDrillBreadcrumbs=this._drillBreadcrumbs;var c=this.getBreadcrumbsOptions();this._drillBreadcrumbs=new dvt.Breadcrumbs(this.getCtx(),this._processDrillBreadcrumbsEvent,this,c);this._drillBreadcrumbs.setId(this.getId()+"_bc");this.addChild(this._drillBreadcrumbs);this._drillBreadcrumbs.setTranslateX(5);this._oldDrillBreadcrumbs&&this.EventManager.removeComponentKeyboardHandler(this._oldDrillBreadcrumbs.getEventManager());
this._drillBreadcrumbs&&this.EventManager.addComponentKeyboardHandlerAt(this._drillBreadcrumbs.getEventManager(),0);a&&(this._drillBreadcrumbs.setAlpha(0),a.addProp(dvt.Animator.TYPE_NUMBER,this._drillBreadcrumbs,this._drillBreadcrumbs.getAlpha,this._drillBreadcrumbs.setAlpha,1));this._oldDrillBreadcrumbs?(this._drillBreadcrumbs.setTranslateY(this._oldDrillBreadcrumbs.getTranslateY()),a&&a.addProp(dvt.Animator.TYPE_NUMBER,this._oldDrillBreadcrumbs,this._oldDrillBreadcrumbs.getAlpha,this._oldDrillBreadcrumbs.setAlpha,
0)):b=!1;var c={items:[]},d={id:null};d.label=this.getResourcesMap().drillRoot;c.items.push(d);for(var e=0;e<this._drilledNodePath.length;e++){var d={},f=this._drilledNodePath[e];d.id=f;var f=this.getNodeById(f),g=f.getLabel();g||(g=f.getShortDesc());g||(g="...");d.label=g;c.items.push(d)}this._drillBreadcrumbs.render(c,this.Width-10);c=this._drillBreadcrumbs.getDimensions();this.AdjustViewSpace(5+c.y+c.h+10,a);a&&b?(a.addProp(dvt.Animator.TYPE_NUMBER,this._drillBreadcrumbs,this._drillBreadcrumbs.getTranslateY,
this._drillBreadcrumbs.setTranslateY,5),this._oldDrillBreadcrumbs&&(a.addProp(dvt.Animator.TYPE_NUMBER,this._oldDrillBreadcrumbs,this._oldDrillBreadcrumbs.getTranslateY,this._oldDrillBreadcrumbs.setTranslateY,5),dvt.Playable.appendOnEnd(a,this.RemoveOldDrillBreadcrumbs,this))):(this._drillBreadcrumbs.setTranslateY(5),this._oldDrillBreadcrumbs&&this.RemoveOldDrillBreadcrumbs())}else if(this._drillBreadcrumbs){var h=this,b=function(){h.AdjustViewSpace(0)};a?(a.addProp(dvt.Animator.TYPE_NUMBER,this._drillBreadcrumbs,
this._drillBreadcrumbs.getAlpha,this._drillBreadcrumbs.setAlpha,0),dvt.Playable.appendOnEnd(a,this.RemoveDrillBreadcrumbs,this),dvt.Playable.appendOnEnd(a,b)):(this.RemoveDrillBreadcrumbs(),b())}};dvt.AdfDiagram.prototype.RemoveDrillBreadcrumbs=function(){this.EventManager.removeComponentKeyboardHandler(this._drillBreadcrumbs.getEventManager());this._drillBreadcrumbs.getParent().removeChild(this._drillBreadcrumbs);this._drillBreadcrumbs=null};
dvt.AdfDiagram.prototype.RemoveOldDrillBreadcrumbs=function(){this._oldDrillBreadcrumbs.getParent().removeChild(this._oldDrillBreadcrumbs);this._oldDrillBreadcrumbs=null};dvt.AdfDiagram.prototype._processDrillBreadcrumbsEvent=function(a){a instanceof dvt.BreadcrumbsDrillEvent&&this.drillNode(a.getId())};dvt.AdfDiagram.prototype.getBreadcrumbs=function(){return this._drillBreadcrumbs};dvt.AdfDiagram.prototype.loadJson=function(a,b,c,d){null!=a&&dvt.AdfDiagram.superclass.loadJson.call(this,a,b,c,d)};
dvt.AdfDiagram.prototype.ShowNodeTransientToolbar=function(a,b){this.HideNodeTransientToolbar();if(a.IsTransientToolbarOnClick()){var c=b;b instanceof dvt.ComponentTouchEvent&&(c=b.touch);c=this.getCtx().pageToStageCoords(c.pageX,c.pageY);a.ShowTransientToolbar(c)}};dvt.AdfDiagram.prototype.HideNodeTransientToolbar=function(a){var b=this.GetTransientToolbarDataId();b&&(b=this.getNodeById(b))&&b.IsTransientToolbarOnClick()&&b.HideTransientToolbar(a)};dvt.AdfDiagram.prototype.HideNodeFlyOuts=function(a){this.HideNodeTransientToolbar(a)};
dvt.AdfDiagram.prototype.SetTransientToolbarDataId=function(a){this._transientToolbarDataId=a};dvt.AdfDiagram.prototype.GetTransientToolbarDataId=function(){return this._transientToolbarDataId};dvt.AdfDiagram.prototype.SetShowRestore=function(a){this._showRestore=a};dvt.AdfDiagram.prototype.GetShowRestore=function(){return this._showRestore};dvt.AdfDiagram.prototype.setCenterNode=function(a){this._centerNode=a};dvt.AdfDiagram.prototype.getCenterNode=function(){return this._centerNode};
dvt.AdfDiagram.prototype.addToAfImageNotReadyList=function(a,b){this._imageNotReadyList||(this._imageNotReadyList=[]);this._imageNotReadyList.push({url:b,nodeId:a.getData().getId(),zoom:a.getZoom()})};
dvt.AdfDiagram.prototype.onAfImageLoaded=function(a){if(this._imageNotReadyList&&0<this._imageNotReadyList.length){this._renderZoom100Nodes||(this._renderZoom100Nodes={});for(var b=this._imageNotReadyList.length-1;0<=b;b--)if(this._imageNotReadyList[b].url==a.url){if(1==this._imageNotReadyList[b].zoom){var c=this._imageNotReadyList[b].nodeId;this._renderZoom100Nodes[c]=this.getNodeById(c)}this._imageNotReadyList.splice(b,1)}dvt.Agent.isEnvironmentBrowser()?(this._imageLoadTimer&&this._imageLoadTimer.isRunning()||
this.setInteractionEnabled(!1),this.StopImageLoadTimer(),this.StartImageLoadTimer()):this.RenderComponentInternal()}};dvt.AdfDiagram.prototype.StopImageLoadTimer=function(){this._imageLoadTimer&&(this._imageLoadTimer.stop(),this._imageLoadTimer=null)};dvt.AdfDiagram.prototype.StartImageLoadTimer=function(){this._imageLoadTimer=new dvt.Timer(this.getCtx(),1E3,this.HandleImageLoadTimer,this,1);this._imageLoadTimer.start()};
dvt.AdfDiagram.prototype.HandleImageLoadTimer=function(){this.StopImageLoadTimer();this._bAfImageLoaded=!0;if(this.RerenderTimer&&this.RerenderTimer.isRunning())this.setInteractionEnabled(!0);else{var a=new dvt.Animator(this.getCtx(),this.getAnimationDuration()),b=this;dvt.Playable.appendOnEnd(a,function(){b.setInteractionEnabled(!0)});this._clearPanningConstraints();this._syncOverviewAndPanZoom=!0;this.RenderComponentInternal(a);this._syncOverviewAndPanZoom=!1;a.play()}};
dvt.AdfDiagram.prototype.startParsingData=function(){this._bRendered&&(this._newNodes=[])};
dvt.AdfDiagram.prototype.stopParsingData=function(){if(this._bRendered&&0<this._newNodes.length){for(var a=this.createAfContext(),b=0;b<this._newNodes.length;b++)this._newNodes[b].SetAlpha(0),this._newNodes[b].setForceZoom100Facet(!0),this._newNodes[b].createNodeContents(a);for(b=0;b<this._newNodes.length;b++)this._newNodes[b].renderNode(a);for(b=0;b<this._newNodes.length;b++)this._newNodes[b].setForceZoom100Facet(!1),"dvtDiagramFetchEvent"==this._eventType&&this._newNodes[b].setVisible(!1)}this._newNodes=
null;this._drillRoot&&((a=this.getNodeById(this._drillRoot))&&a.isContainer()&&a.getData().isChildrenFetched()&&(this._drilledNodePath=this._createDrillPath(this._drillRoot)),this._drillRoot=null)};dvt.AdfDiagram.prototype.setPreventNodeDetailWindow=function(a){this._bPreventNodeDetailWindow=a};dvt.AdfDiagram.prototype.isPreventNodeDetailWindow=function(){return this._bPreventNodeDetailWindow};
dvt.AdfDiagram.prototype.getSearchPanel=function(a){a&&!this._searchPanel&&(this._searchPanel=this.CreateSearchPanel());return this._searchPanel};dvt.AdfDiagram.prototype.CreateSearchPanel=function(){var a=new dvt.SearchPanel(this.getCtx(),this.HandleSearchEvent,this);a.setSkinName(this.getSkinName());a.setResultsMaxWidth(.75*this.getWidth());a.setResultsMaxHeight(.75*this.getHeight());this.EventManager.addComponentKeyboardHandler(a);return a};dvt.AdfDiagram.prototype.HandleSearchEvent=function(a){this.dispatchEvent(a)};
dvt.AdfDiagram.prototype.enableSearchKeyboardHandler=function(){this.EventManager.setCurrentKeyboardHandler(this.getSearchPanel())};dvt.AdfDiagram.prototype.enableDiagramKeyboardHandler=function(){this.EventManager.setCurrentKeyboardHandler(this.EventManager)};dvt.AdfDiagram.prototype.LoadSearchResultsData=function(a,b,c,d){var e=this.getSearchPanel();if(e){for(;a&&a.getName()!=dvt.SearchPanel.ELEM_SEARCH_RESULTS_DATA;)a=a.getFirstChild();a&&e.parseResultsData(a,b,c,d)}};
dvt.AdfDiagram.prototype.LoadSearchResultsDataJson=function(a,b,c,d){var e=this.getSearchPanel();e&&(a=a[dvt.SearchPanel.ELEM_SEARCH_RESULTS_DATA])&&e.parseResultsDataJson(a,b,c,d)};dvt.AdfDiagram.prototype.RenderSearchPanel=function(){var a=this.getSearchPanel();a&&!a.canReuse()&&(this.addChild(a),a.renderComponent(dvt.Bundle.getTranslatedString(dvt.Bundle.SUBCOMPONENT_PREFIX,"SEARCH"),this.getResourcesMap()));this.SetSearchPanel(a)};
dvt.AdfDiagram.prototype.SetSearchPanel=function(a){this._searchPanel=a;this.PositionSearchPanel()};dvt.AdfDiagram.prototype.RemoveSearchPanel=function(){this._searchPanel&&(this._searchPanel.getParent()&&this._searchPanel.getParent().removeChild(this._searchPanel),this._searchPanel.destroy&&this._searchPanel.destroy(),this._searchPanel=null)};
dvt.AdfDiagram.prototype.PositionSearchPanel=function(){var a;this._searchPanel&&!this.UsePanelDrawer()&&(a=dvt.Agent.isRightToLeft(this.getCtx())?dvt.AdfDiagram._SEARCH_PANEL_POS_PADDING:this.getWidth()-dvt.AdfDiagram._SEARCH_PANEL_POS_PADDING-this._searchPanel.getWidth(),this._searchPanel.setTranslate(a,dvt.AdfDiagram._SEARCH_PANEL_POS_PADDING))};dvt.AdfDiagram.prototype.CreateClientBehaviorHandler=function(a,b,c){return new DvtAdfDiagramClientBehaviorHandler(a,b,c)};
dvt.AdfDiagram.prototype.setOverviewWindowContentStyle=function(a){this._ovContentStyle=a};dvt.AdfDiagram.prototype.getOverviewWindowContentStyle=function(){return this._ovContentStyle};
dvt.AdfDiagram.prototype.FocusSearchField=function(){if(this._searchPanel){var a=this._searchPanel,b=function(){a.focusTextField()};this.UsePanelDrawer()?this._panelDrawer.isDisclosed()?this._panelDrawer.getDisplayedPanelId()==dvt.PanelDrawer.PANEL_SEARCH?this._searchPanel.focusTextField():this._panelDrawer.setDisplayedPanelId(dvt.PanelDrawer.PANEL_SEARCH,!1,b):(this._panelDrawer.setDisplayedPanelId(dvt.PanelDrawer.PANEL_SEARCH),this._panelDrawer.setDisclosed(!0,!1,b)):this._searchPanel.getState()==
dvt.SearchPanel.STATE_COLLAPSED?this._searchPanel.toggleExpandCollapse(b):this._searchPanel.getState()==dvt.SearchPanel.STATE_EXPANDED&&this._searchPanel.focusTextField()}};dvt.AdfDiagram.prototype.isSearchPanelDisclosed=function(){return this._searchPanel&&(this.UsePanelDrawer()&&this._panelDrawer.isDisclosed()&&this._panelDrawer.getDisplayedPanelId()==dvt.PanelDrawer.PANEL_SEARCH||!this.UsePanelDrawer()&&this._searchPanel.getState()==dvt.SearchPanel.STATE_EXPANDED)?!0:!1};
dvt.AdfDiagram.prototype.collapseSearchPanel=function(){this.isSearchPanelDisclosed()&&(this.UsePanelDrawer()?this._panelDrawer.setDisclosed(!1,!1):this._searchPanel.toggleExpandCollapse())};dvt.AdfDiagram.prototype.getNodeStyles=function(){return this._nodeStyles};dvt.AdfDiagram.prototype.setNodeStyles=function(a){this._nodeStyles=a};dvt.AdfDiagram.prototype.getLinkStyles=function(){return this._linkStyles};dvt.AdfDiagram.prototype.setLinkStyles=function(a){this._linkStyles=a};
dvt.AdfDiagram.prototype.getBreadcrumbsStyles=function(a){return this._breadcrumbsStyles&&this._breadcrumbsStyles[a]?this._breadcrumbsStyles[a]:null};dvt.AdfDiagram.prototype.setBreadcrumbsStyles=function(a){this._breadcrumbsStyles=a};
dvt.AdfDiagram.prototype.getEditorStyles=function(){if(!this._editorStyleMap){var a={};a[DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BORDER_COLOR_ATTR_ENA]=this.getNodeStyles()[dvt.AdfDiagramNode.HOVER_OUTER_COLOR];a[DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BG_COLOR_ATTR_ENA]="#FFFFFF";a[DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BORDER_COLOR_ATTR_DWN]=this.getNodeStyles()[dvt.AdfDiagramNode.SELECTED_COLOR];a[DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BG_COLOR_ATTR_DWN]="#FFFFFF";a[DvtAdfDiagramEndpointUtils.ENDPOINT_LINK_BORDER_COLOR_ATTR]=
this.getLinkStyles()[dvt.AdfDiagramLink.SELECTED_COLOR];a[DvtAdfDiagramEndpointUtils.ENDPOINT_LINK_BG_COLOR_ATTR]="#FFFFFF";this._editorStyleMap=a}return this._editorStyleMap};
dvt.AdfDiagram.prototype.createAfContext=function(a){var b=new dvt.AfContext(this.getCtx(),this.getEventManager());b.setSkinName(this._skinName);b.setImageCallback(this,this.onAfImageLoaded,this.addToAfImageNotReadyList);b.setMenuDropdownContainer(this);a&&(a=this.getNodeById(a))&&b.setELContext(a.getData().getElAttributes());return b};
dvt.AdfDiagram.prototype.panelCardEventCallback=function(a,b,c){dvt.AfPanelCard.SET_PROP_EVENT==a?this._bBlockCardPropEvent||this.fireCardPropEvent(b,c):dvt.AfPanelCard.FETCH_DATA_EVENT==a&&(this._bBlockFetchCardEvent||this.fireFetchCardEvent(b,c,this._detailNodeContents?!0:!1));this.HideNodeTransientToolbar()};
dvt.AdfDiagram.prototype.fireCardPropEvent=function(a,b,c){if(!this._bBlockCardPropEvent){if(a==dvt.AdfDiagram.SYNC_PANEL_CARDS_KEY)this._cardIndexes=this.cleanupPanelCardList(b),this._cardIndexes.push([a,b]);else if(isNaN(b)){if(a=a.split(dvt.AdfDiagram.ROWKEY_DELIMITER),b=b.split(dvt.AdfDiagram.ROWKEY_DELIMITER),a.length==b.length)for(c=0;c<a.length;c++)this._cardIndexes=this.removeFromPanelCardList(a[c]),this._cardIndexes.push([a[c],parseInt(b[c])])}else{if(c)return;this._cardIndexes=this.removeFromPanelCardList(a);
this._cardIndexes.push([a,b])}this._fireCardPropEvent()}};dvt.AdfDiagram.prototype._fireCardPropEvent=function(){var a={};a.cardIndexes=this.convertPanelCardListToString(this._cardIndexes);a=new dvt.PanelCardEvent(dvt.PanelCardEvent.PANELCARD_INDEX_EVENT,a);this.dispatchEvent(a)};
dvt.AdfDiagram.prototype.fireFetchCardEvent=function(a,b,c){this.fireCardPropEvent(a,b,c);if(!this._bBlockFetchCardEvent&&(a=this.getNodesNeedFetchPanelCard(a,b))){var d={};d.clientRowKey=a;d.nextc=b;d.pchw=c;b=new dvt.PanelCardEvent(dvt.PanelCardEvent.PANELCARD_FETCH_EVENT,d);this.dispatchEvent(b)}};
dvt.AdfDiagram.prototype.cleanupPanelCardList=function(a){var b=this;return this._cardIndexes.filter(function(c,d,e){return c&&2==c.length&&c[0]!=dvt.AdfDiagram.SYNC_PANEL_CARDS_KEY&&(c=b.getNodeById(c[0]),-1==b._findPanelCardIndex(c,a))?!0:!1})};dvt.AdfDiagram.prototype.removeFromPanelCardList=function(a){return this._cardIndexes.filter(function(b,c,d){return b&&2==b.length?b[0]!=a:!1})};
dvt.AdfDiagram.prototype._findPanelCardIndex=function(a,b){if(a){var c=this._getFirstPanelCard(a);if(c)return c.getVisibleDetailItemIndex(b,a.getData())}return-1};dvt.AdfDiagram.prototype._getFirstPanelCard=function(a){var b=this._getFirstPanelCardTemplate(a);b&&(b=b.stamp(a.getData().getElAttributes()));return b};
dvt.AdfDiagram.prototype._getFirstPanelCardTemplate=function(a){if(!a)return null;var b=a.getZoom();a.setForceZoom100Facet(!0);var c=a.GetNodeTemplate(),d=[];d.push(c);for(var e;0<d.length;){c=d.splice(0,1);c=c[0];if(c instanceof dvt.AfPanelCard){e=c;break}for(var f=c.getNumChildren(),g=0;g<f;g++)d.push(c.getChildAt(g))}a.setForceZoom100Facet(!1);a.setZoom(b);return e};
dvt.AdfDiagram.prototype.convertPanelCardListToString=function(a){var b=null;if(a)for(var c=0;c<a.length;c++){var d=a[c];d&&2==d.length&&(b=b?b+dvt.AdfDiagram.ROWKEY_DELIMITER+d[0]+dvt.AdfDiagram.ROWKEY_DELIMITER+d[1]:d[0]+dvt.AdfDiagram.ROWKEY_DELIMITER+d[1])}return b};
dvt.AdfDiagram.prototype.getNodesNeedFetchPanelCard=function(a,b){if(a==dvt.AdfDiagram.SYNC_PANEL_CARDS_KEY){var c="",d=this;this.VisitVisibleNodes(function(a){c=d._getNodesNeedFetchPanelCard(a,b,-1,c)},this);return 0==c.length?null:c}return a};
dvt.AdfDiagram.prototype._getNodesNeedFetchPanelCard=function(a,b,c,d){var e=a.getData().getId();(a=this._getFirstPanelCard(a))&&a.isPanelCardDeliveryLazy()&&(-1==c&&(c=a.getVisibleDetailItemIndex(b)),-1==c||this.isShowDetailItemLoaded(e,c)||(0<d.length&&(d+=dvt.AdfDiagram.ROWKEY_DELIMITER),d+=e));return d};dvt.AdfDiagram.prototype.VisitVisibleNodes=function(a,b){for(var c in this._nodes){var d=this.getNodeById(c);d.getVisible()&&a.call(b,d)}};
dvt.AdfDiagram.prototype.startParsingPanelCardData=function(){this._newNodes=[]};dvt.AdfDiagram.prototype.addPanelCardData=function(a,b){var c=this.getNodeById(a);c&&(c.getData().addElAttributes(b),this._newNodes.push(c))};dvt.AdfDiagram.prototype.addPanelCardDataJson=function(a,b){var c=this.getNodeById(a);c&&(c.getData().addElAttributesJson(b),this._newNodes.push(c))};dvt.AdfDiagram.prototype.stopParsingPanelCardData=function(){this._newNodes=null};
dvt.AdfDiagram.prototype.applyPanelCardData=function(a,b,c){try{a=a.split(dvt.AdfDiagram.ROWKEY_DELIMITER);var d=null,e,f=!1;isNaN(b)?(d=b.split(dvt.AdfDiagram.ROWKEY_DELIMITER),1==d.length&&(this._bBlockCardPropEvent=f=!0)):e=!0;this._bBlockFetchCardEvent=!0;c="true"==c;for(var g=0;g<a.length;g++){var h=a[g],k=this.getNodeById(h);c&&k.getDetailContents()&&(k=k.getDetailContents());var l=this.getPanelCard(k);if(l){var m=0,n=this._bBlockCardPropEvent,p=this._bBlockFetchCardEvent;if(e)m=parseInt(b);
else if(f){var q=l;q&&(m=q.getVisibleDetailItemIndex(b,k.getData()))}else m=parseInt(d[g]);if(!f){this._bBlockFetchCardEvent=!0;var r=this.getPanelCardState(h);r&&m==r?this._bBlockCardPropEvent=!0:(r=this.getPanelCardState(dvt.AdfDiagram.SYNC_PANEL_CARDS_KEY))&&m==this._findPanelCardIndex(k,r)&&(this._bBlockCardPropEvent=!0)}this.setShowDetailItemLoaded(h,m);l.displayDetailItem(m);this._bBlockCardPropEvent=n;this._bBlockFetchCardEvent=p}else k.setStateProp(dvt.AfPanelCard.DISPLAYED_DETAIL_ITEM_INDEX_KEY,
m)}this._bBlockFetchCardEvent=this._bBlockCardPropEvent=!1}catch(t){}};dvt.AdfDiagram.prototype.getPanelCard=function(a){if(!a)return null;var b=a.GetAfComponentRoot();if(!b)return null;a=[];for(a.push(b);0<a.length;){b=a.splice(0,1);b=b[0];if(b instanceof dvt.AfPanelCard)return b;for(var c=0;c<b.getNumChildren();c++){var d=b.getChildAt(c);d instanceof dvt.AfComponent&&a.push(d)}}return null};
dvt.AdfDiagram.prototype.getPanelCardState=function(a){if(this._cardIndexes)for(var b=this._cardIndexes.length-1;0<=b;b--){var c=this._cardIndexes[b];if(c&&2==c.length&&c[0]==a)return c[1]}return null};dvt.AdfDiagram.prototype.getPanelCardIndex=function(a){var b=this.getPanelCardState(a);return b?isNaN(b)?this._findPanelCardIndex(this.getNodeById(a),b):b:null};
dvt.AdfDiagram.prototype.isShowDetailItemLoaded=function(a,b){var c=!0;this._nodeAndLoadedCardsMap[a]&&(c=this._nodeAndLoadedCardsMap[a][b]);return c};dvt.AdfDiagram.prototype.setShowDetailItemLoaded=function(a,b){var c=this.getNodeById(a);c&&(c=this._getFirstPanelCardTemplate(c),!c||c&&c.isPanelCardDeliveryLazy())&&(this._nodeAndLoadedCardsMap[a]||(this._nodeAndLoadedCardsMap[a]=[]),this._nodeAndLoadedCardsMap[a][b]=!0)};
dvt.AdfDiagram.prototype._clearStateFromCache=function(a){for(var b in this._nodes){var c=this._nodes[b];c&&c.setStateProp(a,null)}};dvt.AdfDiagram.prototype._setPanelCardState=function(a,b,c){b=this._findPanelCardIndex(a,b);-1!=b&&(c||(c=dvt.AfPanelCard.DISPLAYED_DETAIL_ITEM_INDEX_KEY),a.setStateProp(c,b))};
dvt.AdfDiagram.prototype.setCardIndexes=function(a){if(null!=a){var b;a=a.split(dvt.AdfDiagram.ROWKEY_DELIMITER);if(!(0==a.length||a.length&1)){var c=dvt.AfPanelCard.DISPLAYED_DETAIL_ITEM_INDEX_KEY;this._clearStateFromCache(c);for(var d=0;d<a.length;d+=2){var e;if(a[d]==dvt.AdfDiagram.SYNC_PANEL_CARDS_KEY){e=null;for(b in this._nodes){var f=this._nodes[b];null!=f&&null==f.getStateProp(c)&&this._setPanelCardState(f,a[d+1],c)}this._cardIndexes.push([a[d],a[d+1]])}else e=this.getNodeById(a[d]),this._cardIndexes.push([a[d],
parseInt(a[d+1])]);e&&e.setStateProp&&e.setStateProp(c,a[d+1])}}}};dvt.AdfDiagram.prototype.setNodeShowDetailItemIndexMap=function(a){a=a.split(dvt.AdfDiagram.ROWKEY_DELIMITER);if(!(0==a.length||a.length&1))for(var b=0;b<a.length;b+=2)this.setShowDetailItemLoaded(a[b],parseInt(a[b+1]))};
dvt.AdfDiagram.prototype.setShowDetailItems=function(a){a=a.split(dvt.AdfDiagram.ROWKEY_DELIMITER);if(!(0==a.length||a.length&1))for(var b=0;b<a.length;b+=2){var c=this.getNodeById(a[b]),d=parseInt(a[b+1]);0<d&&c.setStateProp(dvt.AfPanelCard.DISPLAYED_DETAIL_ITEM_INDEX_KEY,d)}};dvt.AdfDiagram.prototype.setCardNavButtonSkin=function(a){this._cardNavButtonSkin=a};dvt.AdfDiagram.prototype.getCardNavButtonSkin=function(){return this._cardNavButtonSkin};dvt.AdfDiagram.prototype.getCardSelectorList=function(){return this._cardSelectorList};
dvt.AdfDiagram.prototype.setCardSelectorList=function(a){if(a){var b=!1;if(null==this._cardSelectorList)this._cardSelectorList=a;else for(var c,d,e=0;e<a.length;e++){c=a[e];for(var f=!1,g=0;g<this._cardSelectorList.length;g++)if(d=this._cardSelectorList[g],d[0]==c[0]&&d[1]==c[1]&&d[2]==c[2]){f=!0;break}if(!f){b=!0;break}}b&&(this._cardSelectorList=a,this._controlPanel&&this._controlPanel.updateCardSelectorList())}};
dvt.AdfDiagram.prototype.syncPanelCards=function(a,b,c){b||(b=c);this.fireFetchCardEvent(dvt.AdfDiagram.SYNC_PANEL_CARDS_KEY,b,!1);this._bBlockFetchCardEvent=this._bBlockCardPropEvent=!0;this.VisitNodes(function(d){this.syncOnePanelCard(d,a,b,c);return!1},this);this._bBlockFetchCardEvent=this._bBlockCardPropEvent=!1};
dvt.AdfDiagram.prototype.syncOnePanelCard=function(a,b,c,d){var e=a.getData(),f,g=dvt.AfPanelCard.DISPLAYED_DETAIL_ITEM_INDEX_KEY,h,k,l,m=!1;if(f=this.getPanelCard(a)){m=!0;h=f.getNumChildren();var n=null,p=null,q=f.isPanelCardDeliveryLazy();for(k=0;k<h;k++)if(l=f.getChildAt(k),n=l.getText(),p=l.getIcon(),l.getId()==b||n&&n==c||p&&p==d){f.getDisplayedDetailItemIndex()!=k&&(!q||a.getVisible()||this.isShowDetailItemLoaded(e.getId(),k)?f.displayDetailItem(k):a.setStateProp(g,k));break}}if(!m&&(f||(f=
this._getFirstPanelCard(a)),f))for(h=f.getDetailItemCount(),k=0;k<h;k++)if(l=f.getVisibleChild(k),n=l.getText(),p=l.getIcon(),l.getId()==b||n&&n==c||p&&p==d){a.setStateProp(g,k);break}};dvt.AdfDiagram.prototype.setCardStyle=function(a){this._cardCSSStyle=a};dvt.AdfDiagram.prototype.getCardStyle=function(){return this._cardCSSStyle};dvt.AdfDiagram.prototype.setCardHeaderStyle=function(a){this._cardHeaderStyle=a};dvt.AdfDiagram.prototype.getCardHeaderStyle=function(){return this._cardHeaderStyle};
dvt.AdfDiagram.prototype.setCardNavButtonStyle=function(a){this._cardNavButtonStyle=a};dvt.AdfDiagram.prototype.getCardNavButtonStyle=function(){return this._cardNavButtonStyle};dvt.AdfDiagram.prototype.setCardNavButtonHoverStyle=function(a){this._cardNavButtonHoverStyle=a};dvt.AdfDiagram.prototype.getCardNavButtonHoverStyle=function(){return this._cardNavButtonHoverStyle};dvt.AdfDiagram.prototype.setCardNavButtonActiveStyle=function(a){this._cardNavButtonActiveStyle=a};
dvt.AdfDiagram.prototype.getCardNavButtonActiveStyle=function(){return this._cardNavButtonActiveStyle};dvt.AdfDiagram.prototype.setCardNavButtonDisabledStyle=function(a){this._cardNavButtonDisabledStyle=a};dvt.AdfDiagram.prototype.getCardNavButtonDisabledStyle=function(){return this._cardNavButtonDisabledStyle};dvt.AdfDiagram.prototype.setCardTrainButtonVisible=function(a){this._cardTrainButtonVisible=a};dvt.AdfDiagram.prototype.isCardTrainButtonVisible=function(){return this._cardTrainButtonVisible};
dvt.AdfDiagram.prototype.setCardTrainButtonStyle=function(a){this._cardTrainButtonStyle=a};dvt.AdfDiagram.prototype.getCardTrainButtonStyle=function(){return this._cardTrainButtonStyle};dvt.AdfDiagram.prototype.setCardTrainButtonHoverStyle=function(a){this._cardTrainButtonHoverStyle=a};dvt.AdfDiagram.prototype.getCardTrainButtonHoverStyle=function(){return this._cardTrainButtonHoverStyle};dvt.AdfDiagram.prototype.setCardTrainButtonActiveStyle=function(a){this._cardTrainButtonActiveStyle=a};
dvt.AdfDiagram.prototype.getCardTrainButtonActiveStyle=function(){return this._cardTrainButtonActiveStyle};dvt.AdfDiagram.prototype.setCardNextButtonIcon=function(a){this._cardNextButtonIcon=a};dvt.AdfDiagram.prototype.getCardNextButtonIcon=function(){return this._cardNextButtonIcon};dvt.AdfDiagram.prototype.setCardPrevButtonIcon=function(a){this._cardPrevButtonIcon=a};dvt.AdfDiagram.prototype.getCardPrevButtonIcon=function(){return this._cardPrevButtonIcon};
dvt.AdfDiagram.prototype._updatePanZoomState=function(a){a?a="null":(a=this.getPanZoomCanvas(),a=a.getPanX()+dvt.AdfDiagram.ROWKEY_DELIMITER+a.getPanY()+dvt.AdfDiagram.ROWKEY_DELIMITER+a.getZoom());a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.PanZoomComponent.PAN_ZOOM_KEY,a);this.dispatchEvent(a)};
dvt.AdfDiagram.prototype._updatePreviewStackPanZoomState=function(a){a?a="null":(a=this.getPanZoomCanvas(),a=a.getPanX()+dvt.AdfDiagram.ROWKEY_DELIMITER+a.getPanY()+dvt.AdfDiagram.ROWKEY_DELIMITER+a.getZoom());a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.AdfDiagram.PREVIEW_PAN_ZOOM_KEY,a);this.dispatchEvent(a)};dvt.AdfDiagram.prototype.setStackPreviewColor=function(a){this._stackPreviewColor=a};dvt.AdfDiagram.prototype.getStackPreviewColor=function(){return this._stackPreviewColor};
dvt.AdfDiagram.prototype.setStackBadgeStyles=function(a){this._stackBadgeStyles=a};dvt.AdfDiagram.prototype.getStackBadgeStyles=function(){return this._stackBadgeStyles};dvt.AdfDiagram.prototype.setStackUnderlayStyles=function(a){this._stackStackUnderlayStyles=a};dvt.AdfDiagram.prototype.getStackUnderlayStyles=function(){return this._stackStackUnderlayStyles};dvt.AdfDiagram.prototype.setDiagramButtonStyles=function(a){this._diagramButtonStyles=a};dvt.AdfDiagram.prototype.getDiagramButtonStyles=function(){return this._diagramButtonStyles};
dvt.AdfDiagram.getButtonBorderRadius=function(a){var b=0;a&&a[dvt.AdfDiagram.BUTTON_STATE_ENA]&&a[dvt.AdfDiagram.BUTTON_STATE_ENA]instanceof dvt.CSSStyle&&(b=a[dvt.AdfDiagram.BUTTON_STATE_ENA].getBorderRadius());return b};dvt.AdfDiagram.getButtonFill=function(a,b){var c=null;if(a&&a[b]){var d=a[b];d&&(c=d.getStyle(dvt.CSSStyle.BACKGROUND_COLOR),d=d.getBackgroundImage(),c=dvt.AdfDiagram.CreateFill(c,d))}return c};
dvt.AdfDiagram.getButtonStroke=function(a,b){var c=null,d;if(a&&a[b]){var e=a[b];(d=e.getStyle(dvt.CSSStyle.BORDER_COLOR))||(d=e.getStyle(dvt.CSSStyle.BORDER_TOP_COLOR));d&&(c=new dvt.SolidStroke(d,1,1))}return c};dvt.AdfDiagram.CreateFill=function(a,b){var c=null;if(b&&b instanceof dvt.CSSGradient)var c=b.getColors(),d=b.getAlphas(),e=b.getRatios(),f=b.getAngle(),c=new dvt.LinearGradientFill(f,c,d,e);else a&&(c=new dvt.SolidFill(a,1));return c};
dvt.AdfDiagram.prototype.CreateDropShadowFilter=function(a){return dvt.Agent.isPlatformGecko()?null:dvt.StyleUtils.getShadow(a)};dvt.AdfDiagram.prototype.GetControlPanel=function(){var a=this.GetControlPanelBehavior();return a!=dvt.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_HIDDEN?(a=a==dvt.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_COLLAPSED?dvt.ControlPanel.STATE_COLLAPSED:dvt.ControlPanel.STATE_EXPANDED,new dvt.AdfDiagramControlPanel(this.getCtx(),this,a)):null};
dvt.AdfDiagram.prototype.setSyncCardOff=function(a){this._bSyncCardOff=a};dvt.AdfDiagram.prototype.isSyncCardOff=function(){return this._bSyncCardOff};dvt.AdfDiagram.prototype.getShowPopupBehaviors=function(){return this._showPopupBehaviors};dvt.AdfDiagram.prototype.addShowPopupBehavior=function(a){this._showPopupBehaviors||(this._showPopupBehaviors=[]);this._showPopupBehaviors.push(a)};dvt.AdfDiagram.prototype.GetLayoutNodeIdsList=function(){return this._nodesPostContainerDisclosure};
dvt.AdfDiagram.prototype.IsNodeIsolateValid=function(a){var b=this.GetLayoutNodeIdsList();if(!b||1==b.length&&a==b[0])return!1;if(this.getNodeById(a).isStack())for(var c=this._nodeStackMap[a],d=0;d<b.length;d++){var e=b[d];if(e!=a&&this._nodeStackMap[e]!=c){var f=this.getNodeById(e),e=this.IsAncestorNode(e,a)&&f.isHiddenAncestor();if(!e)return!0}}else for(d=0;d<b.length;d++)if(e=b[d],e!=a&&(f=this.getNodeById(e),!this.IsAncestorNode(a,e)&&(e=this.IsAncestorNode(e,a)&&f.isHiddenAncestor(),!e)))return!0;
return!1};dvt.AdfDiagram.prototype.IsAncestorNode=function(a,b){for(var c=this.getNodeById(b).getData().getGroupId();c;){if(c==a)return!0;c=this.getNodeById(c).getData().getGroupId()}return!1};dvt.AdfDiagram.prototype.getAutomation=function(){this.Automation||(this.Automation=new DvtAdfDiagramAutomation(this));return this.Automation};dvt.AdfDiagram.prototype.GetXmlComponentName=function(){return"dg"};dvt.AdfDiagram.prototype.ProcessJSON=function(a){return a};
dvt.AdfDiagram.prototype.getSortedVisibleNodesByGroupDepth=function(){this._visibleNodesByGroupDepth||(this._visibleNodesByGroupDepth=this.SortNodesByGroupDepth(!1));return this._visibleNodesByGroupDepth};dvt.AdfDiagram.prototype.resetSortedNodesArray=function(){this._visibleNodesByGroupDepth=null};
dvt.AdfDiagram.prototype.ResetNodesAndLinks=function(a){var b=this._linksPane.getParent().getChildIndex(this._linksPane),c=this._nodesPane.getParent().getChildIndex(this._nodesPane),d=this._topPane.getParent().getChildIndex(this._topPane);this._oldLinksPane=this._linksPane;this._oldNodesPane=this._nodesPane;this._oldTopPane=this._topPane;this._linksPane=new dvt.Container(this.getCtx());this._nodesPane=new dvt.Container(this.getCtx());this._topPane=new dvt.Container(this.getCtx());this._oldLinksPane.getParent().addChildAt(this._linksPane,
b);this._oldLinksPane.getParent().removeChild(this._oldLinksPane);this._oldNodesPane.getParent().addChildAt(this._nodesPane,c);this._oldNodesPane.getParent().removeChild(this._oldNodesPane);this._oldTopPane.getParent().addChildAt(this._topPane,d);this._oldTopPane.getParent().removeChild(this._oldTopPane);this._oldLinksPane.setAlpha(0);this._oldLinksPane.setMouseEnabled(!1);this._oldNodesPane.setAlpha(0);this._oldNodesPane.setMouseEnabled(!1);this._oldTopPane.setAlpha(0);this._oldTopPane.setMouseEnabled(!1);
this.addChild(this._oldLinksPane);this.addChild(this._oldNodesPane);this.addChild(this._oldTopPane);this._oldNodes=this._nodes;this._oldNodesByRowIndex=this._nodesByRowIndex;this._oldArNodeIds=this._arNodeIds;this._nodes={};this._nodesByRowIndex={};this._arNodeIds=[];this._rootNodes=[];if(a)for(b=0;b<this._oldArNodeIds.length;b++)c=this._oldArNodeIds[b],d=this._oldNodes[c],this.addNodeData(d.getData()),this.getNodeById(c).CopyState(d);this._oldLinks=this._links;this._oldLinksByRowIndex=this._linksByRowIndex;
this._oldArLinkIds=this._arLinkIds;this._links={};this._linksByRowIndex={};this._arLinkIds=[];this._arCrossContainerLinkIds=null;if(a)for(b=0;b<this._oldArLinkIds.length;b++)a=this._oldArLinkIds[b],c=this._oldLinks[a],this.addLinkData(c.getData()),this.getLinkById(a).CopyState(c);this._drillBreadcrumbs&&(this.RemoveDrillBreadcrumbs(),this.AdjustViewSpace(0));this._overviewNodes=this._overviewContent=null};
dvt.AdfDiagram.prototype.CreateDataAnimationState=function(){var a={panZoomMatrix:this.getPanZoomCanvas().getContentPane().getMatrix(),panZoomCanvasTy:this.getPanZoomCanvas().getTranslateY(),panZoomCanvasSize:this.getPanZoomCanvas().getSize(),panelDrawerTy:this._panelDrawer?this._panelDrawer.getTranslateY():null,restoreButtonTy:this._restoreButton?this._restoreButton.getTranslateY():null,drillBreadcrumbs:this._drillBreadcrumbs,stackNodeMap:this._stackNodeMap,nodeStackMap:this._nodeStackMap,arNodeIds:this._arNodeIds,
arLinkIds:this._arLinkIds};this._overviewWindow&&(a.overviewViewportRect=this._overviewWindow.GetViewportRectangle(),a.overviewContent=this._overviewContent,a.overviewNodes=this._overviewNodes);return a};dvt.AdfDiagram.prototype.CreateCustomAnimPlayable=function(){return new dvt.CustomAnimation(this.getCtx(),null,this.getAnimationDuration())};dvt.AdfDiagram.prototype.setButtonStyle=function(a){this._buttonStyle=a};dvt.AdfDiagram.prototype.getButtonStyle=function(){return this._buttonStyle};
dvt.AdfDiagram.prototype.setLabelStyle=function(a){this._labelStyle=a};dvt.AdfDiagram.prototype.getLabelStyle=function(){return this._labelStyle};dvt.AdfDiagram.prototype.SetPanZoomCanvasHeight=function(a){this.getPanZoomCanvas().setSize(this.getPanZoomCanvas().getSize().w,a)};dvt.AdfDiagram.prototype.GetPanZoomCanvasHeight=function(a){return this.getPanZoomCanvas().getSize().h};
dvt.AdfDiagram.prototype.AnimateUpdate=function(a,b){var c=null,d={},e={};if(!b.stackNodeMap&&this._stackNodeMap)for(var f in this._stackNodeMap)d[f]=!0;else if(b.stackNodeMap&&!this._stackNodeMap)for(f in b.stackNodeMap)e[f]=!0;else if(b.stackNodeMap&&this._stackNodeMap){for(f in b.stackNodeMap)this._stackNodeMap[f]||(e[f]=!0);for(f in this._stackNodeMap)b.stackNodeMap[f]||(d[f]=!0)}for(f in e)for(var e=b.stackNodeMap[f],g=e[0],g=this._nodes[g],g=new dvt.Point(g.getTranslateX(),g.getTranslateY()),
h=1;h<e.length;h++)this._nodes[e[h]]._dataAnimStackPos=g;for(f in d)for(e=this._stackNodeMap[f],g=e[0],g=this._oldNodes[g],g=new dvt.Point(g.getTranslateX(),g.getTranslateY()),h=1;h<e.length;h++)this._nodes[e[h]]._dataAnimStackPos=g;d=b.panZoomMatrix;f=this.getPanZoomCanvas().getContentPane().getMatrix();d.equals(f)||(c||(c=this.CreateCustomAnimPlayable()),this.getPanZoomCanvas().getContentPane().setMatrix(d),c.getAnimator().addProp(dvt.Animator.TYPE_MATRIX,this.getPanZoomCanvas().getContentPane(),
this.getPanZoomCanvas().getContentPane().getMatrix,this.getPanZoomCanvas().getContentPane().setMatrix,f));d=b.panZoomCanvasTy;f=this.getPanZoomCanvas().getTranslateY();d!=f&&(c||(c=this.CreateCustomAnimPlayable()),this.getPanZoomCanvas().setTranslateY(d),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this.getPanZoomCanvas(),this.getPanZoomCanvas().getTranslateY,this.getPanZoomCanvas().setTranslateY,f));d=b.panZoomCanvasSize;f=this.getPanZoomCanvas().getSize();d.h!=f.h&&(c||(c=this.CreateCustomAnimPlayable()),
this.SetPanZoomCanvasHeight(d.h),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this,this.GetPanZoomCanvasHeight,this.SetPanZoomCanvasHeight,f.h));d=b.panelDrawerTy;this._panelDrawer&&null!=d&&(f=this._panelDrawer.getTranslateY(),d!=f&&(c||(c=this.CreateCustomAnimPlayable()),this._panelDrawer.setTranslateY(d),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._panelDrawer,this._panelDrawer.getTranslateY,this._panelDrawer.setTranslateY,f)));d=b.restoreButtonTy;this._restoreButton&&null!=d&&(f=
this._restoreButton.getTranslateY(),d!=f&&(c||(c=this.CreateCustomAnimPlayable()),this._restoreButton.setTranslateY(d),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._restoreButton,this._restoreButton.getTranslateY,this._restoreButton.setTranslateY,f)));var k=b.drillBreadcrumbs,d=this._drillBreadcrumbs;k&&d?(c||(c=this.CreateCustomAnimPlayable()),d.setAlpha(0),this.addChild(k),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,k,k.getAlpha,k.setAlpha,0),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,
d,d.getAlpha,d.setAlpha,1),dvt.Playable.appendOnEnd(c,function(){k.getParent().removeChild(k);k.destroy()})):d?(d=this.CreateCustomAnimPlayable(),this._drillBreadcrumbs.setAlpha(0),d.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._drillBreadcrumbs,this._drillBreadcrumbs.getAlpha,this._drillBreadcrumbs.setAlpha,1),a.add(d,DvtAdfDiagramDataAnimationHandler.PHASE_INSERT)):k&&(d=this.CreateCustomAnimPlayable(),this.addChild(k),d.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,k,k.getAlpha,k.setAlpha,
0),dvt.Playable.appendOnEnd(d,function(){k.getParent().removeChild(k);k.destroy()}),a.add(d,DvtAdfDiagramDataAnimationHandler.PHASE_DELETE));b.overviewViewportRect&&b.overviewContent&&b.overviewNodes&&this._overviewWindow&&this._overviewContent&&this._overviewNodes&&DvtAdfDiagramOverviewUtils.AnimateUpdate(this,a,b.overviewViewportRect,this._overviewWindow,b.overviewContent,this._overviewContent,b.overviewNodes,this._overviewNodes,b.arNodeIds,this._arNodeIds);c&&a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_UPDATE)};
dvt.AdfDiagram.prototype.__getPanelDrawer=function(){return this._panelDrawer};dvt.AdfDiagram.prototype.getNavigableLinksForNodeId=function(a){var b=[],c;for(c in this._links){var d=this.getLinkById(c),e=this.getLinkStartId(d),f=this.getLinkEndId(d);e!=a&&f!=a||!d.getVisible()||b.push(d)}return b};dvt.AdfDiagram.prototype.getLinkStartId=function(a){return a.isPromoted()?this._containerLinkPromotionMap[a.getData().getId()][0]:a.getData().getStartId()};
dvt.AdfDiagram.prototype.getLinkEndId=function(a){return a.isPromoted()?this._containerLinkPromotionMap[a.getData().getId()][1]:a.getData().getEndId()};dvt.AdfDiagram.prototype.getShapesForViewSwitcher=function(a){a={};for(var b in this._nodes){var c=this._nodes[b];c.getVisible()&&(a[b]=c._afRoot)}return a};dvt.AdfDiagram.prototype.isDragged=function(a){return this._bDragged};
dvt.AdfDiagram.prototype.getBreadcrumbsOptions=function(){var a=this.getBreadcrumbsStyles(dvt.AdfDiagram.BUTTON_STATE_ENA),b=this.getBreadcrumbsStyles(dvt.AdfDiagram.BUTTON_STATE_OVR),c=this.getBreadcrumbsStyles(dvt.AdfDiagram.BUTTON_STATE_DWN),d=this.getBreadcrumbsStyles(dvt.AdfDiagram.BUTTON_STATE_DIS);return{labelStyle:a,labelStyleOver:b,labelStyleDown:c,disabledLabelStyle:d}};
dvt.AdfDiagram.prototype.prepareForDataChange=function(){this._bRendered?(this.StopAnimation(!0),dvt.AdfDiagramTransitionUtils.__prepForDataAnim(this,!1),this._resetTransitionState(),this._bRendered=!1,this._visibleNodesByGroupDepth=null,"auto"==this.getDataChangeAnim()?this._bAnimTransition=!0:(this._oldLinksPane.getParent().removeChild(this._oldLinksPane),this._oldNodesPane.getParent().removeChild(this._oldNodesPane),this._oldTopPane.getParent().removeChild(this._oldTopPane),this.destroyOldContent()),
this._currentViewport=this.getPanZoomCanvas().getViewport(),this.removeEvtListener(dvt.MouseEvent.MOUSEMOVE,this.HandleMouseMove,!1,this),this.removeEvtListener(dvt.MouseEvent.MOUSEUP,this.HandleMouseUp,!1,this),this._bDragged=!1):0<this.GetAllNodes().length&&(this._nodes={},this._nodesByRowIndex={},this._arNodeIds=[],this._rootNodes=[],this._links={},this._linksByRowIndex={},this._arLinkIds=[],this.removeEvtListener(dvt.MouseEvent.MOUSEMOVE,this.HandleMouseMove,!1,this),this.removeEvtListener(dvt.MouseEvent.MOUSEUP,
this.HandleMouseUp,!1,this),this._bDragged=!1)};dvt.AdfDiagram.prototype.setPaletteStyles=function(a){this._paletteStyles=a};dvt.AdfDiagram.prototype.getPaletteStyles=function(){return this._paletteStyles};
dvt.AdfDiagram.prototype.destroyOldContent=function(){if(this._oldArNodeIds)for(var a=this._oldArNodeIds.length-1;0<=a;a--)this._oldNodes[this._oldArNodeIds[a]].destroy();if(this._oldArLinkIds)for(a=this._oldArLinkIds.length-1;0<=a;a--)this._oldLinks[this._oldArLinkIds[a]].destroy();this._oldArLinkIds=this._oldLinksByRowIndex=this._oldLinks=this._oldArNodeIds=this._oldNodesByRowIndex=this._oldNodes=null};
dvt.AdfDiagram.prototype._processCenterNode=function(a,b){if(this._centerNode){var c=this.getNodeById(this._centerNode);if(c&&c.getVisible()){var d=this.getPanZoomCanvas(),e=c.getContentBounds(),e=new dvt.Point(e.x+.5*e.w,e.y+.5*e.h),c=this.LocalToStage(e,c,b),c=this.StageToLocal(c,d.getContentPane(),b),e=d.getZoom(b);d.panTo(this.Width/2-c.x*e,this.Height/2-c.y*e,b)}a&&(this._centerNode=null)}};
dvt.AdfDiagram.prototype._processPanZoomSettings=function(a,b){this._panZoom&&!this.IsLayoutViewport()&&(this._setRerenderImmediate(!0),this.getPanZoomCanvas().zoomTo(this._panZoom.zoom,0,0,b),this.getPanZoomCanvas().panTo(this._panZoom.panX,this._panZoom.panY,b),a&&(this._panZoom=null),this._setRerenderImmediate(!1))};dvt.AdfDiagram.prototype._clearPanningConstraints=function(){var a=this.getPanZoomCanvas();a.setMinPanX(null);a.setMinPanY(null);a.setMaxPanX(null);a.setMaxPanY(null)};
dvt.AdfDiagram.prototype._setRerenderImmediate=function(a){this._rerenderImmediate=a};dvt.AdfDiagram.prototype._getRerenderImmediate=function(){return this._rerenderImmediate};dvt.AdfDiagram.prototype.convertPanelCardIdToIndex=function(a){if(this._cardSelectorList)for(var b=0;b<this._cardSelectorList.length;b++)if(this._cardSelectorList[b][2]==a)return b;return-1};
dvt.AdfDiagram.prototype.convertIndexToPanelCardId=function(a){return this._cardSelectorList?this._cardSelectorList[a]?this._cardSelectorList[a][2]:null:null};dvt.AdfDiagram.prototype.setSummary=function(a){this._summary=a};dvt.AdfDiagram.prototype.getSummary=function(){return this._summary};
dvt.AdfDiagram.prototype.getAccessibilityStates=function(){var a=[];this._drilledNodePath&&a.push(dvt.Bundle.getTranslatedString(dvt.Bundle.ADF_DIAGRAM_PREFIX,"STATE_DRILLED"));this.IsStackPreview()&&(a.push(dvt.Bundle.getTranslatedString(dvt.Bundle.ADF_DIAGRAM_PREFIX,"STATE_PREVIEW_MODE")),a.push(dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"COLON_SEP_LIST",[dvt.Bundle.getTranslatedString(dvt.Bundle.ADF_DIAGRAM_PREFIX,"SIZE"),this.getNodeById(this.GetStackPreviewNodeId()).getStackCount()])));
return a};dvt.AdfDiagram.prototype.GetComponentDescription=function(){var a=dvt.Displayable.generateAriaLabel(this.getSummary(),this.getAccessibilityStates());return a?dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"COLON_SEP_LIST",[dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"DIAGRAM"),a]):dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"DIAGRAM")};
dvt.AdfDiagram.prototype.setContextKeyboardHandlers=function(){var a=[this];this._panelDrawer&&(a.push(this._panelDrawer),this._panelDrawer.isDisclosed()&&this._panelDrawer.getDisplayedPanelId()==dvt.PanelDrawer.PANEL_PALETTE&&a.push(this._palette),this._panelDrawer.isDisclosed()&&this._panelDrawer.getDisplayedPanelId()==dvt.PanelDrawer.PANEL_LEGEND&&a.push(this._legend));this._overviewWindowPanel&&this._overviewWindowPanel!=this._panelDrawer&&a.push(this._overviewWindowPanel);this.getCtx().setKeyboardFocusArray(a)};
dvt.AdfDiagram.prototype.setAutomationState=function(a,b,c){this._automationStatesMap||(this._automationStatesMap={});this._automationStatesMap[a]||(this._automationStatesMap[a]={});this._automationStatesMap[a][b]=c};dvt.AdfDiagram.prototype.getAutomationState=function(a,b){return null!=this._automationStatesMap&&null!=this._automationStatesMap[a]?this._automationStatesMap[a][b]:null};
dvt.AdfDiagram.prototype.clearAutomationState=function(){0==this._interactionDisableCounter&&(this._automationStatesMap=null)};
dvt.AdfDiagram.prototype.renderNodeFromContext=function(a){var b=this.getNodeById(a.getId());if(b.isDisclosed()){for(var c=this.CreateEmptyLayoutContext(),d=a.getChildNodes(),e=0;e<d.length;e++){var f=d[e];f.IsRendered||this.renderNodeFromContext(f);c.addNode(f)}this.ApplyLayoutContext(c);(d=a.getContainerPadding())&&b.setContainerPadding(dvt.BaseDiagram.getContainerPadding(d))}d=this.createAfContext();b.createNodeContents(d);b.renderNode(d);this.UpdateNodeLayoutContext(a,b);if(b.isDisclosed())for(d=
a.getChildNodes(),e=0;e<d.length;e++){f=d[e];a=new dvt.DiagramPoint(0,0);if(c=b.GetChildNodePanePosition()){var g=b.getContainerPadding();a.x+=c.x-g.left;a.y+=c.y-g.top}c=f.ContentOffset;f.ContentOffset=new dvt.DiagramPoint(c.x+a.x,c.y+a.y)}};
dvt.AdfDiagram.prototype._addCrossContainerNodes=function(a,b,c,d){for(var e=a.getLayout(),f=c.length-1;0<=f;f--){var g=this.getNodeById(c[f]),h=g.getData().getGroupId();if(!h||h==b)break;var k=this.CreateLayoutContextNode(g,e,!1,a);k.setReadOnly(!0);k.setContainerId(h);var l=new dvt.DiagramPoint(g.getTranslateX(),g.getTranslateY());if(d){var m=d.getDestVal(g,g.getTranslateX),g=d.getDestVal(g,g.getTranslateY);null==m||isNaN(m)||null==g||isNaN(g)||(l=new dvt.DiagramPoint(m,g))}m=this.getNodeById(h);
if(h=m.GetChildNodePanePosition(d))m=m.getContainerPadding(),l.x+=h.x-m.left,l.y+=h.y-m.top;k.setPosition(l);a.addNodeToMap(k)}};dvt.AdfDiagram.prototype.getPalette=function(){return this._palette};dvt.AdfDiagram.prototype.GetMinZoomFactor=function(){return.5};
dvt.AdfDiagram.prototype.GetLinkTranslationOffset=function(a,b,c,d){var e=new dvt.Point(0,0);if("global"!==this._layoutBehavior||!a.getGroupId())e=c;else if(a.getGroupId()!=b.getCoordinateSpace()){b=b.getCoordinateSpace();for(a=this.getNodeById(a.getGroupId());a;){var f=a.GetChildNodePanePosition();e.x-=f.x-a.GetPosition(d).x;e.y-=f.y-a.GetPosition(d).y;a=a.getGroupId();a=a!=b?this.getNodeById(a):null}b||(e.x+=c.x,e.y+=c.y)}return e};
dvt.AdfDiagram.prototype.UpdateKeyboardFocus=function(){var a=null,b=this.getEventManager().getFocus();if(b instanceof dvt.AdfDiagramNode||b instanceof dvt.AdfDiagramLink){a=b.getData().getId();a=b instanceof dvt.AdfDiagramNode?this.getNodeById(a):this.getLinkById(a);if(b==a)return;b instanceof dvt.AdfDiagramNode&&b.setFlyOutEnabled(!1)}if(a&&!a.getVisible()||a&&a.getVisible()&&a.isHiddenAncestor&&a.isHiddenAncestor())a=null;a||(a=this.GetInitialFocusNode());this.getEventManager().setFocusObj(a)};
dvt.AdfDiagram.prototype.GetInitialFocusNode=function(){var a=function(b,d){if(!dvt.ArrayUtils.isArray(d)||0===d.length)return null;for(var e=[],f=0;f<d.length;f++){var g=d[f];if(g.getVisible()&&!g.isHiddenAncestor())return g;for(var h=g.getChildNodeCount(),g=g.getChildNodeIds(),k=0;k<h;k++)e.push(b.getNodeById(g[k]))}return a(b,e)},b=this.getSortedVisibleNodesByGroupDepth();return b&&b[0]?a(this,b[0]):null};
dvt.Bundle.addDefaultStrings(dvt.Bundle.ADF_DIAGRAM_PREFIX,{STATE_STACKED:"Stacked",STATE_PREVIEW_MODE:"Preview Mode",STATE_HAS_ADDITIONAL_LINKS:"Has Additional Links",STATE_DRILLED:"Drilled",SIZE:"Size",PROMOTED_LINK_ARIA_DESC:"Indirect"});
var DvtAdfDiagramContainerBadgeHandler=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(DvtAdfDiagramContainerBadgeHandler,dvt.Obj,"DvtAdfDiagramContainerBadgeHandler");DvtAdfDiagramContainerBadgeHandler.prototype.Init=function(a,b,c){this._diagram=a;this._node=b;this._button=c;this._button.setTooltip(this._diagram.getResourcesMap()[this._node.isDisclosed()?"discloseExpandedTip":"discloseCollapsedTip"])};DvtAdfDiagramContainerBadgeHandler.prototype.getTooltip=function(){return this._button.getTooltip()};
DvtAdfDiagramContainerBadgeHandler.prototype.HandleClick=function(a){dvt.EventManager.consumeEvent(a);a=this._node.getData().getId();this._diagram.setNodeDisclosed(a,!this._node.isDisclosed())};DvtAdfDiagramContainerBadgeHandler.prototype.isUnrelatedToSelection=function(){return!0};
var DvtAdfDiagramDataAnimationHandler=function(a){this.Init(a,null)};dvt.Obj.createSubclass(DvtAdfDiagramDataAnimationHandler,dvt.DataAnimationHandler,"DvtAdfDiagramDataAnimationHandler");DvtAdfDiagramDataAnimationHandler.PHASE_DELETE=0;DvtAdfDiagramDataAnimationHandler.PHASE_UPDATE=1;DvtAdfDiagramDataAnimationHandler.PHASE_INSERT=2;
DvtAdfDiagramDataAnimationHandler.prototype.Init=function(a,b){DvtAdfDiagramDataAnimationHandler.superclass.Init.call(this,a,b);this._skipLinks=this._skipNodes=this._newLinks=this._oldLinks=this._newNodes=this._oldNodes=null};
DvtAdfDiagramDataAnimationHandler.prototype.ConstructAnimation=function(a,b,c,d,e,f,g,h,k,l){if(!this.getCtx().isOffscreen()){a&&b&&b.AnimateUpdate(this,a);a={};for(var m in d)a[m]=d[m];d=a;a={};for(var n in f)a[n]=f[n];f=a;a={};for(m in c)a[m]=c[m];c=a;m={};for(n in e)m[n]=e[n];e=m;this._oldNodes=c;this._newNodes=d;this._oldLinks=e;this._newLinks=f;this._skipNodes={};this._skipLinks={};if(c)for(a=0;a<g.length;a++)if(m=g[a],this._skipNodes[m])delete c[m],delete d[m];else if(k=c[m])(l=d[m])?(l.AnimateUpdate(this,
k),delete d[m]):k.AnimateDelete(this,b);g=[];for(a=0;a<h.length;a++)m=h[a],d[m]&&g.push(m);for(a=0;a<g.length;a++)m=g[a],this._skipNodes[m]?(delete c[m],delete d[m]):d[m]&&d[m].AnimateInsert(this);if(e)for(var p in e)if(this._skipLinks[p])delete e[p],delete f[p];else if(c=e[p])(d=f[p])?(d.AnimateUpdate(this,c),delete f[p]):c.AnimateDelete(this,b);for(n in f)this._skipLinks[n]?(delete e[n],delete f[n]):f[n]&&f[n].AnimateInsert(this);this._skipLinks=this._skipNodes=this._newLinks=this._oldLinks=this._newNodes=
this._oldNodes=null}};DvtAdfDiagramDataAnimationHandler.prototype.SkipDescendants=function(a,b,c){if(!c||0>c)c=0;var d=b.getNodeById(a);if(d){var e=d.getChildNodeIds();if(e)for(a=0;a<e.length;a++){var f=e[a];1>c&&(this._skipNodes[f]=!0);this.SkipDescendants(f,b,c-1)}if(1>c){if(b=d.getChildLinkIds())for(a=0;a<b.length;a++)this._skipLinks[b[a]]=!0;if(b=d.getCrossChildLinkIds())for(a=0;a<b.length;a++)this._skipLinks[b[a]]=!0}}};
var DvtAdfDiagramFlyOutButton=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){this.Init(a,b,c,d,e,f,g,h,k,l,m,n,p,q)};dvt.Obj.createSubclass(DvtAdfDiagramFlyOutButton,dvt.Container,"DvtAdfDiagramFlyOutButton");DvtAdfDiagramFlyOutButton._BUTTON_WIDTH=44;DvtAdfDiagramFlyOutButton._BUTTON_HEIGHT=44;DvtAdfDiagramFlyOutButton._ICON_WIDTH=24;DvtAdfDiagramFlyOutButton._ICON_HEIGHT=24;
DvtAdfDiagramFlyOutButton.prototype.Init=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){DvtAdfDiagramFlyOutButton.superclass.Init.call(this,a,null,n);this._tooltip=e;this.RenderSelf(a,b,c,d,g,h,k,l,m,p,q);f&&f.associate(this,this)};DvtAdfDiagramFlyOutButton.prototype.getTooltip=function(){return this._tooltip?this._tooltip:null};DvtAdfDiagramFlyOutButton.prototype.getWidth=function(){return DvtAdfDiagramFlyOutButton._BUTTON_WIDTH};DvtAdfDiagramFlyOutButton.prototype.getHeight=function(){return DvtAdfDiagramFlyOutButton._BUTTON_HEIGHT};
DvtAdfDiagramFlyOutButton.prototype.getButton=function(){return this._button};
DvtAdfDiagramFlyOutButton.prototype.RenderSelf=function(a,b,c,d,e,f,g,h,k,l,m){var n=this.getWidth(),p=this.getHeight(),q=DvtAdfDiagramFlyOutButton._ICON_WIDTH,r=DvtAdfDiagramFlyOutButton._ICON_WIDTH,t=.5*(n-q),u=.5*(p-r),w=dvt.AdfDiagram.getButtonFill(k,dvt.AdfDiagram.BUTTON_STATE_ENA),v=dvt.AdfDiagram.getButtonFill(k,dvt.AdfDiagram.BUTTON_STATE_OVR),x=dvt.AdfDiagram.getButtonFill(k,dvt.AdfDiagram.BUTTON_STATE_DWN),z=dvt.AdfDiagram.getButtonStroke(k,dvt.AdfDiagram.BUTTON_STATE_ENA),y=dvt.AdfDiagram.getButtonStroke(k,
dvt.AdfDiagram.BUTTON_STATE_OVR),A=dvt.AdfDiagram.getButtonStroke(k,dvt.AdfDiagram.BUTTON_STATE_DWN);k=dvt.AdfDiagram.getButtonBorderRadius(k);f=this.GetPathArray(n,p,k,e,f,g,h);e=new dvt.Path(a,f);e.setFill(w);e.setStroke(z);b=new dvt.Image(a,b,t,u,q,r);e.addChild(b);w=new dvt.Path(a,f);w.setFill(v);w.setStroke(y);b=new dvt.Image(a,c,t,u,q,r);w.addChild(b);c=new dvt.Path(a,f);c.setFill(x);c.setStroke(A);b=new dvt.Image(a,d,t,u,q,r);c.addChild(b);a=new dvt.Button(a,e,w,c,null,null,l,m);a.setPixelHinting(!0);
this.addChild(a);this._button=a};DvtAdfDiagramFlyOutButton.prototype.GetPathArray=function(a,b,c,d,e,f,g){var h=[];h.push("M",c,0);h.push("L",a-c,0);e?h.push("A",c,c,0,0,1,a,c):h.push("L",a,0,"L",a,c);h.push("L",a,b-c);g?h.push("A",c,c,0,0,1,a-c,b):h.push("L",a,b,"L",a-c,b);h.push("L",c,b);f?h.push("A",c,c,0,0,1,0,b-c):h.push("L",0,b,"L",0,b-c);h.push("L",0,c);d?h.push("A",c,c,0,0,1,c,0):h.push("L",0,0,"L",c,0);return h};
var DvtAdfDiagramLinkAnimFadeIn=function(a,b,c,d){this.Init(a,b,c,d)};"undefined"!=typeof dvt.AnimFadeIn&&dvt.Obj.createSubclass(DvtAdfDiagramLinkAnimFadeIn,dvt.AnimFadeIn,"DvtAdfDiagramLinkAnimFadeIn");DvtAdfDiagramLinkAnimFadeIn.prototype.Init=function(a,b,c,d){DvtAdfDiagramLinkAnimFadeIn.superclass.Init.call(this,a,b,c,d)};DvtAdfDiagramLinkAnimFadeIn.prototype.InitEndState=function(a){this._animator.addProp(dvt.Animator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,Math.min(1,a.GetMaxAlpha()))};
dvt.AdfDiagramInitAnim=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(dvt.AdfDiagramInitAnim,dvt.Obj,"dvt.AdfDiagramInitAnim");dvt.AdfDiagramInitAnim.prototype.Init=function(a,b){this._context=a;this._view=b;this._onEndObj=this._onEnd=null};dvt.AdfDiagramInitAnim.prototype.GetEnableInteractionFunc=function(){var a=this._view;return function(){a.setInteractionEnabled(!0)}};
dvt.AdfDiagramInitAnim.prototype.play=function(a){this._view.setInteractionEnabled(!1);switch(a){case dvt.BlackBoxAnimationHandler.ALPHA_FADE:this.PlayBlackBoxAnim(a);break;case dvt.AdfDiagram.INIT_ANIM_EXPLODE:this.PlayExplode();break;case dvt.AdfDiagram.INIT_ANIM_ELASTIC_EXPLODE:this.PlayExplode(!0);break;case dvt.AdfDiagram.INIT_ANIM_GROW_LINKS:this.PlayGrowLinks();break;case dvt.AdfDiagram.INIT_ANIM_POP:this.PlayPop();break;case dvt.AdfDiagram.INIT_ANIM_EXPLODE_GROW_LINKS:this.PlayExplodeGrowLinks();
break;case dvt.AdfDiagram.INIT_ANIM_ELASTIC_EXPLODE_GROW_LINKS:this.PlayExplodeGrowLinks(!0);break;case dvt.AdfDiagram.INIT_ANIM_POP_GROW_LINKS:this.PlayPopGrowLinks()}};dvt.AdfDiagramInitAnim.prototype.setOnEnd=function(a,b){this._onEnd=a;this._onEndObj=b?b:null};dvt.AdfDiagramInitAnim.prototype.getOnEnd=function(){return[this._onEnd,this._onEndObj]};
dvt.AdfDiagramInitAnim.prototype.PlayBlackBoxAnim=function(a){var b=this._view;this._view.getPanZoomCanvas()&&this._view.getPanZoomCanvas().getContentPane()&&(b=this._view.getPanZoomCanvas().getContentPane());a=dvt.BlackBoxAnimationHandler.getInAnimation(this._context,a,b,null,this._view.getAnimationDuration());this._onEnd&&dvt.Playable.appendOnEnd(a,this._onEnd,this._onEndObj);dvt.Playable.appendOnEnd(a,this.GetEnableInteractionFunc());a.play()};
dvt.AdfDiagramInitAnim.prototype.PlayExplode=function(a){this._view._nodesPane.setAlpha(0);var b=new dvt.AnimFadeIn(this._context,this._view._nodesPane,this._view.getAnimationDuration());a=this.CreateExplodeAnim(a);var c=this.CreateFadeInLinksAnim(),b=new dvt.SequentialPlayable(this._context,b,a,c);this._onEnd&&dvt.Playable.appendOnEnd(b,this._onEnd,this._onEndObj);dvt.Playable.appendOnEnd(b,this.GetEnableInteractionFunc());b.play()};
dvt.AdfDiagramInitAnim.prototype.PlayGrowLinks=function(){this._view._nodesPane.setAlpha(0);var a=this.CreateGrowLinksAnim(),b=new dvt.AnimFadeIn(this._context,this._view._nodesPane,this._view.getAnimationDuration()),a=new dvt.SequentialPlayable(this._context,b,a);this._onEnd&&dvt.Playable.appendOnEnd(a,this._onEnd,this._onEndObj);dvt.Playable.appendOnEnd(a,this.GetEnableInteractionFunc());a.play()};
dvt.AdfDiagramInitAnim.prototype.PlayPop=function(){var a=this.CreatePopAnim(),b=this.CreateFadeInLinksAnim(),a=new dvt.SequentialPlayable(this._context,a,b);this._onEnd&&dvt.Playable.appendOnEnd(a,this._onEnd,this._onEndObj);dvt.Playable.appendOnEnd(a,this.GetEnableInteractionFunc());a.play()};
dvt.AdfDiagramInitAnim.prototype.PlayExplodeGrowLinks=function(a){this._view._nodesPane.setAlpha(0);var b=new dvt.AnimFadeIn(this._context,this._view._nodesPane,this._view.getAnimationDuration());a=this.CreateExplodeAnim(a);var c=this.CreateGrowLinksAnim(),b=new dvt.SequentialPlayable(this._context,b,a,c);this._onEnd&&dvt.Playable.appendOnEnd(b,this._onEnd,this._onEndObj);dvt.Playable.appendOnEnd(b,this.GetEnableInteractionFunc());b.play()};
dvt.AdfDiagramInitAnim.prototype.PlayPopGrowLinks=function(){var a=this.CreatePopAnim(),b=this.CreateGrowLinksAnim(),a=new dvt.SequentialPlayable(this._context,a,b);this._onEnd&&dvt.Playable.appendOnEnd(a,this._onEnd,this._onEndObj);dvt.Playable.appendOnEnd(a,this.GetEnableInteractionFunc());a.play()};
dvt.AdfDiagramInitAnim.prototype.CreateExplodeAnim=function(a){for(var b=this._view._rootNodes,c=[],d=[],e,f,g=Number.MAX_VALUE,h=Number.MAX_VALUE,k=Number.MIN_VALUE,l=Number.MIN_VALUE,m=0;m<b.length;m++)e=this._view.getNodeById(b[m]),e.getVisible()&&(c.push(e),f=e.getTranslateX(),e=e.getTranslateY(),d.push(new dvt.Point(f,e)),f<g&&(g=f),e<h&&(h=e),f>k&&(k=f),e>l&&(l=e));f=g+(k-g)/2;h+=(l-h)/2;for(m=0;m<b.length;m++)e=this._view.getNodeById(b[m]),e.getVisible()&&e.setTranslate(f,h);b=new dvt.AnimMoveTo(this._context,
c,d,(a?1.75:1)*this._view.getAnimationDuration());a&&b.setEasing(dvt.BaseAnimation.EASING_ELASTIC_OUT);return b};
dvt.AdfDiagramInitAnim.prototype.CreateGrowLinksAnim=function(){var a=new dvt.CustomAnimation(this._context,null,this._view.getAnimationDuration()),b=a.getAnimator(),c=new dvt.CustomAnimation(this._context,null,.5*a.getDuration()),d=c.getAnimator(),e=this._view._links,f,g;for(f in e)if(e=this._view.getLinkById(f),e.getVisible()){g=e.getPoints();var h=dvt.Animator.TYPE_GROW_POLYLINE;isNaN(g[0])?(h=dvt.Animator.TYPE_GROW_PATH,e.setPoints(["M",g[1],g[2],"L",g[1]+1E-4,g[2]])):e.setPoints([g[0],g[1],g[0]+
1E-4,g[1]]);e.setAlpha(0);b.addProp(h,e,e.getPoints,e.setPoints,g);d.addProp(dvt.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,Math.min(1,e.GetMaxAlpha()))}return new dvt.ParallelPlayable(this._context,a,c)};dvt.AdfDiagramInitAnim.prototype.CreatePopAnim=function(){for(var a=[],b=0;b<this._view._rootNodes.length;b++){var c=this._view.getNodeById(this._view._rootNodes[b]);c.getVisible()&&a.push(c)}return new dvt.CombinedAnimPopIn(this._context,a,!1,this._view.getAnimationDuration(),2*this._view.getAnimationDuration())};
dvt.AdfDiagramInitAnim.prototype.GetLinksArray=function(){var a=[],b;for(b in this._view._links){var c=this._view.getLinkById(b);c.getVisible()&&a.push(c)}return a};dvt.AdfDiagramInitAnim.prototype.CreateFadeInLinksAnim=function(){for(var a=this.GetLinksArray(),b=0;b<a.length;b++)a[b].setAlpha(0);return new DvtAdfDiagramLinkAnimFadeIn(this._context,a,this._view.getAnimationDuration())};
var DvtAdfDiagramLayoutCallback=function(){this.Init()};dvt.Obj.createSubclass(DvtAdfDiagramLayoutCallback,dvt.Obj,"DvtAdfDiagramLayoutCallback");DvtAdfDiagramLayoutCallback.prototype.Init=function(){this._layouts={}};DvtAdfDiagramLayoutCallback.prototype.addLayout=function(a,b,c){this._layouts[a]=[b,c]};DvtAdfDiagramLayoutCallback.prototype.removeLayout=function(a){delete this._layouts[a]};
DvtAdfDiagramLayoutCallback.prototype.doLayout=function(a,b){var c=b.getLayout(),d=this._layouts[c],e=d[0],d=d[1];if(e)d?e.call(d,b):e(b);else return a.Log("Function for layout "+c+" is not defined","2"),null;return b};
var DvtAdfDiagramLayoutContainer=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(DvtAdfDiagramLayoutContainer,dvt.Container,"DvtAdfDiagramLayoutContainer");DvtAdfDiagramLayoutContainer.prototype.Init=function(a,b,c){DvtAdfDiagramLayoutContainer.superclass.Init.call(this,a,null,c);this._diagram=b;this._nodes={}};DvtAdfDiagramLayoutContainer.prototype.addNode=function(a){this._nodes[a.getData().getId()]=a;this.addChild(a)};
DvtAdfDiagramLayoutContainer.prototype.layout=function(a){if(this._diagram.getLayoutCallback()){var b=this._diagram.CreateEmptyLayoutContext();b.setLayoutAttributes({padding:10});var c,d;for(c in this._nodes)d=this._nodes[c],b.addNode(this._diagram.CreateLayoutContextNode(d,null,!1,b));0<b.getNodeCount()&&(this._diagram.SortLayoutContext(b),dvt.DiagramLayoutUtils.gridLayout(b),this.ApplyLayoutContext(b,a))}};
DvtAdfDiagramLayoutContainer.prototype.ApplyLayoutContext=function(a,b){for(var c=0;c<a.getNodeCount();c++){var d=a.getNodeByIndex(c),e=this.getNodeById(d.getId()),f=d.getPosition();f&&e.SetPosition(f.x,f.y,b);var g=d.getLabelBounds(),d=d.getLabelPosition();f&&g&&d&&(d=new dvt.Point(d.x-f.x,d.y-f.y),b?(b.addProp(dvt.Animator.TYPE_RECTANGLE,e,e.getLabelBounds,e.setLabelBounds,g),b.addProp(dvt.Animator.TYPE_POINT,e,e.getLabelPosition,e.setLabelPosition,d)):(e.setLabelBounds(g),e.setLabelPosition(d)))}for(c=
0;c<a.getLinkCount();c++){d=a.getLinkByIndex(c);e=this.getLinkById(d.getId());if(g=d.getPoints())b&&e.getPoints()?(f=dvt.Animator.TYPE_POLYLINE,0<g.length&&isNaN(g[0])&&(f=dvt.Animator.TYPE_PATH),b.addProp(f,e,e.getPoints,e.setPoints,g)):e.setPoints(g);g=d.getLabelBounds();d=d.getLabelPosition();g&&d&&(b?(b.addProp(dvt.Animator.TYPE_RECTANGLE,e,e.getLabelBounds,e.setLabelBounds,g),b.addProp(dvt.Animator.TYPE_POINT,e,e.getLabelPosition,e.setLabelPosition,d)):(e.setLabelBounds(g),e.setLabelPosition(d)))}};
DvtAdfDiagramLayoutContainer.prototype.getNodeById=function(a){(a=this._nodes[a])||(a=this._diagram.getNodeById(a));return a};
var DvtAdfDiagramLinkData=function(){this.Init()};dvt.Obj.createSubclass(DvtAdfDiagramLinkData,dvt.Obj,"DvtAdfDiagramLinkData");DvtAdfDiagramLinkData.prototype.Init=function(){this._endId=this._startId=this._templateId=this._groupId=this._id=null;this._elAttributes=[];this._layoutAttributes=null;this._rowIndex=-1};DvtAdfDiagramLinkData.prototype.setId=function(a){this._id=a};DvtAdfDiagramLinkData.prototype.getId=function(){return this._id};
DvtAdfDiagramLinkData.prototype.setRowIndex=function(a){this._rowIndex=a};DvtAdfDiagramLinkData.prototype.getRowIndex=function(){return this._rowIndex};DvtAdfDiagramLinkData.prototype.setGroupId=function(a){this._groupId=a};DvtAdfDiagramLinkData.prototype.getGroupId=function(){return this._groupId};DvtAdfDiagramLinkData.prototype.setTemplateId=function(a){this._templateId=a};DvtAdfDiagramLinkData.prototype.getTemplateId=function(){return this._templateId};
DvtAdfDiagramLinkData.prototype.setStartId=function(a){this._startId=a};DvtAdfDiagramLinkData.prototype.getStartId=function(){return this._startId};DvtAdfDiagramLinkData.prototype.setEndId=function(a){this._endId=a};DvtAdfDiagramLinkData.prototype.getEndId=function(){return this._endId};DvtAdfDiagramLinkData.prototype.setElAttributes=function(a){this._elAttributes=a};DvtAdfDiagramLinkData.prototype.getElAttributes=function(){return this._elAttributes};
DvtAdfDiagramLinkData.prototype.setLayoutAttributes=function(a){this._layoutAttributes=a};DvtAdfDiagramLinkData.prototype.getLayoutAttributes=function(){return this._layoutAttributes};
dvt.AdfDiagramLink=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(dvt.AdfDiagramLink,dvt.BaseDiagramLink,"dvt.AdfDiagramLink");dvt.AdfDiagramLink._DEFAULT_LINK_WIDTH=1;dvt.AdfDiagramLink._DEFAULT_LINK_LENGTH=28;dvt.AdfDiagramLink._START_CONNECTOR=0;dvt.AdfDiagramLink._END_CONNECTOR=1;dvt.AdfDiagramLink._HIT_DETECTION_WIDTH_OFFSET=4;dvt.AdfDiagramLink.COLOR="linkColor";dvt.AdfDiagramLink.SELECTED_COLOR="linkSelectColor";dvt.AdfDiagramLink.HOVER_INNER_COLOR="linkHoverInnerColor";
dvt.AdfDiagramLink.HOVER_OUTER_COLOR="linkHoverOuterColor";dvt.AdfDiagramLink.PROMOTED_COLOR="linkPromotedColor";dvt.AdfDiagramLink.PROMOTED_STYLE="linkPromotedStyle";dvt.AdfDiagramLink.PROMOTED_WIDTH="linkPromotedWidth";dvt.AdfDiagramLink.LABEL_STYLE="linkLabelStyle";
dvt.AdfDiagramLink.prototype.Init=function(a,b,c){dvt.AdfDiagramLink.superclass.Init.call(this,a,b.getId(),c);this._data=b;this._linkDef;this._linkColor;this._linkWidth;this._linkType;this._linkStyle;this._shortDesc;this._endConnectorType;this._startConnectorType;this._label;this._bRendered=!0;this._categories;this._initialPoints;this._deleteEnabled=this._updateEnabled=this._hover=!1;this._dragItems={};this._linkParent;this._bCrossContainerLink=!1;this._maxAlpha=1;this._linkUnderlay;this._savedStroke;
this._hitDetectionUnderlay;this._bFocusEffect=this._bFocused=!1;this._showPopupBehaviors;this._bDirty=this._bPromoted=!1;this.GetDiagram().getEventManager().associate(this,this);this._keyboardNavNode;this._tabStopsConnectorArray=[];this._bFirefox=dvt.Agent.isPlatformGecko();this._bIE=dvt.Agent.isPlatformIE();a=this._diagram.getLinkStyles();this._defaultColor=a[dvt.AdfDiagramLink.COLOR];this._selectColor=a[dvt.AdfDiagramLink.SELECTED_COLOR];this._hoverInnerColor=a[dvt.AdfDiagramLink.HOVER_INNER_COLOR];
this._hoverOuterColor=a[dvt.AdfDiagramLink.HOVER_OUTER_COLOR];this._linkLabelStyles=a[dvt.AdfDiagramLink.LABEL_STYLE];this._promotedColor=a[dvt.AdfDiagramLink.PROMOTED_COLOR];this._promotedStyle=a[dvt.AdfDiagramLink.PROMOTED_STYLE];this._promotedWidth=a[dvt.AdfDiagramLink.PROMOTED_WIDTH]?a[dvt.AdfDiagramLink.PROMOTED_WIDTH]:dvt.AdfDiagramLink._DEFAULT_LINK_WIDTH};
dvt.AdfDiagramLink.prototype.GetDiagram=function(){if(this._diagram)return this._diagram;if(this._cachedDiagram)return this._cachedDiagram;for(var a=this.getParent();a;){if(a instanceof dvt.AdfDiagram)return a;a=a.getParent()}};
dvt.AdfDiagramLink.prototype.getDimensionsWithStroke=function(a){a=a?a.getDestVal(this,this.getPoints):this.getPoints();a=dvt.PathUtils.getDimensions(a);var b=this._hitDetectionUnderlay.getStroke().getWidth();a.x-=b/2;a.y-=b/2;a.h+=b;a.w+=b;this.getStartConnector()&&(a=this.getStartConnector().getDimensions(this).getUnion(a));this.getEndConnector()&&(a=this.getEndConnector().getDimensions(this).getUnion(a));return a};dvt.AdfDiagramLink.prototype.showHoverEffect=function(){this._showFeedback(!0,this._selected)};
dvt.AdfDiagramLink.prototype.hideHoverEffect=function(){this._bFocusEffect||this._selected?this._showFeedback(this._bFocusEffect,this._selected):this._bHighlight&&this._hideFeedback()};dvt.AdfDiagramLink.prototype.showRollOverEffect=function(a){this.GetDiagram().ShowLinkHoverEffect(this,a instanceof dvt.KeyboardEvent)};dvt.AdfDiagramLink.prototype.hideRollOverEffect=function(){this.GetDiagram().HideLinkHoverEffect(this)};
dvt.AdfDiagramLink.prototype.ApplyStrokeToUnderlay=function(a,b){var c=b?this._selectColor:this._hoverOuterColor;if(this._linkUnderlay){var d=this._linkUnderlay.getStroke().clone();d.setColor(c);d.setWidth(2+this.GetAppliedLinkWidth());this.ApplyLinkStyle(d,!0);this._linkUnderlay.setStroke(d,2)}};dvt.AdfDiagramLink.prototype.HandleClick=function(a){this.GetDiagram().HandleLinkClick(this)};
dvt.AdfDiagramLink.prototype._showFeedback=function(a,b){this._bHighlight=!0;this._preserveKeyboardFocusEffect=!1;if(a){this._savedStroke||(this._savedStroke=this.getShape().getStroke());var c=this.getShape().getStroke().clone();c.setColor&&c.setColor(this._hoverInnerColor);this.getShape().setStroke(c);this.getStartConnector()&&this.IsStandardConnector(dvt.AdfDiagramLink._START_CONNECTOR)&&this.ReplaceConnectorColor(this.getStartConnector(),c);this.getEndConnector()&&this.IsStandardConnector(dvt.AdfDiagramLink._END_CONNECTOR)&&
this.ReplaceConnectorColor(this.getEndConnector(),c)}else this._savedStroke&&(this.getShape().setStroke(this._savedStroke),this.getStartConnector()&&this.IsStandardConnector(dvt.AdfDiagramLink._START_CONNECTOR)&&this.ReplaceConnectorColor(this.getStartConnector(),this._savedStroke),this.getEndConnector()&&this.IsStandardConnector(dvt.AdfDiagramLink._END_CONNECTOR)&&this.ReplaceConnectorColor(this.getEndConnector(),this._savedStroke),this._savedStroke=null);this._linkUnderlay||(this._linkUnderlay=
this.CreateFeedbackUnderlay(),this.addChildAt(this._linkUnderlay,0));this.ApplyStrokeToUnderlay(a,b)};
dvt.AdfDiagramLink.prototype._hideFeedback=function(){this._bHighlight=!1;this._savedStroke&&(this.getShape().setStroke(this._savedStroke),this.getStartConnector()&&this.IsStandardConnector(dvt.AdfDiagramLink._START_CONNECTOR)&&this.ReplaceConnectorColor(this.getStartConnector(),this._savedStroke),this.getEndConnector()&&this.IsStandardConnector(dvt.AdfDiagramLink._END_CONNECTOR)&&this.ReplaceConnectorColor(this.getEndConnector(),this._savedStroke),this._savedStroke=null);this._linkUnderlay&&(this.removeChild(this._linkUnderlay),
this._linkUnderlay.destroy&&this._linkUnderlay.destroy(),this._linkUnderlay=null);this._preserveKeyboardFocusEffect||this._updateKeyboardFocusEffect(null)};dvt.AdfDiagramLink.prototype.getDatatip=function(){return this.getShortDesc()};dvt.AdfDiagramLink.prototype.setShortDesc=function(a){this._shortDesc=a};
dvt.AdfDiagramLink.prototype.getShortDesc=function(){if(this._bPromoted){var a=null;1<this._promotionCount?a=this._diagram.getResourcesMap().promotedLinksTip:this._shortDesc||(a=this._diagram.getResourcesMap().promotedLinkTip);if(a)return dvt.Bundle.format(a,[this._promotionCount])}return this._shortDesc};dvt.AdfDiagramLink.prototype.getLayoutAttributes=function(a){var b=this.getData().getLayoutAttributes();return b&&a?b[a]:{}};
dvt.AdfDiagramLink.prototype.setEndConnectorType=function(a){this._endConnectorType=a};dvt.AdfDiagramLink.prototype.getEndConnectorType=function(){return this._endConnectorType};dvt.AdfDiagramLink.prototype.setStartConnectorType=function(a){this._startConnectorType=a};dvt.AdfDiagramLink.prototype.getStartConnectorType=function(){return this._startConnectorType};dvt.AdfDiagramLink.prototype.getData=function(){return this._data};
dvt.AdfDiagramLink.prototype.setLinkDef=function(a){if(this._linkDef=a)a.stamp(this.getData().getElAttributes(),this),this._refreshCursor();this._bDirty=!0};dvt.AdfDiagramLink.prototype.getLinkDef=function(){return this._linkDef};dvt.AdfDiagramLink.prototype.setLinkColor=function(a){this._linkColor=a};dvt.AdfDiagramLink.prototype.getLinkColor=function(){return this._linkColor?this._linkColor:this._defaultColor};dvt.AdfDiagramLink.prototype.setLinkWidth=function(a){this._linkWidth=a};
dvt.AdfDiagramLink.prototype.getLinkWidth=function(){return this._linkWidth?this._linkWidth:dvt.AdfDiagramLink._DEFAULT_LINK_WIDTH};dvt.AdfDiagramLink.prototype.setLinkLength=function(a){this._linkLength=a};dvt.AdfDiagramLink.prototype.getLinkLength=function(){return this._linkLength?this._linkLength:dvt.AdfDiagramLink._DEFAULT_LINK_LENGTH};dvt.AdfDiagramLink.prototype.setLinkType=function(a){this._linkType=a};
dvt.AdfDiagramLink.prototype.getLinkType=function(){return this._linkType?this._linkType:this.GetDefaultLinkType()};dvt.AdfDiagramLink.prototype.GetDefaultLinkType=function(){return dvt.AdfDiagramLinkDef.LINK_TYPE_DIRECT};dvt.AdfDiagramLink.prototype.setLinkStyle=function(a){this._linkStyle=a};dvt.AdfDiagramLink.prototype.getLinkStyle=function(){return this._linkStyle?this._linkStyle:dvt.AdfDiagramLinkDef.LINK_STYLE_SOLID};dvt.AdfDiagramLink.prototype.setLabel=function(a){this._label=a};
dvt.AdfDiagramLink.prototype.getLabel=function(){return this._label};dvt.AdfDiagramLink.prototype.setRendered=function(a){this._bRendered=a};dvt.AdfDiagramLink.prototype.isRendered=function(){return this._bRendered};dvt.AdfDiagramLink.prototype.setUpdateEnabled=function(a){this._updateEnabled=a};dvt.AdfDiagramLink.prototype.isUpdateEnabled=function(){return this._updateEnabled};dvt.AdfDiagramLink.prototype.setDeleteEnabled=function(a){this._deleteEnabled=a};
dvt.AdfDiagramLink.prototype.isDeleteEnabled=function(){return this._deleteEnabled};
dvt.AdfDiagramLink.prototype.DestroyContent=function(){if(this.getEndConnector()){var a=this.getEndConnector().getParent();a&&a.removeChild(this.getEndConnector());this.getEndConnector().destroy&&this.getEndConnector().destroy();this.setEndConnector(null)}this.getStartConnector()&&((a=this.getStartConnector().getParent())&&a.removeChild(this.getStartConnector()),this.getStartConnector().destroy&&this.getStartConnector().destroy(),this.setStartConnector(null));this.getShape()&&(this.removeChild(this.getShape()),
this.getShape().destroy&&this.getShape().destroy(),this.setShape(null));this._linkUnderlay&&(this.removeChild(this._linkUnderlay),this._linkUnderlay.destroy&&this._linkUnderlay.destroy(),this._linkUnderlay=null);this._hitDetectionUnderlay&&(this.removeChild(this._hitDetectionUnderlay),this._hitDetectionUnderlay.destroy&&this._hitDetectionUnderlay.destroy(),this._hitDetectionUnderlay=null);this._hover=!1;this._savedStroke=null};
dvt.AdfDiagramLink.prototype.renderLink=function(){if(!this.getShape()||this._bDirty){this.DestroyContent();var a=null,b=null,c=null,d=null,e=null;this._labelObj&&(a=this.getLabelBounds(),b=this.getLabelPosition(),c=this.getLabelRotationAngle(),d=this.getLabelRotationPoint(),e=this._labelObj.getAlpha(),this.removeChild(this._labelObj),this._labelObj.destroy&&this._labelObj.destroy(),this._labelObj=null);var f=this._pathCmds;f||(f=["M",0,0,"L",0,0]);var g=this.getData().getId();this.setShape(new dvt.Path(this.getCtx(),
f,g));this.getShape().setFill(null);this.addChildAt(this.getShape(),0);f=this.GetAppliedLinkColor();g=this.GetAppliedLinkWidth();f=new dvt.SolidStroke(f,1,g);dvt.Agent.isTouchDevice()&&dvt.Agent.isBrowserSafari()&&1==dvt.Agent.getDevicePixelRatio()&&f.setFixedWidth(!0);this.ApplyLinkStyle(f);this.getShape().setStroke(f);f=this.getEndConnectorType();g=this.getConnectorTemplate(dvt.DiagramLinkConnectorUtils.END_CONNECTOR);this.setEndConnector(this.CreateConnector(this._points,f,1,g));f=this.getStartConnectorType();
g=this.getConnectorTemplate(dvt.DiagramLinkConnectorUtils.START_CONNECTOR);this.setStartConnector(this.CreateConnector(this._points,f,0,g));this._refreshSelectionEffect();!this._bPromoted&&this.HasLabel()&&(this._labelObj=this.CreateLabel(),this.addChild(this._labelObj),a&&this.setLabelBounds(a),b&&this.setLabelPosition(b),null!=c&&this.setLabelRotationAngle(c),d&&this.setLabelRotationPoint(d),null!=e&&this._labelObj.setAlpha(e));this._hitDetectionUnderlay||(this._hitDetectionUnderlay=this.CreateUnderlay("#000000",
0,dvt.AdfDiagramLink._HIT_DETECTION_WIDTH_OFFSET),this.addChildAt(this._hitDetectionUnderlay,0));this.addAccessibilityAttributes();this._bDirty=!1}};dvt.AdfDiagramLink.prototype.GetAppliedLinkColor=function(){return this._bPromoted?this._promotedColor:this.getLinkColor()};dvt.AdfDiagramLink.prototype.GetAppliedLinkStyle=function(){return this._bPromoted?this._promotedStyle:this.getLinkStyle()};dvt.AdfDiagramLink.prototype.GetAppliedLinkWidth=function(){return this._bPromoted?this._promotedWidth:this.getLinkWidth()};
dvt.AdfDiagramLink.prototype.getStartConnectorOffset=function(){if(this.getStartConnector()){var a,b=this.getConnectorTemplate(dvt.DiagramLinkConnectorUtils.START_CONNECTOR);b||(a=this.getShape().getStroke().clone(),a.setType(dvt.Stroke.SOLID));return dvt.DiagramLinkConnectorUtils.GetConnectorOffset(this.getStartConnector(),this.getStartConnectorType(),b,a,this)}return 0};
dvt.AdfDiagramLink.prototype.getEndConnectorOffset=function(){if(this.getEndConnector()){var a,b=this.getConnectorTemplate(dvt.DiagramLinkConnectorUtils.END_CONNECTOR);b||(a=this.getShape().getStroke().clone(),a.setType(dvt.Stroke.SOLID));return dvt.DiagramLinkConnectorUtils.GetConnectorOffset(this.getEndConnector(),this.getEndConnectorType(),b,a,this)}return 0};
dvt.AdfDiagramLink.prototype.setSelected=function(a){dvt.AdfDiagramLink.superclass.setSelected.call(this,a);this._refreshSelectionEffect();this.UpdateAccessibilityAttributes();!this.GetDiagram().isReadOnly()&&this.isUpdateEnabled()&&(a?(this.hideConnectors(),this.showUpdateHandles()):(this.hideUpdateHandles(),this.showConnectors()))};
dvt.AdfDiagramLink.prototype._refreshSelectionEffect=function(){var a=this.isSelectable()&&this._hover;a||this._bFocusEffect||this._selected?this._showFeedback(a||this._bFocusEffect,this._selected):this._bHighlight&&this._hideFeedback()};
dvt.AdfDiagramLink.prototype.getCategories=function(){if(!this._categories){this._categories=[];var a=this.getData().getStartId(),b=this.getData().getEndId(),a=this.GetDiagram().getNodeById(a),c=this.GetDiagram().getNodeById(b),b=a.getCategories(),a=c.getCategories();if(b&&a)for(c=0;c<b.length;c++)0<=dvt.ArrayUtils.getIndex(a,b[c])&&this._categories.push(b[c])}return this._categories};dvt.AdfDiagramLink.prototype.getDisplayables=function(){return[this]};
dvt.AdfDiagramLink.prototype.InsertLinkIntoParent=function(a){a&&(this._bCrossContainerLink?a.addChild(this):a.addChildAt(this,0))};dvt.AdfDiagramLink.prototype.GetParentContainer=function(){var a=null,b=this.GetDiagram();b&&(a=this._linkParent,a||(a=b._linksPane));return a};
dvt.AdfDiagramLink.prototype.setVisible=function(a){this._bVisible!=a&&this.GetDiagram().setAutomationState(this.getData().getId(),"visible",this._bVisible);dvt.AdfDiagramLink.superclass.setVisible.call(this,a);var b=this.GetDiagram();if(b){var c=this.GetParentContainer(),d=c.contains(this);a&&!d?(this.InsertLinkIntoParent(c),this._cachedDiagram=null):!a&&d&&(c.removeChild(this),this._cachedDiagram=b)}};
dvt.AdfDiagramLink.prototype.CreateLabel=function(){var a=null,b=this.GetLabelTemplate();b?(a=this.GetDiagram().createAfContext(),a.setELContext(this.getData().getElAttributes()),a=dvt.AfComponentFactory.parseAndLayout(a,b,this)):this._label&&(a=new dvt.OutputText(this.getCtx(),this._label,0,0),this._linkLabelStyles&&a.setCSSStyle(this._linkLabelStyles));return a};dvt.AdfDiagramLink.prototype.getLabelBounds=function(){var a=null;this._labelObj&&(a=this._labelObj.getDimensions());return a};
dvt.AdfDiagramLink.prototype.getConnectorTemplate=function(a){var b=this.getLinkDef();return b?b.getConnectorTemplate(a):null};dvt.AdfDiagramLink.prototype.GetLabelTemplate=function(){var a=this.getLinkDef();return a?a.getLabelTemplate():null};dvt.AdfDiagramLink.prototype.HasLabel=function(){return this._label||this.GetLabelTemplate()};
dvt.AdfDiagramLink.prototype.getAfComponent=function(a){var b,c=dvt.AfComponentFactory.getAfComponent(this.getEndConnector());c&&c.getId()==a?b=c:(c=dvt.AfComponentFactory.getAfComponent(this.getStartConnector()))&&c.getId()==a?b=c:this.GetLabelTemplate()&&this._labelObj&&(c=dvt.AfComponentFactory.getAfComponent(this._labelObj))&&c.getId()==a&&(b=c);return b};dvt.AdfDiagramLink.prototype.setPromoted=function(a){this._bPromoted!=a&&(this._bDirty=!0);this._bPromoted=a};
dvt.AdfDiagramLink.prototype.setPromotionCount=function(a){this._promotionCount=a};dvt.AdfDiagramLink.prototype.getPromotionCount=function(){return this._promotionCount};
dvt.AdfDiagramLink.prototype.showUpdateHandles=function(){if(!this._startHandle){var a=new DvtAdfDiagramLinkEndpoint(this.getCtx(),this,DvtAdfDiagramLinkEndpoint.START_TYPE,this.getLinkStart(),this.getId(),this._diagram.getEditorStyles());this._startHandle=a;this.addChild(a)}this._endHandle||(this._endHandle=a=new DvtAdfDiagramLinkEndpoint(this.getCtx(),this,DvtAdfDiagramLinkEndpoint.END_TYPE,this.getLinkEnd(),this.getId(),this._diagram.getEditorStyles()),this.addChild(a));this.GetDiagram().moveToDiagramFront(this)};
dvt.AdfDiagramLink.prototype.hideUpdateHandles=function(){this._startHandle&&this.removeChild(this._startHandle);this._endHandle&&this.removeChild(this._endHandle);this._endHandle=this._startHandle=null;this.GetDiagram().moveToLinks(this)};
dvt.AdfDiagramLink.prototype.hideConnectors=function(){this.getStartConnector()&&(this.getShape().removeChild(this.getStartConnector()),this._linkUnderlay&&this._linkUnderlay.hideUnderlayStart());this.getEndConnector()&&(this.getShape().removeChild(this.getEndConnector()),this._linkUnderlay&&this._linkUnderlay.hideUnderlayEnd())};
dvt.AdfDiagramLink.prototype.showConnectors=function(){this.getStartConnector()&&(this.getShape().addChild(this.getStartConnector()),this._linkUnderlay&&this._linkUnderlay.showUnderlayStart());this.getEndConnector()&&(this.getShape().addChild(this.getEndConnector()),this._linkUnderlay&&this._linkUnderlay.showUnderlayEnd())};dvt.AdfDiagramLink.prototype.startLinkChange=function(a,b){this._initialPoints=this.getPoints();this._dragItems[a]=!0;this.setMouseEnabled(!1)};
dvt.AdfDiagramLink.prototype.updateLinkChange=function(a,b){var c,d;a==DvtAdfDiagramLinkEndpoint.START_TYPE?(c=b,d=this.getLinkEnd()):(c=this.getLinkStart(),d=b);this.setPoints([c.x,c.y,d.x,d.y]);this.renderLink()};dvt.AdfDiagramLink.prototype.endLinkChange=function(a){this._dragItems[a]=!1};dvt.AdfDiagramLink.prototype.endLinkChangeNewNode=function(a,b){this.endLinkChange(a);this.updateLinkChange(a,b);this.setMouseEnabled(!0)};
dvt.AdfDiagramLink.prototype.endLinkChangeRestore=function(a){this.endLinkChange(a);var b=!1;for(a in this._dragItems)this._dragItems[a]&&(b=!0);b||(this.restoreLinkPosition(),this._initialPoints=null);this.setMouseEnabled(!0)};dvt.AdfDiagramLink.prototype.restoreLinkPosition=function(){this.setPoints(this._initialPoints);this.renderLink()};
dvt.AdfDiagramLink.prototype.GetRelativeLabelBounds=function(a,b,c,d){var e=dvt.BaseDiagramLink.CalcLabelMatrix(a,b,c,d);a=e.transformPoint(new dvt.Point(b.x,b.y));c=e.transformPoint(new dvt.Point(b.x+b.w,b.y));d=e.transformPoint(new dvt.Point(b.x,b.y+b.h));b=e.transformPoint(new dvt.Point(b.x+b.w,b.y+b.h));var e=Math.min(Math.min(a.x,c.x),Math.min(d.x,b.x)),f=Math.min(Math.min(a.y,c.y),Math.min(d.y,b.y));return new dvt.Rectangle(e,f,Math.max(Math.max(a.x,c.x),Math.max(d.x,b.x))-e,Math.max(Math.max(a.y,
c.y),Math.max(d.y,b.y))-f)};dvt.AdfDiagramLink.prototype.SetMaxAlpha=function(a){this._maxAlpha=a};dvt.AdfDiagramLink.prototype.GetMaxAlpha=function(){return this._maxAlpha};
dvt.AdfDiagramLink.prototype.getNextNavigable=function(a){var b=[];if(a.type==dvt.MouseEvent.CLICK||a.keyCode==dvt.KeyboardEvent.SPACE&&a.ctrlKey)return this;if(a.keyCode==dvt.KeyboardEvent.UP_ARROW||a.keyCode==dvt.KeyboardEvent.DOWN_ARROW){this._updateKeyboardFocusEffect(null);(b=this.getKeyboardFocusNode())||(b=this._diagram.getNodeById(this._diagram.getLinkStartId(this)));var c=this,d=this._diagram.getNavigableLinksForNodeId(b.getData().getId()),e=this._diagram.getEventManager().getKeyboardHandler();
e&&e.getNextNavigableLink&&(c=e.getNextNavigableLink(b,this,a,d));c.setKeyboardFocusNode(b);return c}if(a.keyCode==dvt.KeyboardEvent.RIGHT_ARROW||a.keyCode==dvt.KeyboardEvent.LEFT_ARROW){if(b=this._findConnectorByDirection(a.keyCode))return this._updateKeyboardFocusEffect(b),this._preserveKeyboardFocusEffect=!0,this;this._updateKeyboardFocusEffect(null);a=this._movingToStart(a.keyCode)?this._diagram.getLinkStartId(this):this._diagram.getLinkEndId(this);return this._diagram.getNodeById(a)}b=this._diagram.getSortedVisibleNodesByGroupDepth()[0];
return dvt.KeyboardHandler.getNextAdjacentNavigable(this,a,b)};dvt.AdfDiagramLink.prototype.showKeyboardFocusEffect=function(){this.showHoverEffect();this._bFocusEffect=!0;this.setFocused(!0)};dvt.AdfDiagramLink.prototype.hideKeyboardFocusEffect=function(){this._bFocusEffect=!1;this._hover||this.hideHoverEffect();this.setFocused(!1)};dvt.AdfDiagramLink.prototype.setFocused=function(a){this._bFocused=a};dvt.AdfDiagramLink.prototype.isFocused=function(){return this._bFocused};
dvt.AdfDiagramLink.prototype.isShowingKeyboardFocusEffect=function(){return this._bFocusEffect};dvt.AdfDiagramLink.prototype.eventContextCallback=function(a){a&&(a[dvt.BaseComponentEvent.CLIENT_ROW_KEY]=this.getData().getId());this.GetDiagram().HideNodeTransientToolbar()};
dvt.AdfDiagramLink.prototype.getShowPopupBehaviors=function(){if(!this._showPopupBehaviors&&this._linkDef&&this._linkDef.getShowPopupBehaviors()){var a=this._linkDef.getShowPopupBehaviors(),b=this.GetDiagram().createAfContext();b.setELContext(this.getData().getElAttributes());this._showPopupBehaviors=[];for(var c=0;c<a.length;c++)this._showPopupBehaviors[c]=dvt.AfComponentFactory.parseAndStamp(b,a[c],null)}return this._showPopupBehaviors};
dvt.AdfDiagramLink.prototype.getAriaLabel=function(){return dvt.Displayable.generateAriaLabel(this.getShortDesc(),this.getAccessibilityStates())};
dvt.AdfDiagramLink.prototype.getAccessibilityStates=function(){var a=[];this.isSelectable()&&a.push(this.isSelected()?dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"STATE_SELECTED"):dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"STATE_UNSELECTED"));this.isPromoted()&&a.push(dvt.Bundle.getTranslatedString(dvt.Bundle.ADF_DIAGRAM_PREFIX,"PROMOTED_LINK_ARIA_DESC"));return a};
dvt.AdfDiagramLink.prototype.UpdateAccessibilityAttributes=function(){if(!dvt.Agent.deferAriaCreation()){var a=this.getAriaLabel();a&&this.setAriaProperty("label",a)}};dvt.AdfDiagramLink.prototype.addAccessibilityAttributes=function(){var a=this.getAriaLabel();a&&(this.setAriaRole("img"),this.setAriaProperty("label",a))};
dvt.AdfDiagramLink.prototype.CopyState=function(a){this._categories=dvt.ArrayUtils.copy(a._categories);this._selected=a._selected;this._hover=a._hover;this._bFocused=a._bFocused;this._bFocusEffect=a._bFocusEffect;this._bVisible=a._bVisible;this._arPoints=dvt.ArrayUtils.copy(a._arPoints);this._points=dvt.ArrayUtils.copy(a._points);this._pathCmds=dvt.ArrayUtils.copy(a._pathCmds)};dvt.AdfDiagramLink.prototype.destroy=function(){this.DestroyContent();dvt.AdfDiagramLink.superclass.destroy.call(this)};
dvt.AdfDiagramLink.prototype.CreateCustomAnimPlayable=function(){return new dvt.CustomAnimation(this.getCtx(),null,this.GetDiagram().getAnimationDuration())};
dvt.AdfDiagramLink.prototype.AnimateUpdate=function(a,b){var c=null,d=b.getVisible(),e=b.getPoints(),f=this.getVisible();d==f&&e?(e=b.getPoints(),d=this.getPoints(),dvt.ArrayUtils.equals(e,d)||(c||(c=this.CreateCustomAnimPlayable()),this.setPoints(e),e=dvt.Animator.TYPE_POLYLINE,0<d.length&&isNaN(d[0])&&(e=dvt.Animator.TYPE_PATH),c.getAnimator().addProp(e,this,this.getPoints,this.setPoints,d)),b._labelObj&&this._labelObj&&(e=b._labelObj.getMatrix(),d=this._labelObj.getMatrix(),e.equals(d)||(c||(c=
this.CreateCustomAnimPlayable()),this._labelObj.setMatrix(e),c.getAnimator().addProp(dvt.Animator.TYPE_MATRIX,this._labelObj,this._labelObj.getMatrix,this._labelObj.setMatrix,d))),b.getShape()&&this.getShape()&&(e=b.getShape().getStroke(),d=this.getShape().getStroke(),e&&d&&e instanceof dvt.SolidStroke&&d instanceof dvt.SolidStroke&&(e.getColor()!=d.getColor()||e.getWidth()!=d.getWidth())&&(c||(c=this.CreateCustomAnimPlayable()),this.getShape().setStroke(e),c.getAnimator().addProp(dvt.Animator.TYPE_STROKE,
this.getShape(),this.getShape().getStroke,this.getShape().setStroke,d))),c&&a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_UPDATE)):(c||(c=this.CreateCustomAnimPlayable()),d&&e?(e=this.GetParentContainer(),b.InsertLinkIntoParent(e),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,b,b.getAlpha,b.setAlpha,0),dvt.Playable.appendOnEnd(c,function(){b.getParent().removeChild(b);b.destroy()}),a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_DELETE)):f&&(this.setAlpha(0),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,
this,this.getAlpha,this.setAlpha,this.GetMaxAlpha()),a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_INSERT)))};dvt.AdfDiagramLink.prototype.AnimateInsert=function(a){var b=!0,c=this.getData().getGroupId();c&&(this.GetDiagram()._oldNodes[c]||(b=!1));b&&(b=new dvt.CustomAnimation(this.getCtx(),this.GetDiagram().getAnimationDuration()),c=b.getAnimator(),this.setAlpha(0),c.addProp(dvt.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,this._maxAlpha),a.add(b,DvtAdfDiagramDataAnimationHandler.PHASE_INSERT))};
dvt.AdfDiagramLink.prototype.AnimateDelete=function(a,b){var c=!0,d=this.getData().getGroupId();d?(d=b.getNodeById(d))&&d.GetChildNodePane()?this.InsertLinkIntoParent(d.GetChildNodePane()):c=!1:this.InsertLinkIntoParent(b._linksPane);if(c){c=new dvt.CustomAnimation(this.getCtx(),b.getAnimationDuration());c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,0);var e=this;dvt.Playable.appendOnEnd(c,function(){e.getParent().removeChild(e);e.destroy()});a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_DELETE)}};
dvt.AdfDiagramLink.prototype.setKeyboardFocusConnector=function(a){this._keyboardNavConnector=a};dvt.AdfDiagramLink.prototype.getKeyboardFocusConnector=function(){return this._keyboardNavConnector};dvt.AdfDiagramLink.prototype._updateKeyboardFocusEffect=function(a){var b=this.getKeyboardFocusConnector();b&&b.hideKeyboardFocusEffect&&b.hideKeyboardFocusEffect();a&&a.showKeyboardFocusEffect&&a.showKeyboardFocusEffect();this.setKeyboardFocusConnector(a)};
dvt.AdfDiagramLink.prototype._movingToStart=function(a){var b=this.getLinkStart(),c=this.getLinkEnd(),b=b.x<c.x?!0:!1;return a==dvt.KeyboardEvent.RIGHT_ARROW&&b||a==dvt.KeyboardEvent.LEFT_ARROW&&!b?!1:!0};dvt.AdfDiagramLink.prototype._findConnectorByDirection=function(a){var b=null,b=this._movingToStart(a)?this.getStartConnector():this.getEndConnector();a=this.findFocusableObject(b);this.getKeyboardFocusConnector()==a&&(a=null);return a};
dvt.AdfDiagramLink.prototype.HandleKeyboardEvent=function(a){if(a.keyCode==dvt.KeyboardEvent.ENTER){var b=this.GetDiagram().getEventManager(),c=this.getShape(),d=c.localToStage(this.CalPointForMouseEvent());a=dvt.DomEventFactory.generateMouseEventFromKeyboardEvent(a,this.getCtx(),dvt.MouseEvent.CLICK,this.getCtx().getStage(),d.x,d.y);a.target=c;b.PreOnClick(a)}};
dvt.AdfDiagramLink.prototype.CalPointForMouseEvent=function(){var a=this._points,b=0,c=0;4<a.length?(c=a.length/2,0==c%2?(b=a[c],c=a[c+1]):(b=a[c-1],c=a[c])):4==a.length&&(b=(a[0]+a[2])/2,c=(a[1]+a[3])/2);return new dvt.Point(b,c)};dvt.AdfDiagramLink.prototype.IsStandardConnector=function(a){return(0==a?this.getStartConnectorType():this.getEndConnectorType())?!0:!1};
dvt.AdfDiagramLink.prototype.findFocusableObject=function(a){for(var b=0;b<this._tabStopsConnectorArray.length;b++){var c=this._tabStopsConnectorArray[b];if(c instanceof dvt.AfComponent&&c.getDisplayObj()==a)return c}return null};dvt.AdfDiagramLink.prototype.getTabStopsArray=function(){this._tabStopsConnectorArray||(this._tabStopsConnectorArray=[]);return this._tabStopsConnectorArray};dvt.AdfDiagramLink.prototype.getCurrentTabStop=function(){return this.getKeyboardFocusConnector()};
dvt.AdfDiagramLink.prototype.resetTabStops=function(){this.setKeyboardFocusConnector(null)};dvt.AdfDiagramLink.prototype._refreshCursor=function(){var a=dvt.SelectionEffectUtils.getSelectingCursor();if(this.isSelectable())this.setCursor(a);else{var b=this.getShowPopupBehaviors();if(dvt.ArrayUtils.isArray(b))for(var c=0;c<b.length;c++)if(b[c]&&"click"==b[c].getTriggerType()){this.setCursor(a);return}this.setCursor(null)}};
dvt.AdfDiagramLink.prototype.getAutomationState=function(a){var b=this.GetDiagram().getAutomationState(this.getData().getId(),a);return null==b&&"visible"==a?this.getVisible():b};dvt.AdfDiagramLink.prototype.getGroupId=function(){return this.getData().getGroupId()};
dvt.AdfDiagramLinkDef=function(){this.Init()};dvt.Obj.createSubclass(dvt.AdfDiagramLinkDef,dvt.Obj,"dvt.AdfDiagramLinkDef");dvt.AdfDiagramLinkDef.LINK_TYPE="__linkType__";dvt.AdfDiagramLinkDef.LINK_TYPE_DIRECT="direct";dvt.AdfDiagramLinkDef.LINK_TYPE_DIRECT_ROUNDED="directRounded";dvt.AdfDiagramLinkDef.LINK_TYPE_DIRECT_SMOOTH="directSmooth";dvt.AdfDiagramLinkDef.LINK_TYPE_ORTHOGONAL="orthogonal";dvt.AdfDiagramLinkDef.LINK_TYPE_ORTHOGONAL_ROUNDED="orthogonalRounded";
dvt.AdfDiagramLinkDef.LINK_TYPE_ORTHOGONAL_SMOOTH="orthogonalSmooth";dvt.AdfDiagramLinkDef.LINK_TYPE_CURVED="curved";dvt.AdfDiagramLinkDef.LINK_STYLE_SOLID="solid";dvt.AdfDiagramLinkDef.LINK_STYLE_DASH="dash";dvt.AdfDiagramLinkDef.LINK_STYLE_DOT="dot";dvt.AdfDiagramLinkDef.LINK_STYLE_DASH_DOT="dashDot";dvt.AdfDiagramLinkDef.prototype.Init=function(){this._propMap=this._id=null;this._connectorTemplates;this._labelTemplate;this._showPopupBehaviors=null};
dvt.AdfDiagramLinkDef.prototype.setId=function(a){this._id=a};dvt.AdfDiagramLinkDef.prototype.getId=function(){return this._id};dvt.AdfDiagramLinkDef.prototype.setLinkWidth=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_LINK_WIDTH,a)};dvt.AdfDiagramLinkDef.prototype.getLinkWidth=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_LINK_WIDTH):null};
dvt.AdfDiagramLinkDef.prototype.setLinkLength=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_LINK_LENGTH,a)};dvt.AdfDiagramLinkDef.prototype.getLinkLength=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_LINK_LENGTH):null};dvt.AdfDiagramLinkDef.prototype.setLinkColor=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_LINK_COLOR,a)};
dvt.AdfDiagramLinkDef.prototype.getLinkColor=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_LINK_COLOR):null};dvt.AdfDiagramLinkDef.prototype.setLinkType=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_LINK_TYPE,a)};dvt.AdfDiagramLinkDef.prototype.getLinkType=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_LINK_TYPE):null};
dvt.AdfDiagramLinkDef.prototype.setLinkStyle=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_LINK_STYLE,a)};dvt.AdfDiagramLinkDef.prototype.getLinkStyle=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_LINK_STYLE):null};dvt.AdfDiagramLinkDef.prototype.setLabel=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_LABEL,a)};
dvt.AdfDiagramLinkDef.prototype.getLabel=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_LABEL):null};dvt.AdfDiagramLinkDef.prototype.setLabelTemplate=function(a){this._labelTemplate=a};dvt.AdfDiagramLinkDef.prototype.getLabelTemplate=function(){return this._labelTemplate};dvt.AdfDiagramLinkDef.prototype.setRendered=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_AF_RENDERED,a)};
dvt.AdfDiagramLinkDef.prototype.getRendered=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_AF_RENDERED):!0};dvt.AdfDiagramLinkDef.prototype.setReadOnly=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY,a)};dvt.AdfDiagramLinkDef.prototype.getReadOnly=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY):!1};
dvt.AdfDiagramLinkDef.prototype.setSelectable=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_SELECTABLE,a)};dvt.AdfDiagramLinkDef.prototype.getSelectable=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_SELECTABLE):!0};dvt.AdfDiagramLinkDef.prototype.setShortDesc=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC,a)};
dvt.AdfDiagramLinkDef.prototype.getShortDesc=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC):null};dvt.AdfDiagramLinkDef.prototype.setEndConnectorType=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_END_CONNECTOR_TYPE,a)};dvt.AdfDiagramLinkDef.prototype.getEndConnectorType=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_END_CONNECTOR_TYPE):null};
dvt.AdfDiagramLinkDef.prototype.setStartConnectorType=function(a){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(dvt.AdfDiagramParser._ATTR_START_CONNECTOR_TYPE,a)};dvt.AdfDiagramLinkDef.prototype.getStartConnectorType=function(){return this._propMap?this._propMap.getProperty(dvt.AdfDiagramParser._ATTR_START_CONNECTOR_TYPE):null};
dvt.AdfDiagramLinkDef.prototype.setConnectorTemplate=function(a,b){this._connectorTemplates||(this._connectorTemplates={});this._connectorTemplates[b]=a};dvt.AdfDiagramLinkDef.prototype.getConnectorTemplate=function(a){return a&&this._connectorTemplates?this._connectorTemplates[a]:null};dvt.AdfDiagramLinkDef.prototype.addShowPopupBehavior=function(a){this._showPopupBehaviors||(this._showPopupBehaviors=[]);this._showPopupBehaviors.push(a)};dvt.AdfDiagramLinkDef.prototype.getShowPopupBehaviors=function(){return this._showPopupBehaviors};
dvt.AdfDiagramLinkDef.prototype.stamp=function(a,b){if(this._propMap){var c=this._propMap.stamp(a);b.setLinkColor(c.getProperty(dvt.AdfDiagramParser._ATTR_LINK_COLOR));b.setLinkWidth(c.getIntegerProp(dvt.AdfDiagramParser._ATTR_LINK_WIDTH));b.setLinkLength(c.getIntegerProp(dvt.AdfDiagramParser._ATTR_LINK_LENGTH));b.setLinkType(c.getProperty(dvt.AdfDiagramParser._ATTR_LINK_TYPE));b.setLinkStyle(c.getProperty(dvt.AdfDiagramParser._ATTR_LINK_STYLE));b.setShortDesc(c.getProperty(dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC));
b.setEndConnectorType(c.getProperty(dvt.AdfDiagramParser._ATTR_END_CONNECTOR_TYPE));b.setStartConnectorType(c.getProperty(dvt.AdfDiagramParser._ATTR_START_CONNECTOR_TYPE));b.setLabel(c.getProperty(dvt.AdfDiagramParser._ATTR_LABEL));b.setRendered(c.getBooleanProp(dvt.AdfDiagramParser._ATTR_AF_RENDERED));var d=c.getBooleanProp(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY,!1);b.setUpdateEnabled(!d);b.setDeleteEnabled(!d);b.setSelectable(c.getBooleanProp(dvt.AdfDiagramParser._ATTR_SELECTABLE,!0))}};
dvt.AdfDiagramNodeData=function(){this.Init()};dvt.Obj.createSubclass(dvt.AdfDiagramNodeData,dvt.Obj,"dvt.AdfDiagramNodeData");dvt.AdfDiagramNodeData.prototype.Init=function(){this._templateId=this._id=null;this._elAttributes=[];this._attrGrps=this._groupId=null;this._hasAnchorListener=!1;this._layoutAttributes=null;this._showNodeActions=this._showStack=this._showDrill=this._showExpandChildren=this._showIsolate=!0;this._rowIndex=-1;this._childrenFetched=this._container=this._structureOnly=!1};
dvt.AdfDiagramNodeData.prototype.mergeProps=function(a){dvt.AdfDiagramNodeData.superclass.mergeProps.call(this,a);a._id=this._id;a._templateId=this._templateId;a._elAttributes=this._elAttributes;a._groupId=this._groupId;a._attrGrps=this._attrGrps;a._hasAnchorListener=this._hasAnchorListener;a._layoutAttributes=this._layoutAttributes;a._showIsolate=this._showIsolate;a._showExpandChildren=this._showExpandChildren;a._showDrill=this._showDrill;a._showStack=this._showStack;a._showNodeActions=this._showNodeActions;
a._rowIndex=this._rowIndex;a._structureOnly=this._structureOnly;a._container=this._container;a._childrenFetched=this._childrenFetched};dvt.AdfDiagramNodeData.prototype.clone=function(){var a=new dvt.AdfDiagramNodeData;this.mergeProps(a);return a};dvt.AdfDiagramNodeData.prototype.setId=function(a){this._id=a};dvt.AdfDiagramNodeData.prototype.getId=function(){return this._id};dvt.AdfDiagramNodeData.prototype.setTemplateId=function(a){this._templateId=a};
dvt.AdfDiagramNodeData.prototype.getTemplateId=function(){return this._templateId};dvt.AdfDiagramNodeData.prototype.setElAttributes=function(a){this._elAttributes=a};dvt.AdfDiagramNodeData.prototype.getElAttributes=function(){return this._elAttributes};dvt.AdfDiagramNodeData.prototype.addElAttributes=function(a){for(var b,c=0;c<a.length;c++)b=a[c],this._elAttributes[b.name]=b.value};dvt.AdfDiagramNodeData.prototype.addElAttributesJson=function(a){for(var b in a)this._elAttributes[b]=a[b]};
dvt.AdfDiagramNodeData.prototype.setGroupId=function(a){this._groupId=a};dvt.AdfDiagramNodeData.prototype.getGroupId=function(){return this._groupId};dvt.AdfDiagramNodeData.prototype.setAttributeGroups=function(a){this._attrGrps=a};dvt.AdfDiagramNodeData.prototype.getAttributeGroups=function(){return this._attrGrps};dvt.AdfDiagramNodeData.prototype.setHasAnchorListener=function(a){this._hasAnchorListener=a};dvt.AdfDiagramNodeData.prototype.getHasAnchorListener=function(){return this._hasAnchorListener};
dvt.AdfDiagramNodeData.prototype.setLayoutAttributes=function(a){this._layoutAttributes=a};dvt.AdfDiagramNodeData.prototype.getLayoutAttributes=function(){return this._layoutAttributes};dvt.AdfDiagramNodeData.prototype.setShowIsolate=function(a){this._showIsolate=a};dvt.AdfDiagramNodeData.prototype.isShowIsolate=function(){return this._showIsolate};dvt.AdfDiagramNodeData.prototype.setShowExpandChildren=function(a){this._showExpandChildren=a};dvt.AdfDiagramNodeData.prototype.isShowExpandChildren=function(){return this._showExpandChildren};
dvt.AdfDiagramNodeData.prototype.setShowDrill=function(a){this._showDrill=a};dvt.AdfDiagramNodeData.prototype.isShowDrill=function(){return this._showDrill};dvt.AdfDiagramNodeData.prototype.setShowStack=function(a){this._showStack=a};dvt.AdfDiagramNodeData.prototype.isShowStack=function(){return this._showStack};dvt.AdfDiagramNodeData.prototype.setShowNodeActions=function(a){this._showNodeActions=a};dvt.AdfDiagramNodeData.prototype.isShowNodeActions=function(){return this._showNodeActions};
dvt.AdfDiagramNodeData.prototype.setRowIndex=function(a){this._rowIndex=a};dvt.AdfDiagramNodeData.prototype.getRowIndex=function(){return this._rowIndex};dvt.AdfDiagramNodeData.prototype.setStructureOnly=function(a){this._structureOnly=a};dvt.AdfDiagramNodeData.prototype.isStructureOnly=function(){return this._structureOnly};dvt.AdfDiagramNodeData.prototype.setContainer=function(a){this._container=a};dvt.AdfDiagramNodeData.prototype.isContainer=function(){return this._container};
dvt.AdfDiagramNodeData.prototype.setChildrenFetched=function(a){this._childrenFetched=a};dvt.AdfDiagramNodeData.prototype.isChildrenFetched=function(){return this._childrenFetched};
dvt.AdfDiagramNode=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(dvt.AdfDiagramNode,dvt.BaseDiagramNode,"dvt.AdfDiagramNode");dvt.AdfDiagramNode._CONTAINER_PADDING=10;dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW=4;dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_ALPHA=.95;dvt.AdfDiagramNode._STACK_UNDERLAY_OFFSET=3;dvt.AdfDiagramNode._STACK_UNDERLAY_PADDING=10;dvt.AdfDiagramNode._STACK_BADGE_OFFSET=4;dvt.AdfDiagramNode._TOOLBAR_SHADOW_STYLE="2 2 3 0 rgba(0, 0, 0, 0.5)";
dvt.AdfDiagramNode._STACK_PREVIEW_COLOR="#ffffff";dvt.AdfDiagramNode._STACK_PREVIEW_ALPHA=.9;dvt.AdfDiagramNode._SELECTION_FILL_MODE=!1;dvt.AdfDiagramNode._CONTAINER_BADGE_MIN_ZOOM=0;dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_X=0;dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_Y=1;dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W=2;dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H=3;dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_RX=4;dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_RY=5;
dvt.AdfDiagramNode._CHANGE_Z_ORDER_ON_HIGHLIGHT=!0;dvt.AdfDiagramNode.SELECTED_COLOR="nodeSelectColor";dvt.AdfDiagramNode.HOVER_INNER_COLOR="nodeHoverInnerColor";dvt.AdfDiagramNode.HOVER_OUTER_COLOR="nodeHoverOuterColor";dvt.AdfDiagramNode.CONTAINER_STYLE="nodeContainerStyle";dvt.AdfDiagramNode.OVERVIEW_STYLE="nodeOverviewStyle";dvt.AdfDiagramNode.OVERVIEW_CONTAINER_STYLE="nodeOverviewContainerStyle";dvt.AdfDiagramNode.LABEL_STYLE="nodeLabelStyle";dvt.AdfDiagramNode.CSS_STYLE="nodeCSSStyle";
dvt.AdfDiagramNode.prototype.Init=function(a,b,c){dvt.AdfDiagramNode.superclass.Init.call(this,a,b.getId(),c);this._contentPane;this._data=b;this._diagram=c;this._nodeDef;this._childNodeIds;this._childLinkIds;this._crossChildLinkIds;this._shortDesc;this._bStack=!1;this._stackCount=0;this._stackBadge;this._stackUnderlay;this._stackBadgeHandler;this._bPartialExpand=!1;this._partialExpandIndicator;this._nodeWidth;this._nodeHeight;this._zoom=-1;this._bIgnoreNextRender=!1;this._layoutBounds;this._overlays;
this._label;this._labelDims;this._backgroundObj;this._backgroundMouseEventCatcher;this._nodeUnderlay;this._bForceZoom100Facet=this._hover=!1;this._bFlyOutEnabled=!0;this._flyOuts;this._flyOutsPos;this._flyOutAnim;this._flyInAnim;this._bDisclosureChanged=this._bDisclosed=this._bFlyInAnimCanceled=!1;this._childNodePane;this._childNodePaneDims;this._containerChrome;this._containerTopObj;this._containerTopBounds;this._containerTopAvailBounds;this._containerBottomObj;this._containerBottomBounds;this._containerBottomAvailBounds;
this._containerLeftObj;this._containerLeftBounds;this._containerLeftAvailBounds;this._containerRightObj;this._containerRightBounds;this._containerRightAvailBounds;this._containerPadding={left:dvt.AdfDiagramNode._CONTAINER_PADDING,right:dvt.AdfDiagramNode._CONTAINER_PADDING,top:dvt.AdfDiagramNode._CONTAINER_PADDING,bottom:dvt.AdfDiagramNode._CONTAINER_PADDING};this._containerUnderlay;this._layout;this._nodeParent;this._visibleChildNodeCount=0;this._containerBadge;this._containerBadgeHandler;this._nodeWidth100;
this._nodeHeight100;this._oldNodeWidth;this._oldNodeHeight;this._bHiddenAncestorChanged=this._bHiddenAncestor=!1;this._oldLabelBounds;this._oldLabelPos;this._oldLabelRotAngle;this._oldLabelRotPoint;this._bFocusEffect=this._bFocused=this._bHoverEffect=this._deleteEnabled=!1;this._focusUnderlay;this._shadow;this._bPreventHoverEffect=!1;this._maxAlpha=1;this._afRootPlaceholder;this._showPopupBehaviors;this._clientBehaviors;this._draggable=!0;this._stateProps={};this.GetDiagram().getEventManager().associate(this,
this);this._bFirefox=dvt.Agent.isPlatformGecko();a=this._diagram.getNodeStyles();this._selectColor=a[dvt.AdfDiagramNode.SELECTED_COLOR];this._hoverInnerColor=a[dvt.AdfDiagramNode.HOVER_INNER_COLOR];this._hoverOuterColor=a[dvt.AdfDiagramNode.HOVER_OUTER_COLOR];if(b=a[dvt.AdfDiagramNode.CONTAINER_STYLE])this._defaultContainerBgColor=b.getStyle(dvt.CSSStyle.BACKGROUND_COLOR),this._defaultContainerBorderColor=b.getStyle(dvt.CSSStyle.BORDER_COLOR),this._defaultContainerBorderRx=dvt.CSSStyle.toNumber(b.getStyle(dvt.CSSStyle.BORDER_RADIUS));
this._nodeLabelStyles=a[dvt.AdfDiagramNode.LABEL_STYLE];this._containerStyle;this._overviewStyle;this._overviewContainerStyle;this._partialExpandIndicatorContainer;this._tabStopsNodeArray;this._curTabStopIdx=-1;this._linkHandle;this._width;this._height};dvt.AdfDiagramNode.prototype.GetDiagram=function(){if(this._diagram)return this._diagram;if(this._cachedDiagram)return this._cachedDiagram;for(var a=this.getParent();a;){if(a instanceof dvt.AdfDiagram)return a;a=a.getParent()}};
dvt.AdfDiagramNode.prototype.IsTransientToolbarOnClick=function(){return!0};dvt.AdfDiagramNode.prototype.showHoverEffect=function(){this.isHiddenAncestor()||this._bPreventHoverEffect||(this._bHoverEffect=!0,this._bHighlight&&this._hideFeedback(),this._showFeedback(!0,this._selected),dvt.Agent.isTouchDevice()||this.showLinkHandle())};
dvt.AdfDiagramNode.prototype.hideHoverEffect=function(){this.isHiddenAncestor()||(this._bHoverEffect=!1,this._bHighlight&&this._hideFeedback(),(this._bFocusEffect||this._selected)&&this._showFeedback(this._bFocusEffect,this._selected),dvt.Agent.isTouchDevice()||this.hideLinkHandle())};
dvt.AdfDiagramNode.prototype.showRollOverEffect=function(a){this.isHiddenAncestor()||(this.GetDiagram().ShowNodeHoverEffect(this,a instanceof dvt.KeyboardEvent),!this.IsTransientToolbarOnClick()&&this.isFlyOutEnabled()&&(this.CancelFlyInAnim(),this.ShowFlyOuts()))};dvt.AdfDiagramNode.prototype.hideRollOverEffect=function(a){this.GetDiagram().HideNodeHoverEffect(this);this.IsTransientToolbarOnClick()||this.HideFlyOuts(a instanceof dvt.KeyboardEvent)};
dvt.AdfDiagramNode.prototype.showHoverDetails=function(a){this.isHiddenAncestor()||this.GetDiagram().ShowNodeHoverDetails(this,a)};dvt.AdfDiagramNode.prototype.hideHoverDetails=function(){this.GetDiagram().HideNodeHoverDetails()};dvt.AdfDiagramNode.prototype.HandleClick=function(a){this.isHiddenAncestor()||this.GetDiagram().HandleNodeClick(this,a)};dvt.AdfDiagramNode.prototype.HandleDblClick=function(a){this.isHiddenAncestor()||this.GetDiagram().HandleNodeDblClick(this)};
dvt.AdfDiagramNode.prototype.GetFirstShape=function(a){return this.isDisclosed()?this._getFirstShape(this._containerChrome):this._getFirstShape(this._afRoot)};dvt.AdfDiagramNode.prototype._getFirstShape=function(a){for(a=[a];0<a.length;){var b=a.splice(0,1)[0];if(b instanceof dvt.Shape)return b;if(b instanceof dvt.Container)for(var c=b.getNumChildren(),d=0;d<c;d++){var e=b.getChildAt(d);a.push(e)}}return null};
dvt.AdfDiagramNode.prototype._showFeedback=function(a,b){var c=this._bHighlight;this._bHighlight=!0;if(dvt.AdfDiagramNode._CHANGE_Z_ORDER_ON_HIGHLIGHT&&!this._diagram.isDragged()&&this.ReorderNodes()){var d=this.GetParentContainer();d&&d.contains(this)&&this.InsertNodeIntoParent(d)}c||this.ShowHighlight(a,b)};dvt.AdfDiagramNode.prototype.ReorderNodes=function(){return this.isSelectable()};
dvt.AdfDiagramNode.prototype._hideFeedback=function(){this._bHighlight=!1;if(dvt.AdfDiagramNode._CHANGE_Z_ORDER_ON_HIGHLIGHT&&!this._diagram.isDragged()&&this.ReorderNodes()){var a=this.GetParentContainer();a&&a.contains(this)&&this.InsertNodeIntoParent(a)}this.HideHighlight()};dvt.AdfDiagramNode.prototype.ShowHighlight=function(a,b){var c=this.GetHighlightShape(!0);a!=c.isHoverEffectShown()&&(a?c.showHoverEffect():c.hideHoverEffect());c.setSelected(b)};
dvt.AdfDiagramNode.prototype.HideHighlight=function(){var a=this.GetHighlightShape(!1);a&&(a.hideHoverEffect(),a.setSelected(!1));this._nodeUnderlay&&(this._nodeUnderlay.getParent().removeChild(this._nodeUnderlay),this._nodeUnderlay.destroy&&this._nodeUnderlay.destroy(),this._nodeUnderlay=null)};
dvt.AdfDiagramNode.prototype.GetHighlightShape=function(a){!this._nodeUnderlay&&a&&(this._nodeUnderlay=this.CreateUnderlay(),this.UpdateHighlightStrokes(),this._stackUnderlay?this._stackUnderlay.addChildAt(this._nodeUnderlay,2):this._getContentContainer().addChildAt(this._nodeUnderlay,0));return this._nodeUnderlay};
dvt.AdfDiagramNode.prototype.CreateUnderlay=function(){var a=this.getContentBounds(),a=new dvt.Rect(this.getCtx(),a.x,a.y,a.w,a.h);a.setRx(1);a.setRy(1);a.setSolidFill(this._hoverInnerColor);a.setMouseEnabled(!1);this.GrowUnderlayForStack(a);return a};
dvt.AdfDiagramNode.prototype.GrowUnderlayForStack=function(a){this.isStack()&&(a.setX(a.getX()-dvt.AdfDiagramNode._STACK_UNDERLAY_PADDING),a.setY(a.getY()-dvt.AdfDiagramNode._STACK_UNDERLAY_PADDING),a.setWidth(a.getWidth()+2*dvt.AdfDiagramNode._STACK_UNDERLAY_PADDING),a.setHeight(a.getHeight()+2*dvt.AdfDiagramNode._STACK_UNDERLAY_PADDING))};
dvt.AdfDiagramNode.prototype.UpdateHighlightStrokes=function(){if(this._nodeUnderlay){var a=this._diagram.supportsVectorEffects()?1:1/this._diagram.getPanZoomCanvas().getZoom(),b=4*a,c=2*a,d=2*a,e=2*a,f=4*a,g=2*a,a=new dvt.SolidStroke(this._hoverInnerColor,1,b);a.setFixedWidth(!0);b=new dvt.SolidStroke(this._hoverOuterColor,1,b+2*c);b.setFixedWidth(!0);c=new dvt.SolidStroke(this._hoverInnerColor,1,d);c.setFixedWidth(!0);d=new dvt.SolidStroke(this._selectColor,1,d+2*e);d.setFixedWidth(!0);e=new dvt.SolidStroke(this._hoverInnerColor,
1,f);e.setFixedWidth(!0);f=new dvt.SolidStroke(this._selectColor,1,f+2*g);f.setFixedWidth(!0);this._nodeUnderlay.setSelectedStroke(c,d).setHoverStroke(a,b).setSelectedHoverStroke(e,f)}};dvt.AdfDiagramNode.prototype.getDatatip=function(){return this.isHiddenAncestor()||this._diagram.GetTransientToolbarDataId()==this.getData().getId()?null:this.getShortDesc()};dvt.AdfDiagramNode.prototype.setShortDesc=function(a){this._shortDesc=a};dvt.AdfDiagramNode.prototype.getShortDesc=function(){return this._shortDesc};
dvt.AdfDiagramNode.prototype.getLayoutAttributes=function(a){var b=this.getData().getLayoutAttributes();return b&&a?b[a]:{}};dvt.AdfDiagramNode.prototype.getData=function(){return this._data};dvt.AdfDiagramNode.prototype.setNodeDef=function(a){if(this._nodeDef=a)a.stamp(this.getData().getElAttributes(),this),this._refreshCursor()};dvt.AdfDiagramNode.prototype.getNodeDef=function(){return this._nodeDef};dvt.AdfDiagramNode.prototype.setLayout=function(a){this._layout=a};
dvt.AdfDiagramNode.prototype.getLayout=function(){return this._layout};
dvt.AdfDiagramNode.prototype.renderNode=function(a,b){if(this._bIgnoreNextRender)this._diagram.supportsVectorEffects()||this.RefreshSelectionEffect(),this._bIgnoreNextRender=!1;else{var c=this.getWidth(),d=this.getHeight(),e=this.isDisclosed();if(e){var f=this.CalcChildNodePaneBounds(b);this._childNodePaneDims=f;var c=f.w,d=f.h,g=this.getContainerPadding();g&&(c="auto"===g.left||"auto"===g.right?Number.MAX_VALUE:c+(g.left+g.right),d="auto"===g.top||"auto"===g.bottom?Number.MAX_VALUE:d+(g.top+g.bottom))}else{this._nodeWidth100&&
(this._nodeWidth=this._nodeWidth100);this._nodeHeight100&&(this._nodeHeight=this._nodeHeight100);this._nodeWidth&&(c=this._nodeWidth);this._nodeHeight&&(d=this._nodeHeight);var h=!1,k=!1;c?c*=this._zoom:(h=!0,c=Number.MAX_VALUE);d?d*=this._zoom:(k=!0,d=Number.MAX_VALUE)}a.setAvailableWidth(c);a.setAvailableHeight(d);!e&&this._afRoot&&dvt.AfComponentFactory.layoutAndRender(a,this._afRoot);var f=c,l=d;this._containerRightBounds=this._containerLeftBounds=this._containerBottomBounds=this._containerTopBounds=
null;if(e)c=-this._childNodePaneDims.x,d=-this._childNodePaneDims.y,k=dvt.AdfDiagramNode._CONTAINER_PADDING,this._nodeHeight=h=this._childNodePaneDims.h+("auto"===g.top?k:g.top)+("auto"===g.bottom?k:g.bottom),this._containerLeftObj&&(a.setAvailableWidth(Number.MAX_VALUE),a.setAvailableHeight("auto"===g.top||"auto"===g.bottom?Number.MAX_VALUE:this._nodeHeight),dvt.AfComponentFactory.layoutAndRender(a,this._containerLeftObj),e=dvt.AfComponentFactory.getBounds(this._containerLeftObj),e.h<this._nodeHeight&&
(a.setAvailableHeight(this._nodeHeight),dvt.AfComponentFactory.layoutAndRender(a,this._containerLeftObj),e=dvt.AfComponentFactory.getBounds(this._containerLeftObj)),this._containerLeftBounds=e,this._nodeHeight=Math.max(e.h,this._nodeHeight),c+=e.w,this._containerLeftAvailBounds={w:Number.MAX_VALUE,h:this._nodeHeight}),this._containerRightObj&&(a.setAvailableWidth(Number.MAX_VALUE),a.setAvailableHeight("auto"===g.top||"auto"===g.bottom?Number.MAX_VALUE:this._nodeHeight),dvt.AfComponentFactory.layoutAndRender(a,
this._containerRightObj),e=dvt.AfComponentFactory.getBounds(this._containerRightObj),e.h<this._nodeHeight&&(a.setAvailableHeight(this._nodeHeight),dvt.AfComponentFactory.layoutAndRender(a,this._containerRightObj),e=dvt.AfComponentFactory.getBounds(this._containerRightObj)),this._containerRightBounds=e,this._nodeHeight=Math.max(e.h,this._nodeHeight),this._containerRightAvailBounds={w:Number.MAX_VALUE,h:this._nodeHeight}),this._containerLeftBounds&&this._containerLeftBounds.h<this._nodeHeight&&this._containerLeftBounds.h>
h&&(a.setAvailableHeight(this._nodeHeight),dvt.AfComponentFactory.layoutAndRender(a,this._containerLeftObj),this._containerLeftBounds=dvt.AfComponentFactory.getBounds(this._containerLeftObj)),h=(this._containerLeftBounds?this._containerLeftBounds.w:0)+(this._containerRightBounds?this._containerRightBounds.w:0),this._nodeWidth=k=this._childNodePaneDims.w+("auto"===g.left?k:g.left)+("auto"===g.right?k:g.right)+h,this._containerTopObj&&(a.setAvailableWidth("auto"===g.left||"auto"===g.right?Number.MAX_VALUE:
this._nodeWidth),a.setAvailableHeight(Number.MAX_VALUE),dvt.AfComponentFactory.layoutAndRender(a,this._containerTopObj),e=dvt.AfComponentFactory.getBounds(this._containerTopObj),e.w<this._nodeWidth&&(a.setAvailableWidth(this._nodeWidth),dvt.AfComponentFactory.layoutAndRender(a,this._containerTopObj),e=dvt.AfComponentFactory.getBounds(this._containerTopObj)),this._containerTopBounds=e,this._nodeWidth=Math.max(e.w,this._nodeWidth),this._nodeHeight+=e.h,d+=e.h,this._containerLeftObj&&this._containerLeftObj.setTranslateY(e.h),
this._containerRightObj&&this._containerRightObj.setTranslateY(e.h),this._containerTopAvailBounds={w:this._nodeWidth,h:Number.MAX_VALUE}),this._containerBottomObj&&(a.setAvailableWidth("auto"===g.left||"auto"===g.right?Number.MAX_VALUE:this._nodeWidth),a.setAvailableHeight(Number.MAX_VALUE),dvt.AfComponentFactory.layoutAndRender(a,this._containerBottomObj),e=dvt.AfComponentFactory.getBounds(this._containerBottomObj),e.w<this._nodeWidth&&(a.setAvailableWidth(this._nodeWidth),dvt.AfComponentFactory.layoutAndRender(a,
this._containerBottomObj),e=dvt.AfComponentFactory.getBounds(this._containerBottomObj)),this._containerBottomBounds=e,this._containerBottomObj.setTranslateY(this._nodeHeight),this._nodeWidth=Math.max(e.w,this._nodeWidth),this._nodeHeight+=e.h,this._containerBottomAvailBounds={w:this._nodeWidth,h:Number.MAX_VALUE}),this._containerTopBounds&&this._containerTopBounds.w<this._nodeWidth&&this._containerTopBounds.w>k&&(a.setAvailableWidth(this._nodeWidth),dvt.AfComponentFactory.layoutAndRender(a,this._containerTopObj),
k=dvt.AfComponentFactory.getBounds(this._containerTopObj),k.h!==this._containerTopBounds.h&&(d+=k.h-this._containerTopBounds.h),this._containerTopBounds=k),this._containerRightObj&&this._containerRightObj.setTranslateX(this._nodeWidth-this._containerRightBounds.w),k=(this._containerTopBounds?this._containerTopBounds.h:0)+(this._containerBottomBounds?this._containerBottomBounds.h:0),g&&("auto"===g.top&&"auto"===g.bottom?g.top=g.bottom=(this._nodeHeight-this._childNodePaneDims.h-k)/2:"auto"===g.top?
g.top=this._nodeHeight-this._childNodePaneDims.h-g.bottom-k:"auto"===g.bottom&&(g.bottom=this._nodeHeight-this._childNodePaneDims.h-g.top-k),"auto"===g.left&&"auto"===g.right?g.left=g.right=(this._nodeWidth-this._childNodePaneDims.w-h)/2:"auto"===g.left?g.left=this._nodeWidth-this._childNodePaneDims.w-g.right-h:"auto"===g.right&&(g.right=this._nodeWidth-this._childNodePaneDims.w-g.left-h),c+=g.left,d+=g.top),c!=this._childNodePane.getTranslateX()&&this._childNodePane.setTranslateX(c),d!=this._childNodePane.getTranslateY()&&
this._childNodePane.setTranslateY(d),this.RenderContainerChrome();else{if(h||k)f=dvt.AfComponentFactory.getBounds(this._afRoot,this._afRoot.getParent()),h&&(this._nodeWidth100=this._nodeWidth=f.w),k&&(this._nodeHeight100=this._nodeHeight=f.h);f=1/this._zoom;this._afRoot.setScale(f*this._afRoot.getScaleX(),f*this._afRoot.getScaleY());this._nodeWidth||(this._nodeWidth100=this._nodeWidth=c);this._nodeHeight||(this._nodeHeight100=this._nodeHeight=d);f=this._nodeWidth;l=this._nodeHeight}this._labelObj?
(a.setAvailableWidth(Number.MAX_VALUE),a.setAvailableHeight(Number.MAX_VALUE),dvt.AfComponentFactory.layoutAndRender(a,this._labelObj),this._labelDims=dvt.AfComponentFactory.getBounds(this._labelObj)):this._labelDims=null;this._backgroundObj&&(a.setAvailableWidth(f),a.setAvailableHeight(l),dvt.AfComponentFactory.layoutAndRender(a,this._backgroundObj),this._backgroundObj instanceof dvt.SimpleMarker||this._backgroundObj instanceof dvt.ImageMarker?(c=(g=this._backgroundObj.getStroke())?g.getWidth()/
2:0,g=this._backgroundObj.getCx()-this._backgroundObj.getWidth()/2-c+f/2,c=this._backgroundObj.getCy()-this._backgroundObj.getHeight()/2-c+l/2,this._backgroundObj.setCenter(g,c,!0).setSize(f,l)):(g=dvt.AfComponentFactory.getBounds(this._backgroundObj,this),c=this._backgroundObj.getMatrix().clone(),c.translate(-g.x,-g.y),c.scale(this._nodeWidth/g.w,this._nodeHeight/g.h),this._backgroundObj.setMatrix(c)),this._backgroundMouseEventCatcher.setWidth(f),this._backgroundMouseEventCatcher.setHeight(l));if(this._overlays)for(g=
0;g<this._overlays.length;g++)c=this._overlays[g].overlay,a.setAvailableWidth(Number.MAX_VALUE),a.setAvailableHeight(Number.MAX_VALUE),dvt.AfComponentFactory.layoutAndRender(a,c),k=this._overlays[g].position,h=dvt.AfComponentFactory.getBounds(c,this),d=k.x*f,k=k.y*l,d-=.5*h.w,k-=.5*h.h,h=c.getMatrix().clone(),h.translate(d,k),c.setMatrix(h);this._bStack&&this.setStack(this._bStack);this.isContainer()&&this.RefreshContainerBadge();this._bPartialExpand&&this.setPartiallyExpanded(this._bPartialExpand);
this.addAccessibilityAttributes();this.RefreshSelectionEffect();this.AddDrawEffects();this._layoutBounds=this.CalcLayoutBounds();this.SetAlpha(Math.min(this.getAlpha(),this.GetMaxAlpha()));b&&this.TransitionDisclosure(b,this._bDisclosureChanged,this._savedContentState);this.TransitionHiddenAncestor(this._bHiddenAncestorChanged?b:null,!0);this.GetDiagram().UpdateOverviewNode(this,b);this._bHiddenAncestorChanged=this._bDisclosureChanged=!1}};
dvt.AdfDiagramNode.prototype.TransitionContainerPadding=function(a,b,c){var d=0,e=0,f=0,g=0;a&&b?(d="auto"===b.top?Number.MAX_VALUE:b.top-a.top,e="auto"===b.right?Number.MAX_VALUE:b.right-a.right,f="auto"===b.bottom?Number.MAX_VALUE:b.bottom-a.bottom,g="auto"===b.left?Number.MAX_VALUE:b.left-a.left):b?(d="auto"===b.top?Number.MAX_VALUE:b.top,e="auto"===b.right?Number.MAX_VALUE:b.right,f="auto"===b.bottom?Number.MAX_VALUE:b.bottom,g="auto"===b.left?Number.MAX_VALUE:b.left):a&&(d=-a.top,e=-a.right,
f=-a.bottom,g=-a.left);this._clearContainerFacetTabStops();var h=dvt.AdfDiagramNode._CONTAINER_PADDING,k=(this._containerLeftBounds?this._containerLeftBounds.w:0)+(this._containerRightBounds?this._containerRightBounds.w:0),l=b?b:{top:0,right:0,bottom:0,left:0},m=this._childNodePaneDims.w+("auto"===l.left?h:l.left)+("auto"===l.right?h:l.right)+k,l=this._childNodePaneDims.h+("auto"===l.top?h:l.top)+("auto"===l.bottom?h:l.bottom),n=this._containerTopObj,p=this._containerTopBounds,q=this._containerBottomObj,
r=this._containerBottomBounds,t=0;if((this._containerTopObj||this._containerBottomObj)&&(e||g)){var u=null,w=null,v=0;this._containerTopObj&&(this._containerTopBounds=this._containerTopObj=null,n.getParent().removeChild(n),v=e===Number.MAX_VALUE||g===Number.MAX_VALUE?Number.MAX_VALUE:this._containerTopAvailBounds.w+g+e,u=this.FullRenderContainerFacet(this._nodeDef.getContainerTopTemplate(),"top",v,this._containerTopAvailBounds.h,m,null));this._containerBottomObj&&(this._containerBottomBounds=this._containerBottomObj=
null,q.getParent().removeChild(q),v=e===Number.MAX_VALUE||g===Number.MAX_VALUE?Number.MAX_VALUE:this._containerBottomAvailBounds.w+g+e,w=this.FullRenderContainerFacet(this._nodeDef.getContainerBottomTemplate(),"bottom",v,this._containerBottomAvailBounds.h,u&&u.facetBounds.w>m?u.facetBounds.w:m,null));u&&w&&v==Number.MAX_VALUE&&w.facetBounds.w>u.facetBounds.w&&u.facetBounds.w>m&&(u.facetObj.getParent().removeChild(u.facetObj),u.facetObj.destroy&&u.facetObj.destroy(),u=this.FullRenderContainerFacet(this._nodeDef.getContainerTopTemplate(),
"top",w.facetBounds.w,this._containerTopAvailBounds.h,null,null));u&&(this._containerTopObj=u.facetObj,this._containerTopAvailBounds=u.facetAvailBounds,this._containerTopBounds=u.facetBounds,t=this._containerTopBounds.h-p.h,this._containerTopObj.setScaleX(p.w/this._containerTopBounds.w),c&&(p=c.removeProp(n,n.getScaleX))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerTopObj,this._containerTopObj.getScaleX,this._containerTopObj.setScaleX,p),n.destroy&&n.destroy());w&&(this._containerBottomObj=
w.facetObj,this._containerBottomAvailBounds=w.facetAvailBounds,this._containerBottomBounds=w.facetBounds,this._containerBottomObj.setScaleX(r.w/this._containerBottomBounds.w),this._containerBottomObj.setTranslate(q.getTranslateX(),q.getTranslateY()),c&&((p=c.removeProp(q,q.getScaleX))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerBottomObj,this._containerBottomObj.getScaleX,this._containerBottomObj.setScaleX,p),(p=c.removeProp(q,q.getTranslateX))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerBottomObj,
this._containerBottomObj.getTranslateX,this._containerBottomObj.setTranslateX,p),(p=c.removeProp(q,q.getTranslateY))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerBottomObj,this._containerBottomObj.getTranslateY,this._containerBottomObj.setTranslateY,p)),q.destroy&&q.destroy())}q=this._containerLeftObj;p=this._containerLeftBounds;n=this._containerRightObj;r=this._containerRightBounds;(this._containerLeftObj||this._containerRightObj)&&(d||f)&&(w=u=null,v=0,this._containerLeftObj&&(this._containerLeftBounds=
this._containerLeftObj=null,q.getParent().removeChild(q),v=d===Number.MAX_VALUE||f===Number.MAX_VALUE?Number.MAX_VALUE:this._containerLeftAvailBounds.h+d+f,u=this.FullRenderContainerFacet(this._nodeDef.getContainerLeftTemplate(),"left",this._containerLeftAvailBounds.w,v,null,l)),this._containerRightObj&&(d||f)&&(this._containerRightBounds=this._containerRightObj=null,n.getParent().removeChild(n),v=d===Number.MAX_VALUE||f===Number.MAX_VALUE?Number.MAX_VALUE:this._containerRightAvailBounds.h+d+f,w=
this.FullRenderContainerFacet(this._nodeDef.getContainerRightTemplate(),"right",this._containerRightAvailBounds.w,v,null,u&&u.facetBounds.h>l?u.facetBounds.h:l)),u&&w&&v==Number.MAX_VALUE&&w.facetBounds.h>u.facetBounds.h&&u.facetBounds.h>l&&(u.facetObj.getParent().removeChild(u.facetObj),u.facetObj.destroy&&u.facetObj.destroy(),u=this.FullRenderContainerFacet(this._nodeDef.getContainerLeftTemplate(),"left",this._containerLeftAvailBounds.w,w.facetBounds.h,null,null)),u&&(this._containerLeftObj=u.facetObj,
this._containerLeftAvailBounds=u.facetAvailBounds,this._containerLeftBounds=u.facetBounds,this._containerLeftObj.setScaleY(p.h/this._containerLeftBounds.h),this._containerLeftObj.setTranslate(q.getTranslateX(),q.getTranslateY()),c&&((p=c.removeProp(q,q.getScaleY))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerLeftObj,this._containerLeftObj.getScaleY,this._containerLeftObj.setScaleY,p),(p=c.removeProp(q,q.getTranslateX))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerLeftObj,this._containerLeftObj.getTranslateX,
this._containerLeftObj.setTranslateX,p),(p=c.removeProp(q,q.getTranslateY))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerLeftObj,this._containerLeftObj.getTranslateY,this._containerLeftObj.setTranslateY,p)),q.destroy&&q.destroy()),w&&(this._containerRightObj=w.facetObj,this._containerRightAvailBounds=w.facetAvailBounds,this._containerRightBounds=w.facetBounds,this._containerRightObj.setScaleY(r.h/this._containerRightBounds.h),this._containerRightObj.setTranslate(n.getTranslateX(),n.getTranslateY()),
c&&((p=c.removeProp(n,n.getScaleY))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerRightObj,this._containerRightObj.getScaleY,this._containerRightObj.setScaleY,p),(p=c.removeProp(n,n.getTranslateX))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerRightObj,this._containerRightObj.getTranslateX,this._containerRightObj.setTranslateX,p),(p=c.removeProp(n,n.getTranslateY))&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerRightObj,this._containerRightObj.getTranslateY,this._containerRightObj.setTranslateY,
p)),n.destroy&&n.destroy()));this._updateNodeTabStops();1<this._tabStopsNodeArray.length&&this._tabStopsNodeArray.push(this);q=Math.max(this._containerTopBounds?this._containerTopBounds.w:0,this._containerBottomBounds?this._containerBottomBounds.w:0);e===Number.MAX_VALUE&&g===Number.MAX_VALUE?(b.left=b.right=q>m?(q-this._childNodePaneDims.w-k)/2:h,e=b.right-a.right,g=b.left-a.left):e===Number.MAX_VALUE?(b.right=q>m?q-this._childNodePaneDims.w-b.left-k:h,e=b.right-a.right):g===Number.MAX_VALUE&&(b.left=
q>m?q-this._childNodePaneDims.w-b.right-k:h,g=b.left-a.left);k=Math.max(this._containerLeftBounds?this._containerLeftBounds.h:0,this._containerRightBounds?this._containerRightBounds.h:0);d===Number.MAX_VALUE&&f===Number.MAX_VALUE?(b.top=b.bottom=k>l?(k-this._childNodePaneDims.h)/2:h,d=b.top-a.top,f=b.bottom-a.bottom):d===Number.MAX_VALUE?(b.top=k>l?k-this._childNodePaneDims.h-b.bottom:h,d=b.top-a.top):f===Number.MAX_VALUE&&(b.bottom=k>l?k-this._childNodePaneDims.h-b.top:h,f=b.bottom-a.bottoms);var x,
z,y;if(this._containerChrome){if(e||g)x=this._containerChrome.getWidth()+e+g;if(d||f||t)z=this._containerChrome.getHeight()+d+f+t;if(x||z)y=this._getContainerChromeClipPathDef(),y[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W]=x?x:y[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W],y[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H]=z?z:y[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H]}c?(this._containerChrome&&(x&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getWidth,
this._containerChrome.setWidth,x),z&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getHeight,this._containerChrome.setHeight,z),y&&c.addProp(dvt.Animator.TYPE_NUMBER_ARRAY,this,this._getContainerChromeClipPathDef,this._setContainerChromeClipPath,y)),this._containerLeftObj&&(this._setContainerFacetScale(c,this._containerLeftObj,1,1),t&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerLeftObj,this._containerLeftObj.getTranslateY,this._containerLeftObj.setTranslateY,
this._containerLeftObj.getTranslateY()+t)),this._containerRightObj&&(this._setContainerFacetScale(c,this._containerRightObj,1,1),(e||g)&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerRightObj,this._containerRightObj.getTranslateX,this._containerRightObj.setTranslateX,this._containerRightObj.getTranslateX()+e+g),t&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerRightObj,this._containerRightObj.getTranslateY,this._containerRightObj.setTranslateY,this._containerRightObj.getTranslateY()+t)),this._containerTopObj&&
this._setContainerFacetScale(c,this._containerTopObj,1,1),this._containerBottomObj&&(this._setContainerFacetScale(c,this._containerBottomObj,1,1),(d||f||t)&&c.addProp(dvt.Animator.TYPE_NUMBER,this._containerBottomObj,this._containerBottomObj.getTranslateY,this._containerBottomObj.setTranslateY,this._containerBottomObj.getTranslateY()+d+f+t)),this._childNodePane&&(b?(c.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getTranslateX,this._childNodePane.setTranslateX,b.left+this.getContainerLeftWidth()-
this._childNodePaneDims.x),c.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getTranslateY,this._childNodePane.setTranslateY,b.top+this.getContainerTopHeight()-this._childNodePaneDims.y)):(c.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getTranslateX,this._childNodePane.setTranslateX,this.getContainerLeftWidth()-this._childNodePaneDims.x),c.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getTranslateY,this._childNodePane.setTranslateY,
this.getContainerTopHeight()-this._childNodePaneDims.y))),this._partialExpandIndicator&&((g||e)&&c.addProp(dvt.Animator.TYPE_NUMBER,this._partialExpandIndicator,this._partialExpandIndicator.getTranslateX,this._partialExpandIndicator.setTranslateX,this._partialExpandIndicator.getTranslateX()+.5*(g+e)),(d||f)&&c.addProp(dvt.Animator.TYPE_NUMBER,this._partialExpandIndicator,this._partialExpandIndicator.getTranslateY,this._partialExpandIndicator.setTranslateY,this._partialExpandIndicator.getTranslateY()+
(d+f))),this._focusUnderlay&&this._focusUnderlay instanceof dvt.Rect&&((e||g)&&c.addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getWidth,this._focusUnderlay.setWidth,this._focusUnderlay.getWidth()+e+g),(d||f)&&c.addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getHeight,this._focusUnderlay.setHeight,this._focusUnderlay.getHeight()+d+f)),this._nodeUnderlay&&((e||g)&&c.addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getWidth,this._nodeUnderlay.setWidth,
this._nodeUnderlay.getWidth()+e+g),(d||f)&&c.addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getHeight,this._nodeUnderlay.setHeight,this._nodeUnderlay.getHeight()+d+f))):(this._containerChrome&&(x&&this._containerChrome.setWidth(x),z&&this._containerChrome.setHeight(z),y&&this._setContainerChromeClipPath(y)),this._containerLeftObj&&(this._setContainerFacetScale(null,this._containerLeftObj,1,1),t&&this._containerLeftObj.setTranslateY(this._containerLeftObj.getTranslateY()+t)),
this._containerRightObj&&(this._setContainerFacetScale(null,this._containerRightObj,1,1),(e||g)&&this._containerRightObj.setTranslateX(this._containerRightObj.getTranslateX()+e+g),t&&this._containerRightObj.setTranslateY(this._containerRightObj.getTranslateY()+t)),this._containerTopObj&&this._setContainerFacetScale(null,this._containerTopObj,1,1),this._containerBottomObj&&(this._setContainerFacetScale(null,this._containerBottomObj,1,1),(d||f||t)&&this._containerBottomObj.setTranslateY(this._containerBottomObj.getTranslateY()+
d+f+t)),this._childNodePane&&(b?this._childNodePane.setTranslate(b.left+this.getContainerLeftWidth()-this._childNodePaneDims.x,b.top+this.getContainerTopHeight()-this._childNodePaneDims.y):this._childNodePane.setTranslate(this.getContainerLeftWidth()-this._childNodePaneDims.x,this.getContainerTopHeight()-this._childNodePaneDims.y)),this._partialExpandIndicator&&((g||e)&&this._partialExpandIndicator.setTranslateX(this._partialExpandIndicator.getTranslateX()+.5*(g+e)),(d||f)&&this._partialExpandIndicator.setTranslateY(this._partialExpandIndicator.getTranslateY()+
(d+f))),this._focusUnderlay&&this._focusUnderlay instanceof dvt.Rect&&((e||g)&&this._focusUnderlay.setWidth(this._focusUnderlay.getWidth()+e+g),(d||f)&&this._focusUnderlay.setHeight(this._focusUnderlay.getHeight()+d+f)),this._nodeUnderlay&&((e||g)&&this._nodeUnderlay.setWidth(this._nodeUnderlay.getWidth()+e+g),(d||f)&&this._nodeUnderlay.setHeight(this._nodeUnderlay.getHeight()+d+f)));this._nodeWidth+=g+e;this._nodeHeight+=d+f;this._layoutBounds&&(this._layoutBounds.w+=g+e,this._layoutBounds.h+=d+
f)};
dvt.AdfDiagramNode.prototype.TransitionDisclosure=function(a,b,c){if(a){var d=this;dvt.Playable.appendOnInit(a,function(){d.RestoreContentState(d._savedContentState)});b&&this._nodeUnderlay&&(this._bPreventHoverEffect=!0,dvt.Playable.appendOnEnd(a,function(){d._bPreventHoverEffect=!1}));if(b)if(this.isDisclosed()){b=this._getContentContainer().getChildIndex(this._afRootPlaceholder);this._getContentContainer().removeChildAt(b);this._getContentContainer().addChildAt(c._afRoot,b);c._containerUnderlay&&this._getContentContainer().addChildAt(c._containerUnderlay,
0);var e=c._oldNodeWidth/this._nodeWidth,f=c._oldNodeHeight/this._nodeHeight;dvt.Playable.appendOnInit(a,function(){d._containerChrome.setAlpha(0);d._childNodePane.setScale(e,f);if(d._containerLeftObj){d._setContainerFacetScale(null,d._containerLeftObj,d._containerLeftObj.getScaleX()*e,d._containerLeftObj.getScaleY()*f);var a=d._containerLeftObj.getTranslateX()*e,b=d._containerLeftObj.getTranslateY()*f;d._setContainerFacetTranslate(null,d._containerLeftObj,a,b)}d._containerRightObj&&(d._setContainerFacetScale(null,
d._containerRightObj,d._containerRightObj.getScaleX()*e,d._containerRightObj.getScaleY()*f),a=d._containerRightObj.getTranslateX()*e,b=d._containerRightObj.getTranslateY()*f,d._setContainerFacetTranslate(null,d._containerRightObj,a,b));d._containerTopObj&&(d._setContainerFacetScale(null,d._containerTopObj,d._containerTopObj.getScaleX()*e,d._containerTopObj.getScaleY()*f),a=d._containerTopObj.getTranslateX()*e,b=d._containerTopObj.getTranslateY()*f,d._setContainerFacetTranslate(null,d._containerTopObj,
a,b));d._containerBottomObj&&(d._setContainerFacetScale(null,d._containerBottomObj,d._containerBottomObj.getScaleX()*e,d._containerBottomObj.getScaleY()*f),a=d._containerBottomObj.getTranslateX()*e,b=d._containerBottomObj.getTranslateY()*f,d._setContainerFacetTranslate(null,d._containerBottomObj,a,b))});a.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getWidth,this._containerChrome.setWidth,this._nodeWidth);a.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getHeight,
this._containerChrome.setHeight,this._nodeHeight);b=this._getContainerChromeClipPathDef();b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W]=this._nodeWidth;b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H]=this._nodeHeight;a.addProp(dvt.Animator.TYPE_NUMBER_ARRAY,this,this._getContainerChromeClipPathDef,this._setContainerChromeClipPath,b);a.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getAlpha,this._containerChrome.setAlpha,1);this._containerLeftObj&&(this._setContainerFacetScale(a,
this._containerLeftObj,1,1),this._setContainerFacetTranslate(a,this._containerLeftObj,this._containerLeftObj.getTranslateX(),this._containerLeftObj.getTranslateY()));this._containerRightObj&&(this._setContainerFacetScale(a,this._containerRightObj,1,1),this._setContainerFacetTranslate(a,this._containerRightObj,this._containerRightObj.getTranslateX(),this._containerRightObj.getTranslateY()));this._containerTopObj&&(this._setContainerFacetScale(a,this._containerTopObj,1,1),this._setContainerFacetTranslate(a,
this._containerTopObj,this._containerTopObj.getTranslateX(),this._containerTopObj.getTranslateY()));this._containerBottomObj&&(this._setContainerFacetScale(a,this._containerBottomObj,1,1),this._setContainerFacetTranslate(a,this._containerBottomObj,this._containerBottomObj.getTranslateX(),this._containerBottomObj.getTranslateY()));a.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getScaleX,this._childNodePane.setScaleX,1);a.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,
this._childNodePane.getScaleY,this._childNodePane.setScaleY,1);c._afRoot&&a.addProp(dvt.Animator.TYPE_NUMBER,c._afRoot,c._afRoot.getAlpha,c._afRoot.setAlpha,0);c._containerUnderlay&&a.addProp(dvt.Animator.TYPE_NUMBER,c._containerUnderlay,c._containerUnderlay.getAlpha,c._containerUnderlay.setAlpha,0);dvt.Playable.appendOnEnd(a,function(){d.DestroyUndisclosedContent(c)})}else{this._stackUnderlay?this._getContentContainer().addChildAt(c._containerChrome,1):this._getContentContainer().addChildAt(c._containerChrome,
0);this.addChild(this._childNodePane);e=this._nodeWidth/c._oldNodeWidth;f=this._nodeHeight/c._oldNodeHeight;a.addProp(dvt.Animator.TYPE_NUMBER,c._containerChrome,c._containerChrome.getWidth,c._containerChrome.setWidth,this._nodeWidth);a.addProp(dvt.Animator.TYPE_NUMBER,c._containerChrome,c._containerChrome.getHeight,c._containerChrome.setHeight,this._nodeHeight);c._containerChrome&&(b=this._getContainerChromeClipPathDef.call(c),b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W]=this._nodeWidth,b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H]=
this._nodeHeight,a.addProp(dvt.Animator.TYPE_NUMBER_ARRAY,c,this._getContainerChromeClipPathDef,this._setContainerChromeClipPath,b));a.addProp(dvt.Animator.TYPE_NUMBER,c._containerChrome,c._containerChrome.getAlpha,c._containerChrome.setAlpha,0);if(c._containerLeftObj){this._setContainerFacetScale(a,c._containerLeftObj,e,f);b=c._containerLeftObj.getTranslateX()*e;var g=c._containerLeftObj.getTranslateY()*f;this._setContainerFacetTranslate(a,c._containerLeftObj,b,g)}c._containerRightObj&&(this._setContainerFacetScale(a,
c._containerRightObj,e,f),b=c._containerRightObj.getTranslateX()*e,g=c._containerRightObj.getTranslateY()*f,this._setContainerFacetTranslate(a,c._containerRightObj,b,g));c._containerTopObj&&(this._setContainerFacetScale(a,c._containerTopObj,e,f),b=c._containerTopObj.getTranslateX()*e,g=c._containerTopObj.getTranslateY()*f,this._setContainerFacetTranslate(a,c._containerTopObj,b,g));c._containerBottomObj&&(this._setContainerFacetScale(a,c._containerBottomObj,e,f),b=c._containerBottomObj.getTranslateX()*
e,g=c._containerBottomObj.getTranslateY()*f,this._setContainerFacetTranslate(a,c._containerBottomObj,b,g));a.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getScaleX,this._childNodePane.setScaleX,e);a.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getScaleY,this._childNodePane.setScaleY,f);a.addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getAlpha,this._childNodePane.setAlpha,0);this._afRoot&&(this._afRoot.setAlpha(0),a.addProp(dvt.Animator.TYPE_NUMBER,
this._afRoot,this._afRoot.getAlpha,this._afRoot.setAlpha,1));this._containerUnderlay&&(this._afRoot.setAlpha(0),a.addProp(dvt.Animator.TYPE_NUMBER,this._containerUnderlay,this._containerUnderlay.getAlpha,this._containerUnderlay.setAlpha,1));dvt.Playable.appendOnEnd(a,function(){d.DestroyDisclosedContent(c);d._childNodePane.setAlpha(1);d._childNodePane.setScale(1,1)})}else this._containerChrome&&(this._nodeWidth!=c._oldNodeWidth&&a.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getWidth,
this._containerChrome.setWidth,this._nodeWidth),this._nodeHeight!=c._oldNodeHeight&&a.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getHeight,this._containerChrome.setHeight,this._nodeHeight),this._nodeWidth!=c._oldNodeWidth||this._nodeHeight!=c._oldNodeHeight)&&(b=this._getContainerChromeClipPathDef(),b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W]=this._nodeWidth,b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H]=this._nodeHeight,a.addProp(dvt.Animator.TYPE_NUMBER_ARRAY,
this,this._getContainerChromeClipPathDef,this._setContainerChromeClipPath,b)),this._containerLeftObj&&this._setContainerFacetScale(a,this._containerLeftObj,1,1),this._containerRightObj&&this._setContainerFacetScale(a,this._containerRightObj,1,1),this._containerTopObj&&this._setContainerFacetScale(a,this._containerTopObj,1,1),this._containerBottomObj&&this._setContainerFacetScale(a,this._containerBottomObj,1,1);this._containerBadge&&(b=this._containerBadge.getTranslateX(),g=this._containerBadge.getTranslateY(),
b!=c._oldContainerBadgeX&&a.addProp(dvt.Animator.TYPE_NUMBER,this._containerBadge,this._containerBadge.getTranslateX,this._containerBadge.setTranslateX,b),g!=c._oldContainerBadgeY&&a.addProp(dvt.Animator.TYPE_NUMBER,this._containerBadge,this._containerBadge.getTranslateY,this._containerBadge.setTranslateY,g));this._partialExpandIndicator&&(b=this._partialExpandIndicator.getTranslateX(),g=this._partialExpandIndicator.getTranslateY(),b!=c._oldPartialExpandIndicatorX&&a.addProp(dvt.Animator.TYPE_NUMBER,
this._partialExpandIndicator,this._partialExpandIndicator.getTranslateX,this._partialExpandIndicator.setTranslateX,b),g!=c._oldPartialExpandIndicatorY&&a.addProp(dvt.Animator.TYPE_NUMBER,this._partialExpandIndicator,this._partialExpandIndicator.getTranslateY,this._partialExpandIndicator.setTranslateY,g));if(this._focusUnderlay&&this._focusUnderlay instanceof dvt.Rect){b=this._focusUnderlay.getX();var g=this._focusUnderlay.getY(),h=this._focusUnderlay.getWidth(),k=this._focusUnderlay.getHeight();b!=
c._oldFocusUnderlayX&&a.addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getX,this._focusUnderlay.setX,b);g!=c._oldFocusUnderlayY&&a.addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getY,this._focusUnderlay.setY,g);h!=c._oldFocusUnderlayWidth&&a.addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getWidth,this._focusUnderlay.setWidth,h);k!=c._oldFocusUnderlayHeight&&a.addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getHeight,
this._focusUnderlay.setHeight,k)}this._nodeUnderlay&&(b=this._nodeUnderlay.getX(),g=this._nodeUnderlay.getY(),h=this._nodeUnderlay.getWidth(),k=this._nodeUnderlay.getHeight(),b!=c._oldNodeUnderlayX&&a.addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getX,this._nodeUnderlay.setX,b),g!=c._oldNodeUnderlayY&&a.addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getY,this._nodeUnderlay.setY,g),h!=c._oldNodeUnderlayWidth&&a.addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,
this._nodeUnderlay.getWidth,this._nodeUnderlay.setWidth,h),k!=c._oldNodeUnderlayHeight&&a.addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getHeight,this._nodeUnderlay.setHeight,k))}};
dvt.AdfDiagramNode.prototype.TransitionHiddenAncestor=function(a,b){if(!b||this.isHiddenAncestor()){var c=this.isHiddenAncestor()?0:1,d=!this.isHiddenAncestor();this._stackUnderlay&&(a?(this._stackUnderlay.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,this._stackUnderlay,this._stackUnderlay.getAlpha,this._stackUnderlay.setAlpha,c)):this._stackUnderlay.setAlpha(c));this._stackBadge&&(a?(this._stackBadge.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,this._stackBadge,this._stackBadge.getAlpha,
this._stackBadge.setAlpha,c)):this._stackBadge.setAlpha(c));this._afRoot&&(this._afRoot.setMouseEnabled(d),a?(this._afRoot.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,this._afRoot,this._afRoot.getAlpha,this._afRoot.setAlpha,c)):this._afRoot.setAlpha(c));this._containerBadge&&(this._containerBadge.setMouseEnabled(d),a?(this._containerBadge.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,this._containerBadge,this._containerBadge.getAlpha,this._containerBadge.setAlpha,c)):this._containerBadge.setAlpha(c));
this._partialExpandIndicator&&(this._partialExpandIndicator.setMouseEnabled(d),a?(this._partialExpandIndicator.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,this._partialExpandIndicator,this._partialExpandIndicator.getAlpha,this._partialExpandIndicator.setAlpha,c)):this._partialExpandIndicator.setAlpha(c));this._containerChrome&&(this._containerChrome.setMouseEnabled(d),a?(this._containerChrome.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getAlpha,
this._containerChrome.setAlpha,c)):this._containerChrome.setAlpha(c));this._labelObj&&(this._labelObj.setMouseEnabled(d),a?(this._labelObj.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,this._labelObj,this._labelObj.getAlpha,this._labelObj.setAlpha,c)):this._labelObj.setAlpha(c));if(this._overlays)for(var e=0;e<this._overlays.length;e++){var f=this._overlays[e].overlay;f.setMouseEnabled(d);a?(f.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,f,f.getAlpha,f.setAlpha,c)):f.setAlpha(c)}this._nodeUnderlay&&
(a?(this._nodeUnderlay.setAlpha(1-c),a.addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getAlpha,this._nodeUnderlay.setAlpha,c)):this._nodeUnderlay.setAlpha(c))}};
dvt.AdfDiagramNode.prototype.SaveContentState=function(){var a={};a._containerChrome=this._containerChrome;a._containerTopObj=this._containerTopObj;a._containerTopBounds=this._containerTopBounds;a._containerBottomObj=this._containerBottomObj;a._containerBottomBounds=this._containerBottomBounds;a._containerLeftObj=this._containerLeftObj;a._containerLeftBounds=this._containerLeftBounds;a._containerRightObj=this._containerRightObj;a._containerRightBounds=this._containerRightBounds;a._containerUnderlay=
this._containerUnderlay;a._afRoot=this._afRoot;this._nodeWidth&&this._nodeHeight?(a._oldNodeWidth=this._nodeWidth,a._oldNodeHeight=this._nodeHeight):this._oldNodeWidth&&this._oldNodeHeight&&(a._oldNodeWidth=this._oldNodeWidth,a._oldNodeHeight=this._oldNodeHeight);this._containerBadge&&(a._oldContainerBadgeX=this._containerBadge.getTranslateX(),a._oldContainerBadgeY=this._containerBadge.getTranslateY());this._partialExpandIndicator&&(a._oldPartialExpandIndicatorX=this._partialExpandIndicator.getTranslateX(),
a._oldPartialExpandIndicatorY=this._partialExpandIndicator.getTranslateY());this._focusUnderlay&&this._focusUnderlay instanceof dvt.Rect&&(a._oldFocusUnderlayX=this._focusUnderlay.getX(),a._oldFocusUnderlayY=this._focusUnderlay.getY(),a._oldFocusUnderlayWidth=this._focusUnderlay.getWidth(),a._oldFocusUnderlayHeight=this._focusUnderlay.getHeight());this._nodeUnderlay&&(a._oldNodeUnderlayX=this._nodeUnderlay.getX(),a._oldNodeUnderlayY=this._nodeUnderlay.getY(),a._oldNodeUnderlayWidth=this._nodeUnderlay.getWidth(),
a._oldNodeUnderlayHeight=this._nodeUnderlay.getHeight());return a};
dvt.AdfDiagramNode.prototype.RestoreContentState=function(a){if(this._containerChrome){this._containerChrome.setWidth(a._oldNodeWidth);this._containerChrome.setHeight(a._oldNodeHeight);var b=this._getContainerChromeClipPathDef();b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W]=a._oldNodeWidth;b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H]=a._oldNodeHeight;this._setContainerChromeClipPath(b)}this._containerTopObj&&a._containerTopBounds&&this._containerTopBounds&&this._setContainerFacetScale(null,
this._containerTopObj,a._containerTopBounds.w/this._containerTopBounds.w,a._containerTopBounds.h/this._containerTopBounds.h);this._containerBottomObj&&a._containerBottomBounds&&this._containerBottomBounds&&this._setContainerFacetScale(null,this._containerBottomObj,a._containerBottomBounds.w/this._containerBottomBounds.w,a._containerBottomBounds.h/this._containerBottomBounds.h);this._containerLeftObj&&a._containerLeftBounds&&this._containerLeftBounds&&this._setContainerFacetScale(null,this._containerLeftObj,
a._containerLeftBounds.w/this._containerLeftBounds.w,a._containerLeftBounds.h/this._containerLeftBounds.h);this._containerRightObj&&a._containerRightBounds&&this._containerRightBounds&&this._setContainerFacetScale(null,this._containerRightObj,a._containerRightBounds.w/this._containerRightBounds.w,a._containerRightBounds.h/this._containerRightBounds.h);this._containerBadge&&this._containerBadge.setTranslate(a._oldContainerBadgeX,a._oldContainerBadgeY);this._partialExpandIndicator&&this._partialExpandIndicator.setTranslate(a._oldPartialExpandIndicatorX,
a._oldPartialExpandIndicatorY);this._focusUnderlay&&this._focusUnderlay instanceof dvt.Rect&&(isNaN(a._oldFocusUnderlayX)||this._focusUnderlay.setX(a._oldFocusUnderlayX),isNaN(a._oldFocusUnderlayY)||this._focusUnderlay.setY(a._oldFocusUnderlayY),isNaN(a._oldFocusUnderlayWidth)||this._focusUnderlay.setWidth(a._oldFocusUnderlayWidth),isNaN(a._oldFocusUnderlayHeight)||this._focusUnderlay.setHeight(a._oldFocusUnderlayHeight));this._nodeUnderlay&&(isNaN(a._oldNodeUnderlayX)||this._nodeUnderlay.setX(a._oldNodeUnderlayX),
isNaN(a._oldNodeUnderlayY)||this._nodeUnderlay.setY(a._oldNodeUnderlayY),isNaN(a._oldNodeUnderlayWidth)||this._nodeUnderlay.setWidth(a._oldNodeUnderlayWidth),isNaN(a._oldNodeUnderlayHeight)||this._nodeUnderlay.setHeight(a._oldNodeUnderlayHeight))};
dvt.AdfDiagramNode.prototype.addChildNode=function(a){this._childNodeIds||(this._childNodeIds=[]);this._childNodeIds.push(a.getData().getId());if(!this._childNodePane){this._childNodePane=new dvt.Container(this.getCtx(),this.getData().getId()+"_cnp");this._contentPane=new dvt.Container(this.getCtx(),this.getData().getId()+"_cp");for(var b=this.getNumChildren()-1;-1<b;b--)this._contentPane.addChildAt(this.getChildAt(b),0);this.addChild(this._contentPane);this.addChild(this._childNodePane)}this._childNodePane.addChild(a);
this._visibleChildNodeCount++;a._nodeParent=this._childNodePane};dvt.AdfDiagramNode.prototype.addChildLink=function(a){this._childLinkIds||(this._childLinkIds=[]);this._childLinkIds.push(a.getData().getId());this._childNodePane.addChildAt(a,0);a._linkParent=this._childNodePane;a._bCrossContainerLink=!1};
dvt.AdfDiagramNode.prototype.addCrossChildLink=function(a){this._crossChildLinkIds||(this._crossChildLinkIds=[]);this._crossChildLinkIds.push(a.getData().getId());this._childNodePane.addChild(a);a._linkParent=this._childNodePane;a._bCrossContainerLink=!0};dvt.AdfDiagramNode.prototype.getChildNodeIds=function(){return this._childNodeIds};dvt.AdfDiagramNode.prototype.getChildNodeCount=function(){return this._childNodeIds?this._childNodeIds.length:0};
dvt.AdfDiagramNode.prototype.setVisibleChildNodeCount=function(a){this._visibleChildNodeCount=a;this.RefreshContainerBadge()};dvt.AdfDiagramNode.prototype.getVisibleChildNodeCount=function(){return this._visibleChildNodeCount};dvt.AdfDiagramNode.prototype.getChildLinkIds=function(){return this._childLinkIds};dvt.AdfDiagramNode.prototype.getCrossChildLinkIds=function(){return this._crossChildLinkIds};
dvt.AdfDiagramNode.prototype.getChildLinkCount=function(){return this._childLinkIds?this._childLinkIds.length:0};dvt.AdfDiagramNode.prototype.getCrossChildLinkCount=function(){return this._crossChildLinkIds?this._crossChildLinkIds.length:0};dvt.AdfDiagramNode.prototype.isContainer=function(){return this.getData().isContainer()&&(!this.getData().isChildrenFetched()||0<this.getChildNodeCount())};
dvt.AdfDiagramNode.prototype.setDisclosed=function(a){this.isContainer()&&(a!=this._bDisclosed&&(this._oldNodeWidth=this._nodeWidth,this._oldNodeHeight=this._nodeHeight,this._nodeHeight=this._nodeWidth=null,this._bDisclosureChanged=!0,this.GetDiagram().setAutomationState(this.getData().getId(),"disclosed",this._bDisclosed)),this._bDisclosed=a)};dvt.AdfDiagramNode.prototype.isDisclosed=function(){return this._bDisclosed};
dvt.AdfDiagramNode.prototype.setHiddenAncestor=function(a,b){var c=this._bHiddenAncestor;this._bHiddenAncestor=a;a!=c&&(this._refreshCursor(),this.TransitionHiddenAncestor(b),this.GetDiagram().UpdateOverviewNode(this,b))};dvt.AdfDiagramNode.prototype.setForceZoom100Facet=function(a){this._bForceZoom100Facet=a};
dvt.AdfDiagramNode.prototype.GetNodeTemplate=function(){var a=this.GetDiagram();if(!a)return null;var b;b=null;var c=this._zoom;if(this._bForceZoom100Facet)b="zoom100",this._zoom=1,(b=this.getNodeDef().getNodeTemplate(b))||(b=this.getNodeDef().getDefaultNodeTemplate(this.getWidth(),this.getHeight()));else{var d=a.getPanZoomCanvas();if(!d)return null;d=d.getZoom();.25>=d&&!b&&(b="zoom25",this._zoom=.25,b=this.getNodeDef().getNodeTemplate(b));.5>=d&&!b&&(b="zoom50",this._zoom=.5,b=this.getNodeDef().getNodeTemplate(b));
.75>=d&&!b&&(b="zoom75",this._zoom=.75,b=this.getNodeDef().getNodeTemplate(b));b||(b="zoom100",this._zoom=1,(b=this.getNodeDef().getNodeTemplate(b))||(b=this.getNodeDef().getDefaultNodeTemplate(this.getWidth(),this.getHeight())))}c==this._zoom&&!this._bForceZoom100Facet&&(a._bCrossedZoomThreshold&&!this._bHiddenAncestorChanged||!a._bCrossedZoomThreshold&&this._afRoot&&!a._bAfImageLoaded)&&(b=null);return b};
dvt.AdfDiagramNode.prototype.RemoveOldNodeContents=function(a){this._afRoot&&(this._getContentContainer().removeChild(this._afRoot),a&&this._bDisclosureChanged&&this.isDisclosed()||this._afRoot.destroy&&this._afRoot.destroy(),this._afRoot=null);this._oldLabelRotPoint=this._oldLabelRotAngle=this._oldLabelPos=this._oldLabelBounds=null;this._labelObj&&(this._oldLabelBounds=this.getLabelBounds(),this._oldLabelPos=this.getLabelPosition(),this._oldLabelRotAngle=this.getLabelRotationAngle(),this._oldLabelRotPoint=
this.getLabelRotationPoint(),this._getContentContainer().removeChild(this._labelObj),this._labelObj.destroy&&this._labelObj.destroy(),this._labelObj=null);this._backgroundObj&&(this._getContentContainer().removeChild(this._backgroundObj),this._backgroundObj.destroy&&this._backgroundObj.destroy(),this._backgroundObj=null);this._backgroundMouseEventCatcher&&(this._getContentContainer().removeChild(this._backgroundMouseEventCatcher),this._backgroundMouseEventCatcher.destroy&&this._backgroundMouseEventCatcher.destroy(),
this._backgroundMouseEventCatcher=null);if(this._overlays){for(var b=0;b<this._overlays.length;b++){var c=this._overlays[b].overlay;this._getContentContainer().removeChild(c);c.destroy&&c.destroy()}this._overlays=null}this._containerTopObj&&(a&&this._bDisclosureChanged&&!this.isDisclosed()||((b=this._containerTopObj.getParent())&&b.removeChild(this._containerTopObj),this._containerTopObj.destroy&&this._containerTopObj.destroy()),this._containerTopObj=null);this._containerBottomObj&&(a&&this._bDisclosureChanged&&
!this.isDisclosed()||((b=this._containerBottomObj.getParent())&&b.removeChild(this._containerBottomObj),this._containerBottomObj.destroy&&this._containerBottomObj.destroy()),this._containerBottomObj=null);this._containerLeftObj&&(a&&this._bDisclosureChanged&&!this.isDisclosed()||((b=this._containerLeftObj.getParent())&&b.removeChild(this._containerLeftObj),this._containerLeftObj.destroy&&this._containerLeftObj.destroy()),this._containerLeftObj=null);this._containerRightObj&&(a&&this._bDisclosureChanged&&
!this.isDisclosed()||((b=this._containerRightObj.getParent())&&b.removeChild(this._containerRightObj),this._containerRightObj.destroy&&this._containerRightObj.destroy()),this._containerRightObj=null);this._containerChrome&&(this._getContentContainer().removeChild(this._containerChrome),a&&this._bDisclosureChanged&&!this.isDisclosed()||this._containerChrome.destroy&&this._containerChrome.destroy(),this._containerChrome=null);this._containerUnderlay&&(this._getContentContainer().removeChild(this._containerUnderlay),
a&&this._bDisclosureChanged&&this.isDisclosed()||this._containerUnderlay.destroy&&this._containerUnderlay.destroy(),this._containerUnderlay=null);this._focusUnderlay&&(this._getContentContainer().removeChild(this._focusUnderlay),this._focusUnderlay.destroy&&this._focusUnderlay.destroy(),this._focusUnderlay=null);this._hover=!1};dvt.AdfDiagramNode.prototype.RemoveDispObj=function(a){if(a){var b=a.getParent();b&&b.removeChild(a);a.destroy&&a.destroy()}};
dvt.AdfDiagramNode.prototype.DestroyDisclosedContent=function(a){var b;a._containerTopObj&&((b=a._containerTopObj.getParent())&&b.removeChild(a._containerTopObj),a._containerTopObj.destroy&&a._containerTopObj.destroy(),a._containerTopObj=null);a._containerBottomObj&&((b=a._containerBottomObj.getParent())&&b.removeChild(a._containerBottomObj),a._containerBottomObj.destroy&&a._containerBottomObj.destroy(),a._containerBottomObj=null);a._containerLeftObj&&((b=a._containerLeftObj.getParent())&&b.removeChild(a._containerLeftObj),
a._containerLeftObj.destroy&&a._containerLeftObj.destroy(),a._containerLeftObj=null);a._containerRightObj&&((b=a._containerRightObj.getParent())&&b.removeChild(a._containerRightObj),a._containerRightObj.destroy&&a._containerRightObj.destroy(),a._containerRightObj=null);a._containerChrome&&((b=a._containerChrome.getParent())&&b.removeChild(a._containerChrome),a._containerChrome.destroy&&a._containerChrome.destroy(),a._containerChrome=null)};
dvt.AdfDiagramNode.prototype.DestroyUndisclosedContent=function(a){var b;a._afRoot&&((b=a._afRoot.getParent())&&b.removeChild(a._afRoot),a._afRoot.destroy&&a._afRoot.destroy(),a._afRoot=null);a._containerUnderlay&&((b=a._containerUnderlay.getParent())&&b.removeChild(a._containerUnderlay),a._containerUnderlay.destroy&&a._containerUnderlay.destroy(),a._containerUnderlay=null)};
dvt.AdfDiagramNode.prototype.createNodeContents=function(a,b){var c=this.isDisclosed(),d=this.GetNodeTemplate();if(!d&&!c||c&&this.GetDiagram()._bCrossedZoomThreshold&&this._containerChrome)this._bIgnoreNextRender=!0;else{b&&(this._savedContentState=this.SaveContentState());this._copyForDelayedRemoval||this._canRemoveNodeContent()?this.RemoveOldNodeContents(b):this._copyForDelayedRemoval=this.CreateCopyForDelayedRemoval();a.setELContext(this.getData().getElAttributes());this._tabStopsNodeArray=[];
a.setTabStopsArray(this._tabStopsNodeArray);a.registerTabStop(this);this._curTabStopIdx=0;a.setContextCallback(this,this.eventContextCallback);var e=this.GetDiagram();e.panelCardEventCallback&&a.setPanelCardCallback(e,e.panelCardEventCallback);c||(this._afRoot=dvt.AfComponentFactory.parseAndStamp(a,d,this));this.HasLabel()&&((this._labelObj=this.CreateLabel(a))&&this._getContentContainer().addChildAt(this._labelObj,0),this._oldLabelBounds&&(this.setLabelBounds(this._oldLabelBounds),this._oldLabelBounds=
null),this._oldLabelPos&&(this.setLabelPosition(this._oldLabelPos),this._oldLabelPos=null),null!=this._oldLabelRotAngle&&(this.setLabelRotationAngle(this._oldLabelRotAngle),this._oldLabelRotAngle=null),this._oldLabelRotPoint&&(this.setLabelRotationPoint(this._oldLabelRotPoint),this._oldLabelRotPoint=null));if(!c&&(e=this._nodeDef.getOverlayTemplate())){d=[];if(e instanceof dvt.AfGroup){if(e.stamp(a.getELContext()).isRendered())for(var f=0;f<e.getNumChildren();f++){var g=e.getChildAt(f);g instanceof
dvt.AfPointLocation&&d.push(g)}}else e instanceof dvt.AfPointLocation&&d.push(e);e=d.length;this._overlays=[];for(--e;0<=e;e--){var h=d[e].stamp(a.getELContext()),g=f=0;try{f=parseFloat(h.getProperty(dvt.AdfDiagramParser._ATTR_POINT_X))/100,g=parseFloat(h.getProperty(dvt.AdfDiagramParser._ATTR_POINT_Y))/100}catch(k){}f||(f=0);g||(g=0);if(h=dvt.AfComponentFactory.parseAndStamp(a,d[e].getChildAt(0),this))this._overlays.push({overlay:h,position:new dvt.Point(f,g)}),this._getContentContainer().addChildAt(h,
0)}}this.isDisclosed()&&this._childNodePane&&this.addChild(this._childNodePane);this._afRoot?this._getContentContainer().addChildAt(this._afRoot,0):b&&this._bDisclosureChanged&&this.isDisclosed()&&(this._afRootPlaceholder=new dvt.Container(this.getCtx(),this.getData().getId()+"_afrp"),this._getContentContainer().addChildAt(this._afRootPlaceholder,0));c&&(this._containerChrome=this.CreateContainerChrome(),this._getContentContainer().addChildAt(this._containerChrome,0),this._nodeDef.getContainerTopTemplate()&&
(this._addContainerFacetTabStops(a,"top"),(this._containerTopObj=dvt.AfComponentFactory.parseAndStamp(a,this._nodeDef.getContainerTopTemplate(),this))&&this._containerChrome.addChild(this._containerTopObj)),this._nodeDef.getContainerBottomTemplate()&&(this._addContainerFacetTabStops(a,"bottom"),(this._containerBottomObj=dvt.AfComponentFactory.parseAndStamp(a,this._nodeDef.getContainerBottomTemplate(),this))&&this._containerChrome.addChild(this._containerBottomObj)),this._nodeDef.getContainerLeftTemplate()&&
(this._addContainerFacetTabStops(a,"left"),(this._containerLeftObj=dvt.AfComponentFactory.parseAndStamp(a,this._nodeDef.getContainerLeftTemplate(),this))&&this._containerChrome.addChild(this._containerLeftObj)),this._nodeDef.getContainerRightTemplate()&&(this._addContainerFacetTabStops(a,"right"),(this._containerRightObj=dvt.AfComponentFactory.parseAndStamp(a,this._nodeDef.getContainerRightTemplate(),this))&&this._containerChrome.addChild(this._containerRightObj)),this._updateNodeTabStops());1<this._tabStopsNodeArray.length&&
this._tabStopsNodeArray.push(this);this._nodeDef.getBackgroundTemplate()&&(a.setTabStopsArray(null),this._backgroundObj=dvt.AfComponentFactory.parseAndStamp(a,this._nodeDef.getBackgroundTemplate(),this))&&(this._backgroundObj.setMouseEnabled(!1),(c?this._containerChrome:this._getContentContainer()).addChildAt(this._backgroundObj,0),this._backgroundMouseEventCatcher=new dvt.Rect(this.getCtx(),0,0,0,0),this._backgroundMouseEventCatcher.setInvisibleFill(),this._getContentContainer().addChildAt(this._backgroundMouseEventCatcher,
1));this._stackUnderlay&&this._getContentContainer().addChildAt(this._stackUnderlay,0)}};dvt.AdfDiagramNode.prototype.CreateContainerChrome=function(){return new dvt.Rect(this.getCtx(),0,0,1,1)};
dvt.AdfDiagramNode.prototype.RenderContainerChrome=function(){this._containerChrome.setWidth(this._nodeWidth);this._containerChrome.setHeight(this._nodeHeight);this._containerChrome.setRx(this._getContainerBorderRx());this._containerChrome.setRy(this._getContainerBorderRx());this._containerChrome.setSolidFill(this._getContainerBgColor());this._containerChrome.setSolidStroke(this._getContainerBorderColor(),1,this._getContainerBorderWidth());this._setContainerChromeClipPath(this._getContainerChromeClipPathDef())};
dvt.AdfDiagramNode.prototype._setContainerChromeClipPath=function(a){var b="ctClip_"+dvt.AfComponent.genUniqueId(),b=new dvt.ClipPath(b);b.addRect(a[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_X],a[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_Y],a[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W],a[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H],a[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_RX],a[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_RY]);this._containerChrome.setClipPath(b)};
dvt.AdfDiagramNode.prototype._getContainerChromeClipPathDef=function(){var a=this._containerChrome.getDimensions(),b=[];b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_X]=a.x;b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_Y]=a.y;b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_W]=a.w;b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_H]=a.h;b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_RX]=this._containerChrome.getRx();b[dvt.AdfDiagramNode._CONTAINER_CHROME_CLIP_PATH_RY]=this._containerChrome.getRy();
return b};dvt.AdfDiagramNode.prototype.createDetailContents=function(a){if(this._nodeDef){if(!this.getNodeDef().getDetailTemplate())return;a.setELContext(this.getData().getElAttributes());a.setContextCallback(this,this.contextCallback);return this._detailContents=dvt.AfComponentFactory.parseAndStamp(a,this.getNodeDef().getDetailTemplate(),this.GetDiagram().getPanZoomCanvas().getContentPane())}return null};
dvt.AdfDiagramNode.prototype.renderDetailContents=function(a){if(this._nodeDef&&this._detailContents){var b=this.getWidth(),c=this.getHeight();a.setAvailableWidth(b);a.setAvailableHeight(c);dvt.AfComponentFactory.layoutAndRender(a,this._detailContents)}};dvt.AdfDiagramNode.prototype.isSelectable=function(){return this.isHiddenAncestor()?!1:dvt.AdfDiagramNode.superclass.isSelectable.call(this)};
dvt.AdfDiagramNode.prototype.setSelected=function(a){dvt.AdfDiagramNode.superclass.setSelected.call(this,a);this.isHiddenAncestor()||(this.RefreshSelectionEffect(),this.UpdateAccessibilityAttributes(),dvt.Agent.isTouchDevice()&&a?this.showLinkHandle():dvt.Agent.isTouchDevice()&&this.hideLinkHandle())};dvt.AdfDiagramNode.prototype.isFocused=function(){return this._bFocused};dvt.AdfDiagramNode.prototype.setFocused=function(a){this._bFocused=a};
dvt.AdfDiagramNode.prototype.setLabel=function(a){this._label=a};dvt.AdfDiagramNode.prototype.getLabel=function(){return this._label};dvt.AdfDiagramNode.prototype.setDeleteEnabled=function(a){this._deleteEnabled=a};dvt.AdfDiagramNode.prototype.isDeleteEnabled=function(){return this._deleteEnabled};
dvt.AdfDiagramNode.prototype.RefreshSelectionEffect=function(){this._bHighlight&&this._hideFeedback();this._diagram.supportsVectorEffects()||this.UpdateHighlightStrokes();var a=this.isSelectable()&&this._hover;this.getVisible()&&(a||this._bFocusEffect||this._selected)&&this._showFeedback(a||this._bFocusEffect,this._selected)};
dvt.AdfDiagramNode.prototype.AddDrawEffects=function(){if(!(dvt.Agent.isPlatformGecko()||dvt.Agent.isTouchDevice()&&dvt.Agent.isBrowserSafari())&&null==this._shadow){var a=this._diagram.getNodeStyles()[dvt.AdfDiagramNode.CSS_STYLE];a&&(this._shadow=this._diagram.CreateDropShadowFilter(a.getStyle(dvt.PanZoomComponent.BOX_SHADOW)));this._shadow&&this.addDrawEffect(this._shadow)}};
dvt.AdfDiagramNode.prototype.setStack=function(a){this._bStack!=a&&this.GetDiagram().setAutomationState(this.getData().getId(),"stack",this._bStack);(this._bStack=a)?(this._stackBadge&&(this._getContentContainer().removeChild(this._stackBadge),this._stackBadgeHandler=this._stackBadge=null),this.CreateStackBadge(),this._stackUnderlay&&this._getContentContainer().removeChild(this._stackUnderlay),this.CreateStackUnderlay()):(this._stackBadge&&(this._getContentContainer().removeChild(this._stackBadge),
this._stackBadge=null),this._stackUnderlay&&(this._getContentContainer().removeChild(this._stackUnderlay),this._stackUnderlay=null))};dvt.AdfDiagramNode.prototype.isStack=function(){return this._bStack};dvt.AdfDiagramNode.prototype.GetStackId=function(){var a,b=this._diagram.GetNodeStackMap();b&&(a=b[this.getData().getId()]);return a};dvt.AdfDiagramNode.prototype.setStackCount=function(a){this._stackCount=a};dvt.AdfDiagramNode.prototype.getStackCount=function(){return this._stackCount};
dvt.AdfDiagramNode.prototype.CreateStackBadge=function(){var a;a=1E3>=this.getStackCount()?""+this.getStackCount():"1000+";a=new dvt.OutputText(this.getCtx(),a,0,0);this.applyBadgeTextStyles(a);this._getContentContainer().addChild(a);var b;b=this._nodeWidth&&this._nodeHeight?new dvt.Rectangle(0,0,this._nodeWidth,this._nodeHeight):this.getDimensionsWithStroke();var c=a.measureDimensions(),d=c.w+6,c=c.h+2,c=new dvt.Rect(this.getCtx(),0,0,d,c);a.setTranslate(3,1);c.setTranslate(b.w+dvt.AdfDiagramNode._STACK_UNDERLAY_PADDING-
d-dvt.AdfDiagramNode._STACK_BADGE_OFFSET,-dvt.AdfDiagramNode._STACK_UNDERLAY_PADDING+dvt.AdfDiagramNode._STACK_BADGE_OFFSET);this.applyBadgeStyles(c);c.addChild(a);this._getContentContainer().addChild(c);this._stackBadge=c;this._stackBadgeHandler=new DvtAdfDiagramStackBadgeHandler(this.GetDiagram(),this);this.GetDiagram().getEventManager().associate(this._stackBadge,this._stackBadgeHandler)};
dvt.AdfDiagramNode.prototype.CreateStackUnderlay=function(){if(this._afRoot){var a=dvt.AdfDiagramNode._STACK_UNDERLAY_PADDING,b=-a,c=-a,d=this._nodeWidth+2*a,e=this._nodeHeight+2*a,a=new dvt.Rect(this.getCtx(),b,c,d,e),f=new dvt.Rect(this.getCtx(),b,c,d,e),b=new dvt.Rect(this.getCtx(),b,c,d,e);if(d=this._diagram.getStackUnderlayStyles())e=d.getStyle(dvt.CSSStyle.BACKGROUND_COLOR),c=d.getStyle(dvt.CSSStyle.BORDER_COLOR),d=d.getStyle(dvt.CSSStyle.BORDER_RADIUS),e=new dvt.SolidFill(e,1),c=this._getUnderlayStroke(c,
1,1),d=d?dvt.CSSStyle.toNumber(d):0,a.setFill(e),f.setFill(e),b.setFill(e),a.setStroke(c),f.setStroke(c),b.setStroke(c),d&&(a.setRx(d),a.setRy(d),f.setRx(d),f.setRy(d),b.setRx(d),b.setRy(d)),a.setPixelHinting(!0),f.setPixelHinting(!0),b.setPixelHinting(!0);f.setTranslate(dvt.AdfDiagramNode._STACK_UNDERLAY_OFFSET,-dvt.AdfDiagramNode._STACK_UNDERLAY_OFFSET);b.setTranslate(2*dvt.AdfDiagramNode._STACK_UNDERLAY_OFFSET,2*-dvt.AdfDiagramNode._STACK_UNDERLAY_OFFSET);c=new dvt.Container(this.getCtx());c.addChild(b);
c.addChild(f);c.addChild(a);this._getContentContainer().addChildAt(c,0);this._stackUnderlay=c}};dvt.AdfDiagramNode.prototype.getCategories=function(){return this.getData().getAttributeGroups()};dvt.AdfDiagramNode.prototype.getDisplayables=function(){var a=[];a.push(this._getContentContainer());return a};dvt.AdfDiagramNode.prototype.InsertNodeIntoParent=function(a){if(a){this.getParent()==a&&a.removeChild(this);var b=this.GetPreferredInsertLocation(a);-1!=b?a.addChildAt(this,b):a.addChild(this)}};
dvt.AdfDiagramNode.prototype.GetPreferredInsertLocation=function(a){for(var b=a.getNumChildren()-1;0<=b;b--){var c=a.getChildAt(b);if(c instanceof dvt.AdfDiagramNode){if(!dvt.AdfDiagramNode._CHANGE_Z_ORDER_ON_HIGHLIGHT||this!=c&&(this._bHoverEffect||this.isSelected()&&!c._bHoverEffect||!this._bHoverEffect&!this.isSelected()&&!c._bHoverEffect&&!c.isSelected()))return b+1}else if(c instanceof dvt.AdfDiagramLink&&!c._bCrossContainerLink)return b+1}return-1};
dvt.AdfDiagramNode.prototype.GetParentContainer=function(){var a=null,b=this.GetDiagram();b&&(a=this._nodeParent,a||(a=b._nodesPane));return a};
dvt.AdfDiagramNode.prototype.setVisible=function(a){this._bVisible!=a&&this.GetDiagram().setAutomationState(this.getData().getId(),"visible",this._bVisible);dvt.AdfDiagramNode.superclass.setVisible.call(this,a);var b=this.GetDiagram();if(b){var c=this.GetParentContainer(),d=c.contains(this);a&&!d?(this.InsertNodeIntoParent(c),this.FullRenderNode(),this._cachedDiagram=null):!a&&d&&(c.removeChild(this),this._cachedDiagram=b)}DvtAdfDiagramOverviewUtils.SetNodeVisible(b,this,a)};
dvt.AdfDiagramNode.prototype.FullRenderNode=function(a){var b=this.GetDiagram().createAfContext(this.getData().getId());a&&(this._zoom=-1);this.createNodeContents(b);this.renderNode(b)};
dvt.AdfDiagramNode.prototype.FullRenderContainerFacet=function(a,b,c,d,e,f){if(!a)return null;var g=this.GetDiagram().createAfContext(this.getData().getId());g.setContextCallback(this,this.eventContextCallback);this._addContainerFacetTabStops(g,b);a=dvt.AfComponentFactory.parseAndStamp(g,a,this);var h=b=null;a&&this._containerChrome&&(this._containerChrome.addChild(a),g.setAvailableWidth(c),g.setAvailableHeight(d),b={w:c,h:d},dvt.AfComponentFactory.layoutAndRender(g,a),h=dvt.AfComponentFactory.getBounds(a),
e&&h.w<e&&(g.setAvailableWidth(e),b={w:e,h:d},dvt.AfComponentFactory.layoutAndRender(g,a),h=dvt.AfComponentFactory.getBounds(a)),f&&h.h<f&&(g.setAvailableHeight(f),b={w:c,h:f},dvt.AfComponentFactory.layoutAndRender(g,a),h=dvt.AfComponentFactory.getBounds(a)));return{facetObj:a,facetAvailBounds:b,facetBounds:h}};dvt.AdfDiagramNode.prototype.eventContextCallback=function(a){a&&(a[dvt.BaseComponentEvent.CLIENT_ROW_KEY]=this.getData().getId());this.GetDiagram().HideNodeTransientToolbar()};
dvt.AdfDiagramNode.prototype.getContextCallback=function(){return this.eventContextCallback};dvt.AdfDiagramNode.prototype.getContextCallbackObj=function(){return this};dvt.AdfDiagramNode.prototype.isDoubleClickable=function(){return this.getData().getHasAnchorListener()};
dvt.AdfDiagramNode.prototype.setPartiallyExpanded=function(a){this._bPartialExpand!=a&&this.GetDiagram().setAutomationState(this.getData().getId(),"partialExpand",this._bPartialExpand);this._bPartialExpand=a;this._partialExpandIndicator&&(this._partialExpandIndicatorContainer.removeChild(this._partialExpandIndicator),this._partialExpandHandler=this._partialExpandIndicator=null);a&&this.CreatePartialExpandIndicator()};dvt.AdfDiagramNode.prototype.isPartiallyExpanded=function(){return this._bPartialExpand};
dvt.AdfDiagramNode.prototype.CreatePartialExpandIndicator=function(){if(this.getData().isShowNodeActions()&&this.getData().isShowIsolate()){var a=0,b=0;this._partialExpandIndicator=new dvt.Image(this.getCtx(),this._diagram.getResourcesMap().additionalLinksIndicatorEna,0,0,18,18);var c,d;this._stackUnderlay&&this._stackUnderlay instanceof dvt.Container&&0<this._stackUnderlay.getNumChildren()&&(d=this._stackUnderlay.getChildAt(this._stackUnderlay.getNumChildren()-1),d.getWidth&&d.getHeight&&(this._partialExpandIndicatorContainer=
this._stackUnderlay,d.getX&&d.getY&&(a=d.getX(),b=d.getY()),c=new dvt.Rectangle(0,0,d.getWidth(),d.getHeight())));c||(this._partialExpandIndicatorContainer=this._getContentContainer(),c=this._nodeWidth&&this._nodeHeight?new dvt.Rectangle(0,0,this._nodeWidth,this._nodeHeight):this.getDimensionsWithStroke());a+=.5*((c?c.w:0)-18);b+=(c?c.h:0)-9;this._partialExpandIndicator.setTranslate(a,b);this._partialExpandHandler=new DvtAdfDiagramNodeExpandHandler(this.GetDiagram(),this.getData().getId());this.GetDiagram().getEventManager().associate(this._partialExpandIndicator,
this._partialExpandHandler);this._partialExpandIndicatorContainer.addChild(this._partialExpandIndicator)}};dvt.AdfDiagramNode.prototype._createCircle=function(a,b,c,d,e){a=new dvt.Circle(this.getCtx(),a,b,c);d=new dvt.SolidFill(d,1);a.setFill(d);e=new dvt.SolidStroke(e);a.setStroke(e);return a};dvt.AdfDiagramNode.prototype.getLabelBounds=function(){var a=null;this._labelObj&&(a=this._labelDims?this._labelDims:this._labelObj.getDimensions());return a};dvt.AdfDiagramNode.prototype.setLabelBounds=function(a){};
dvt.AdfDiagramNode.prototype.getLayoutBounds=function(){return this._layoutBounds?this._layoutBounds:this.getContentBounds()};dvt.AdfDiagramNode.prototype.getContentBounds=function(){return new dvt.Rectangle(0,0,this._nodeWidth,this._nodeHeight)};
dvt.AdfDiagramNode.prototype.CalcLayoutBounds=function(){var a=this.getContentBounds();this._containerBadge&&(a=a.getUnion(this._containerBadge.getDimensions(this)));this._containerUnderlay&&(a=a.getUnion(this._containerUnderlay.getDimensions(this)));this._stackBadge&&(a=a.getUnion(this._stackBadge.getDimensions(this)));this._stackUnderlay&&(a=a.getUnion(this._stackUnderlay.getDimensions(this)));this._partialExpandIndicator&&(a=a.getUnion(this._partialExpandIndicator.getDimensions(this)));if(this._overlays)for(var b=
0;b<this._overlays.length;b++)a=a.getUnion(this._overlays[b].overlay.getDimensions(this));return a};
dvt.AdfDiagramNode.prototype.GetFlyOutsArray=function(a){var b=[],c=[];this.getData().isShowIsolate()&&a.IsNodeIsolateValid(this.getData().getId())&&c.push("isolate");this.isContainer()&&!this.isHiddenAncestor()&&this.getData().isShowDrill()&&c.push("drill");this.isPartiallyExpanded()&&this.getData().isShowIsolate()&&c.push("partial_expand");this.getData().isShowStack()&&(this.isStack()?(c.push("stack_preview"),c.push("stack_explode")):this.isRestackable()&&c.push("stack_restack"));!a.isReadOnly()&&
this.isDeleteEnabled()&&c.push("delete");a=Math.min(c.length,dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW);var d=Math.ceil(c.length/dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW);dvt.Agent.isRightToLeft(this.getCtx())&&c.reverse();for(var e=0;e<c.length;e++){var f=e%dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW,g=Math.floor(e/dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW),h=0==e,k=e==dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW-1||e<dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW&&
e==c.length-1,l=e==c.length-1||f==a-1&&g==d-2&&0<c.length%dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW,f=0==f&&g==d-1;switch(c[e]){case "isolate":h=this.CreateIsolateFlyOut(h,k,f,l);b.push(h);break;case "container":g=null;(g=this.isDisclosed()?this.CreateContainerCloseFlyOut(h,k,f,l):this.CreateContainerOpenFlyOut(h,k,f,l))&&b.push(g);break;case "drill":h=this.CreateDrillFlyOut(h,k,f,l);b.push(h);break;case "partial_expand":h=this.CreatePartialExpandFlyOut(h,k,f,l);b.push(h);break;case "stack_preview":h=
this.CreateStackPreviewFlyOut(h,k,f,l);b.push(h);break;case "stack_explode":h=this.CreateStackExplodeFlyOut(h,k,f,l);b.push(h);break;case "stack_restack":h=this.CreateStackRestackFlyOut(h,k,f,l);b.push(h);break;case "delete":h=this.CreateDeleteFlyOut(h,k,f,l),b.push(h)}}return b};
dvt.AdfDiagramNode.prototype.CreateFlyOuts=function(a){var b=new dvt.Container(this.getCtx(),this.getData().getId()+"_flyOut");a.addChild(b);a=this.GetFlyOutsArray(a);for(var c=0;c<a.length;c++)b.addChild(a[c]);for(var d=a.length,e=Math.ceil(d/dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW),c=0;c<d;c++){var f=Math.floor(c/dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW),g=a[c];g.setTranslate(c%dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_BUTTONS_PER_ROW*g.getWidth(),-e*g.getHeight()+f*g.getHeight())}this._flyOuts=
b};dvt.AdfDiagramNode.prototype.getFlyOutButtonById=function(a){if(this._flyOuts)for(var b=this._flyOuts.getNumChildren(),c=0;c<b;c++){var d=this._flyOuts.getChildAt(c);if(d.getId()==a||("unstacking"==d.getId()||"restacking"==d.getId())&&"stacking"==a)return d.getButton()}return null};dvt.AdfDiagramNode.prototype.ApplyTransientToolbarShadow=function(){};
dvt.AdfDiagramNode.prototype.CreateTransientToolbarShadow=function(){var a=this._diagram.getDiagramButtonStyles();return this._diagram.CreateDropShadowFilter(a&&a[dvt.PanZoomComponent.BOX_SHADOW]?a[dvt.PanZoomComponent.BOX_SHADOW]:dvt.AdfDiagramNode._TOOLBAR_SHADOW_STYLE)};dvt.AdfDiagramNode.prototype.RefreshTransientToolbar=function(){if(this.isFlyOutEnabled()){var a=this._flyOutsPos;this.HideFlyOuts(!0);this._flyOutsPos=a;this.ShowFlyOuts(!0)}};
dvt.AdfDiagramNode.prototype.ShowTransientToolbar=function(a){this.isFlyOutEnabled()&&(this.CancelFlyInAnim(),this._diagram.SetTransientToolbarDataId(this.getData().getId()),this.ShowFlyOuts(!1,a))};dvt.AdfDiagramNode.prototype.HideTransientToolbar=function(a){this._diagram.SetTransientToolbarDataId(null);this.HideFlyOuts(a)};
dvt.AdfDiagramNode.prototype.ShowFlyOuts=function(a,b){this._flyOuts&&b&&this.PositionFlyOuts(b);if(!this._flyOuts&&!this._flyOutAnim){var c=.5;this.IsTransientToolbarOnClick()&&(c=0);this._flyInAnim&&(this._flyInAnim.isRunning()&&this._flyInAnim.stop(!0),this._flyInAnim=null,c=0);var d=this.GetDiagram();this.CreateFlyOuts(d);this.PositionFlyOuts(b);a?this.ApplyTransientToolbarShadow():(this._flyOutAnim=new dvt.AnimPopIn(this.getCtx(),this._flyOuts,!0,.25,c),dvt.Playable.appendOnEnd(this._flyOutAnim,
this.OnFlyOutEnd,this),this._flyOutAnim.play())}};
dvt.AdfDiagramNode.prototype.PositionFlyOuts=function(a){if(a){var b=this._flyOuts.getDimensions(),c=dvt.Agent.isTouchDevice()?17:7,d=new dvt.Point(a.x-.5*b.w,a.y-c);b.x=d.x;b.y=d.y-b.h;3<=b.y?3>b.x?d.x=3:b.x+b.w>this.GetDiagram().getWidth()-3&&(d.x=this.GetDiagram().getWidth()-3-b.w):(d.y+=3-b.y,d.x=a.x+c,d.x+b.w>this.GetDiagram().getWidth()-3&&(d.x=a.x-c-b.w));this._flyOutsPos=a=this.GetDiagram().stageToLocal(d)}else a=this._flyOutsPos?this._flyOutsPos:this.GetDiagram().stageToLocal(this.localToStage(new dvt.Point(0,
0)));a&&this._flyOuts.setTranslate(a.x,a.y)};
dvt.AdfDiagramNode.prototype.HideFlyOuts=function(a){if(this._flyOuts&&!this._flyInAnim){this._flyOutsPos=null;if(this._flyOutAnim){if(this._flyOutAnim.isRunning()){var b=this._flyOuts.getAlpha();this._flyOutAnim.stop(!0);this._flyOuts.setAlpha(b)}this._flyOutAnim=null}a?this.OnFlyInEnd():(this._flyOuts.removeAllDrawEffects(),this.getCtx().getDocumentUtils().fixGeckoContainerForFilter&&this.getCtx().getDocumentUtils().fixGeckoContainerForFilter(this._flyOuts.getParent()),this._flyInAnim=new dvt.AnimPopOut(this.getCtx(),
this._flyOuts,!0,.25),this._flyInAnim.setOnEnd(this.OnFlyInEnd,this),this._flyInAnim.play())}};dvt.AdfDiagramNode.prototype.OnFlyOutEnd=function(){this._flyOutAnim=null;this.ApplyTransientToolbarShadow()};dvt.AdfDiagramNode.prototype.OnFlyInEnd=function(){if(!this._bFlyInAnimCanceled){this._flyInAnim=null;if(this._flyOuts){var a=this._flyOuts.getParent();a&&a.removeChild(this._flyOuts);this._flyOuts.destroy&&this._flyOuts.destroy();this._flyOuts=null}(a=this.getCtx().getTooltipManager())&&a.hideTooltip()}};
dvt.AdfDiagramNode.prototype.CreateIsolateFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().isolateEna,f=this._diagram.getResourcesMap().isolateOvr,g=this._diagram.getResourcesMap().isolateDwn,h=this._diagram.getResourcesMap().isolateTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"isolate",this.HandleIsolate)};
dvt.AdfDiagramNode.prototype.CreateDrillFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().drillEna,f=this._diagram.getResourcesMap().drillOvr,g=this._diagram.getResourcesMap().drillDwn,h=this._diagram.getResourcesMap().drillTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"drill",this.HandleDrill)};
dvt.AdfDiagramNode.prototype.CreatePartialExpandFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().additionalLinksEna,f=this._diagram.getResourcesMap().additionalLinksOvr,g=this._diagram.getResourcesMap().additionalLinksDwn,h=this._diagram.getResourcesMap().additionalLinksTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"additionalLinks",this.HandlePartialExpand)};
dvt.AdfDiagramNode.prototype.CreateContainerOpenFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().discloseCollapsedEna,f=this._diagram.getResourcesMap().discloseCollapsedOvr,g=this._diagram.getResourcesMap().discloseCollapsedDwn,h=this._diagram.getResourcesMap().discloseCollapsedTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"disclose",this.HandleContainerOpen)};
dvt.AdfDiagramNode.prototype.CreateContainerCloseFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().discloseExpandedEna,f=this._diagram.getResourcesMap().discloseExpandedOvr,g=this._diagram.getResourcesMap().discloseExpandedDwn,h=this._diagram.getResourcesMap().discloseExpandedTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"disclose",this.HandleContainerClose)};
dvt.AdfDiagramNode.prototype.CreateStackPreviewFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().stackPreviewEna,f=this._diagram.getResourcesMap().stackPreviewOvr,g=this._diagram.getResourcesMap().stackPreviewDwn,h=this._diagram.getResourcesMap().stackPreviewTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"stackPreview",this.HandleStackPreview)};
dvt.AdfDiagramNode.prototype.CreateStackExplodeFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().unstackEna,f=this._diagram.getResourcesMap().unstackOvr,g=this._diagram.getResourcesMap().unstackDwn,h=this._diagram.getResourcesMap().unstackTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"unstacking",this.HandleStackExplode)};
dvt.AdfDiagramNode.prototype.CreateStackRestackFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().restackEna,f=this._diagram.getResourcesMap().restackOvr,g=this._diagram.getResourcesMap().restackDwn,h=this._diagram.getResourcesMap().restackTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"restacking",this.HandleStackRestack)};
dvt.AdfDiagramNode.prototype.CreateDeleteFlyOut=function(a,b,c,d){var e=this._diagram.getResourcesMap().deleteEna,f=this._diagram.getResourcesMap().deleteOvr,g=this._diagram.getResourcesMap().deleteDwn,h=this._diagram.getResourcesMap().deleteTip;return this.CreateFlyOutButton(this.getCtx(),e,f,g,h,a,b,c,d,"delete",this.HandleDelete)};
dvt.AdfDiagramNode.prototype.CreateFlyOutButton=function(a,b,c,d,e,f,g,h,k,l,m){a=new DvtAdfDiagramFlyOutButton(a,b,c,d,e,this.GetDiagram().getEventManager(),f,g,h,k,this._diagram.getDiagramButtonStyles(),l,m,this);dvt.Agent.isTouchDevice()||(a.addEvtListener(dvt.MouseEvent.MOUSEOVER,this.HandleFlyOutMouseOver,!1,this),a.addEvtListener(dvt.MouseEvent.MOUSEOUT,this.HandleFlyOutMouseOut,!1,this));return a};
dvt.AdfDiagramNode.prototype.HandleFlyOutMouseOver=function(a){this.IsTransientToolbarOnClick()||this.CancelFlyInAnim()};dvt.AdfDiagramNode.prototype.HandleFlyOutMouseOut=function(a){this.IsTransientToolbarOnClick()||this.HideFlyOuts()};
dvt.AdfDiagramNode.prototype.CancelFlyInAnim=function(a){this._flyInAnim&&(this._flyInAnim.isRunning()&&(this._bFlyInAnimCanceled=!0,this._flyInAnim.stop(),this._bFlyInAnimCanceled=!1),this._flyInAnim=null);this._flyOuts&&(this._flyOutAnim&&this._flyOutAnim.isRunning()||this._flyOuts.setAlpha(dvt.AdfDiagramNode._TRANSIENT_TOOLBAR_ALPHA))};
dvt.AdfDiagramNode.prototype.HandleIsolate=function(a,b,c,d){dvt.EventManager.consumeEvent(a);d=d?d:0;this._bStack?this.GetDiagram().isolateStack(this.getData().getId(),d,dvt.AdfDiagram.ISOLATE_TYPE_INTERSECT,c):this.GetDiagram().isolateNode(this.getData().getId(),d,dvt.AdfDiagram.ISOLATE_TYPE_INTERSECT,c);this.ClickedFlyOutButton()};dvt.AdfDiagramNode.prototype.HandleDrill=function(a,b,c){dvt.EventManager.consumeEvent(a);this.GetDiagram().drillNode(this.getData().getId(),c);this.ClickedFlyOutButton()};
dvt.AdfDiagramNode.prototype.HandlePartialExpand=function(a){dvt.EventManager.consumeEvent(a);a=this.GetDiagram();var b=!1,c=a.getAttributeGroups();if(c&&(c=a.CreateStackName(this.getData().getId(),c))){var d=a.getExplodedStacks();d&&-1!=dvt.ArrayUtils.getIndex(d,c)||(b=!0)}b?a.isolateStack(this.getData().getId(),1,dvt.AdfDiagram.ISOLATE_TYPE_UNION):a.isolateNode(this.getData().getId(),1,dvt.AdfDiagram.ISOLATE_TYPE_UNION);this.ClickedFlyOutButton()};
dvt.AdfDiagramNode.prototype.HandleRestore=function(a,b,c){dvt.EventManager.consumeEvent(a);this.GetDiagram().restore(c);this.ClickedFlyOutButton()};dvt.AdfDiagramNode.prototype.HandleContainerOpen=function(a,b,c){dvt.EventManager.consumeEvent(a);a=this.getData().getId();this.GetDiagram().setNodeDisclosed(a,!0,c);this.ClickedFlyOutButton()};
dvt.AdfDiagramNode.prototype.HandleContainerClose=function(a,b,c){dvt.EventManager.consumeEvent(a);a=this.getData().getId();this.GetDiagram().setNodeDisclosed(a,!1,c);this.ClickedFlyOutButton()};dvt.AdfDiagramNode.prototype.HandleStackPreview=function(a){dvt.EventManager.consumeEvent(a);this._stackBadgeHandler.ShowDialog(a);this.ClickedFlyOutButton()};
dvt.AdfDiagramNode.prototype.HandleDelete=function(a){dvt.EventManager.consumeEvent(a);a=[this.getData().getId()];a=new dvt.AdfDiagramDeleteNodeEvent(a);this.GetDiagram().dispatchEvent(a)};dvt.AdfDiagramNode.prototype.ShowStackPreview=function(a){this._stackBadgeHandler.ShowDialog(null,a)};dvt.AdfDiagramNode.prototype.HideStackPreview=function(a){this._stackBadgeHandler.CloseDialog(!1,a)};
dvt.AdfDiagramNode.prototype.HandleStackExplode=function(a){dvt.EventManager.consumeEvent(a);this._stackBadgeHandler.ExplodeStack();this.ClickedFlyOutButton()};
dvt.AdfDiagramNode.prototype.HandleStackRestack=function(a){dvt.EventManager.consumeEvent(a);var b=this._diagram.getAttributeGroups();a=this._diagram.getExplodedStacks();if(b&&0<b.length&&a&&0<a.length)for(var b=this._diagram.CreateStackName(this.getData().getId(),this._diagram.getAttributeGroups()),c=0;c<a.length;c++)if(b==a[c]){a.splice(c,1);this._diagram.setExplodedStacks(a);break}this.ClickedFlyOutButton()};dvt.AdfDiagramNode.prototype.ClickedFlyOutButton=function(){this.HideTransientToolbar()};
dvt.AdfDiagramNode.prototype.setFlyOutEnabled=function(a){this._bFlyOutEnabled=a};dvt.AdfDiagramNode.prototype.isFlyOutEnabled=function(){return this._bFlyOutEnabled&&this.getData().isShowNodeActions()};dvt.AdfDiagramNode.prototype.SetContainerBadgeVisible=function(a){this.isContainer()&&this._containerBadge&&(this._containerBadge.setVisible(a),this._containerBadge.setMouseEnabled(a))};
dvt.AdfDiagramNode.prototype.RefreshContainerBadgeVisibility=function(){this.isContainer()&&this._containerBadge&&this.SetContainerBadgeVisible(this._diagram.getPanZoomCanvas().getZoom()>=dvt.AdfDiagramNode._CONTAINER_BADGE_MIN_ZOOM)};
dvt.AdfDiagramNode.prototype.RefreshContainerBadge=function(){this._containerBadge&&(this._getContentContainer().removeChild(this._containerBadge),this._containerBadgeHandler=this._containerBadge=null);this.isContainer()&&this.getData().isShowExpandChildren()&&(this.CreateContainerBadge(),this.RefreshContainerBadgeVisibility())};
dvt.AdfDiagramNode.prototype.CreateContainerBadge=function(){var a=this.getCtx(),b=null,c=null,d=null;this.isDisclosed()?(b=this._diagram.getResourcesMap().discloseExpandedEna,c=this._diagram.getResourcesMap().discloseExpandedOvr,d=this._diagram.getResourcesMap().discloseExpandedDwn):(b=this._diagram.getResourcesMap().discloseCollapsedEna,c=this._diagram.getResourcesMap().discloseCollapsedOvr,d=this._diagram.getResourcesMap().discloseCollapsedDwn);b=new dvt.Image(a,b,0,0,20,20);c=new dvt.Image(a,
c,0,0,20,20);d=new dvt.Image(a,d,0,0,20,20);a=new dvt.Button(a,b,c,d,null,"disclosure");this._getContentContainer().addChild(a);this._containerBadge=a;this.PositionContainerBadge();this._containerBadgeHandler=new DvtAdfDiagramContainerBadgeHandler(this.GetDiagram(),this,a);this.GetDiagram().getEventManager().associate(this._containerBadge,this._containerBadgeHandler)};
dvt.AdfDiagramNode.prototype.PositionContainerBadge=function(a){var b=this.getContainerBadge();if(b){if(dvt.Agent.isRightToLeft(this.getCtx())){var c=this.getContentBounds(),d=b.getDimensions()?b.getDimensions().w:0,c=c.w-d;a?a.addProp(dvt.Animator.TYPE_NUMBER,b,b.getTranslateX,b.setTranslateX,c):b.setTranslateX(c)}else b.setTranslateX(0);b.setTranslateY(0)}};dvt.AdfDiagramNode.prototype.getContainerBadge=function(a){return this._containerBadge};
dvt.AdfDiagramNode.prototype.CalcChildNodePaneBounds=function(a){var b;if(this._childNodePane){b=this.GetDiagram();var c,d,e,f,g,h,k,l,m,n,p,q,r;for(c=0;c<this._childNodeIds.length;c++)if(n=this._childNodeIds[c],p=b.getNodeById(n),p.getVisible()){q=p.getLayoutBounds().clone();n=a?a.getDestVal(p,p.getTranslateX,!0):p.getTranslateX();var t=a?a.getDestVal(p,p.getTranslateY,!0):p.getTranslateY();q.x+=n;q.y+=t;l=q.x+q.w;h=q.x;m=q.y+q.h;k=q.y;p.isDisclosed()&&p._containerChrome&&(q=p._containerChrome.getStroke().getWidth()/
2,h-=q,k-=q,l+=q,m+=q);q=a?a.getDestVal(p,p.getLabelBounds,!0):p.getLabelBounds();r=a?a.getDestVal(p,p.getLabelPosition,!0):p.getLabelPosition();q&&r&&(h=a?a.getDestVal(p,p.getLabelRotationAngle,!0):p.getLabelRotationAngle(),l=a?a.getDestVal(p,p.getLabelRotationPoint,!0):p.getLabelRotationPoint(),p=p.GetRelativeLabelBounds(r,q,h,l),l=p.x+n+p.w,m=p.y+t+p.h,h=p.x+n,k=p.y+t);d?(f=Math.min(f,h),d=Math.max(d,l),g=Math.min(g,k),e=Math.max(e,m)):(f=h,d=l,g=k,e=m)}b=new dvt.Rectangle(f,g,d-f,e-g);this._childLinkIds&&
this.CalcLinkBounds(this._childLinkIds,b,a);this._crossChildLinkIds&&this.CalcLinkBounds(this._crossChildLinkIds,b,a)}b||(b=new dvt.Rectangle(0,0,0,0));return b};
dvt.AdfDiagramNode.prototype.CalcLinkBounds=function(a,b,c){for(var d,e,f,g,h=this.GetDiagram(),k=0;k<a.length;k++){var l=h.getLinkById(a[k]);if(l.getVisible()){if(g=l.getDimensionsWithStroke(c))d=Math.max(b.x+b.w,g.x+g.w),e=Math.max(b.y+b.h,g.y+g.h),f=Math.min(b.x,g.x),g=Math.min(b.y,g.y),b.x=f,b.y=g,b.w=d-f,b.h=e-g;d=c?c.getDestVal(l,l.getLabelBounds,!0):l.getLabelBounds();e=c?c.getDestVal(l,l.getLabelPosition,!0):l.getLabelPosition();d&&e&&(f=c?c.getDestVal(l,l.getLabelRotationAngle,!0):l.getLabelRotationAngle(),
g=c?c.getDestVal(l,l.getLabelRotationPoint,!0):l.getLabelRotationPoint(),l=l.GetRelativeLabelBounds(e,d,f,g),d=Math.max(l.x+l.w,b.x+b.w),e=Math.max(l.y+l.h,b.y+b.h),f=Math.min(b.x,l.x),g=Math.min(b.y,l.y),b.x=f,b.y=g,b.w=d-f,b.h=e-g)}}};dvt.AdfDiagramNode.prototype.isDragAvailable=function(a){return this.isDraggable()?this.GetDiagram().__isDragAvailable(a):null};dvt.AdfDiagramNode.prototype.getDragTransferable=function(a,b){return this.GetDiagram().__getDragTransferable(this)};
dvt.AdfDiagramNode.prototype.getDragFeedback=function(a,b){return this.GetDiagram().__getDragFeedback()};dvt.AdfDiagramNode.prototype.getDropSiteFeedback=function(){var a=this.getLayoutBounds(),b=new dvt.Point(a.x,a.y),a=new dvt.Point(a.x+a.w,a.y+a.h),b=this.localToStage(b),a=this.localToStage(a);return new dvt.Rect(this.getCtx(),b.x,b.y,a.x-b.x,a.y-b.y)};
dvt.AdfDiagramNode.prototype.__getDisplayable=function(){this.HideTransientToolbar(!0);var a=this.GetDiagram().getEditor();a&&a.processDragEnd(null,{x:0,y:0});return this};
dvt.AdfDiagramNode.prototype.CreateLabel=function(a){var b=null,c=this._nodeDef.getLabelTemplate();c?b=dvt.AfComponentFactory.parseAndStamp(a,c,this):this._label&&(b=new dvt.AfOutputText,b.setValue(this._label),this._nodeLabelStyles&&b.setInlineStyle(this._nodeLabelStyles.toString()),b=dvt.AfComponentFactory.parseAndStamp(a,b,this));return b};dvt.AdfDiagramNode.prototype.HasLabel=function(){return this._label||this._nodeDef.getLabelTemplate()};
dvt.AdfDiagramNode.prototype.GetRelativeLabelBounds=function(a,b,c,d){var e=dvt.BaseDiagramNode.CalcLabelMatrix(a,b,c,d);a=e.transformPoint(new dvt.Point(b.x,b.y));c=e.transformPoint(new dvt.Point(b.x+b.w,b.y));d=e.transformPoint(new dvt.Point(b.x,b.y+b.h));b=e.transformPoint(new dvt.Point(b.x+b.w,b.y+b.h));var e=Math.min(Math.min(a.x,c.x),Math.min(d.x,b.x)),f=Math.min(Math.min(a.y,c.y),Math.min(d.y,b.y));return new dvt.Rectangle(e,f,Math.max(Math.max(a.x,c.x),Math.max(d.x,b.x))-e,Math.max(Math.max(a.y,
c.y),Math.max(d.y,b.y))-f)};dvt.AdfDiagramNode.prototype.getContainerTopHeight=function(){return this._containerTopBounds?this._containerTopBounds.h:0};dvt.AdfDiagramNode.prototype.getContainerLeftWidth=function(){return this._containerLeftBounds?this._containerLeftBounds.w:0};
dvt.AdfDiagramNode.prototype.setContainerPadding=function(a,b){if(!this._containerPadding||!a||this._containerPadding.top!=a.top||this._containerPadding.right!=a.right||this._containerPadding.bottom!=a.bottom||this._containerPadding.left!=a.left){var c=this._containerPadding;this._containerPadding={};this._containerPadding.top=a&&null!=a.top?a.top:dvt.AdfDiagramNode._CONTAINER_PADDING;this._containerPadding.right=a&&null!=a.right?a.right:dvt.AdfDiagramNode._CONTAINER_PADDING;this._containerPadding.bottom=
a&&null!=a.bottom?a.bottom:dvt.AdfDiagramNode._CONTAINER_PADDING;this._containerPadding.left=a&&null!=a.left?a.left:dvt.AdfDiagramNode._CONTAINER_PADDING;this._childNodePaneDims&&(this.TransitionContainerPadding(c,this._containerPadding,b),this.PositionContainerBadge(b),this.GetDiagram().UpdateOverviewNode(this,b))}};dvt.AdfDiagramNode.prototype.getContainerPadding=function(){return this._containerPadding};dvt.AdfDiagramNode.prototype.SetMaxAlpha=function(a){this._maxAlpha=a};
dvt.AdfDiagramNode.prototype.GetMaxAlpha=function(){return this._maxAlpha};dvt.AdfDiagramNode.prototype._getContentContainer=function(){return this._contentPane?this._contentPane:this};
dvt.AdfDiagramNode.prototype.getNextNavigable=function(a){var b=null;if(this.isHiddenAncestor())return this.GetDiagram().getEventManager().getFocus();if(a.type==dvt.MouseEvent.CLICK||a.keyCode==dvt.KeyboardEvent.SPACE&&a.ctrlKey)return this;if(a.keyCode==dvt.KeyboardEvent.OPEN_BRACKET){if(this.isContainer()&&(a=this.getChildNodeIds())&&0<a.length)for(var c=0;c<a.length;c++)if(b=this.GetDiagram().getNodeById(a[c]),b.getVisible())return b;return this}if(a.keyCode==dvt.KeyboardEvent.CLOSE_BRACKET){if(b=
this.getData().getGroupId())if(b=this.GetDiagram().getNodeById(b),b.getVisible()&&!b.isHiddenAncestor())return b;return this}if((a.keyCode==dvt.KeyboardEvent.OPEN_ANGLED_BRACKET||dvt.KeyboardEvent.CLOSE_ANGLED_BRACKET)&&a.altKey){var c=this.GetDiagram().getNavigableLinksForNodeId(this.getData().getId()),d=this._diagram.getEventManager().getKeyboardHandler();d&&d.getFirstNavigableLink&&(b=d.getFirstNavigableLink(this,a,c));b?b.setKeyboardFocusNode(this):b=this;return b}c=[];if(b=this.getData().getGroupId())for(var b=
this.GetDiagram().getNodeById(b),d=b.getChildNodeIds(),e=0;e<d.length;e++)b=this.GetDiagram().getNodeById(d[e]),b.getVisible()&&c.push(b);else c=this._diagram.getSortedVisibleNodesByGroupDepth()[0];(b=dvt.KeyboardHandler.getNextAdjacentNavigable(this,a,c))&&(a=this.GetDiagram().getEditor())&&a.getLinkCreateWithKeyboard()&&this._diagram.isLinkToolEnabled()&&a.processLinkCreateWithKeyboard(b);return b};
dvt.AdfDiagramNode.FindGroupDepth=function(a,b){for(var c=0;c<b.length;c++)for(var d=b[c],e=0;e<d.length;e++)if(a==d[e])return c;return-1};dvt.AdfDiagramNode.prototype.showKeyboardFocusEffect=function(a){a||this.GetDiagram().HideNodeTransientToolbar(!0);this.ShowKeyboardFocusEffect(a);a||(this._bFocusEffect=!0,this.setFocused(!0),this._curTabStopIdx=0)};
dvt.AdfDiagramNode.prototype.ShowKeyboardFocusEffect=function(a){this.showHoverEffect();this.IsTransientToolbarOnClick()||a||!this.isFlyOutEnabled()||(this.CancelFlyInAnim(),this.ShowFlyOuts())};dvt.AdfDiagramNode.prototype.hideKeyboardFocusEffect=function(a){var b=this._bFocusEffect;this._bFocusEffect=!1;this.HideKeyboardFocusEffect(a);a?this._bFocusEffect=b:(this.resetTabStops(),this.setFocused(!1))};
dvt.AdfDiagramNode.prototype.HideKeyboardFocusEffect=function(a){this._hover||this.hideHoverEffect();this.IsTransientToolbarOnClick()||a||this.HideFlyOuts(!0)};dvt.AdfDiagramNode.prototype.isShowingKeyboardFocusEffect=function(){return this._bFocusEffect};dvt.AdfDiagramNode.prototype.GetAfComponentRoot=function(){return dvt.AfComponentFactory.getCompTree(this._afRoot)};
dvt.AdfDiagramNode.prototype.getAfComponent=function(a){var b=this.GetAfComponentRoot();if(b=dvt.AfComponentFactory.findAfComponent(b,a))return b;if(this._overlays)for(var c=0;c<this._overlays.length;c++)if(b=dvt.AfComponentFactory.getAfComponent(this._overlays[c].overlay),b=dvt.AfComponentFactory.findAfComponent(b,a))return b;return this.isDisclosed()&&(this._containerTopObj&&(b=dvt.AfComponentFactory.getAfComponent(this._containerTopObj),b=dvt.AfComponentFactory.findAfComponent(b,a))||this._containerBottomObj&&
(b=dvt.AfComponentFactory.getAfComponent(this._containerBottomObj),b=dvt.AfComponentFactory.findAfComponent(b,a))||this._containerRightObj&&(b=dvt.AfComponentFactory.getAfComponent(this._containerRightObj),b=dvt.AfComponentFactory.findAfComponent(b,a))||this._containerLeftObj&&(b=dvt.AfComponentFactory.getAfComponent(this._containerLeftObj),b=dvt.AfComponentFactory.findAfComponent(b,a)))?b:null};
dvt.AdfDiagramNode.prototype.getShowPopupBehaviors=function(){if(!this._showPopupBehaviors&&this._nodeDef.getShowPopupBehaviors()){var a=this._nodeDef.getShowPopupBehaviors(),b=this.GetDiagram().createAfContext(this.getData().getId());this._showPopupBehaviors=[];for(var c=0;c<a.length;c++)this._showPopupBehaviors[c]=dvt.AfComponentFactory.parseAndStamp(b,a[c],null)}return this._showPopupBehaviors};
dvt.AdfDiagramNode.prototype.getClientBehaviors=function(){if(this.isDisclosed())return null;if(!this._clientBehaviors&&this._nodeDef.getClientBehaviors()){var a=this._nodeDef.getClientBehaviors(),b=this.GetDiagram().createAfContext(this.getData().getId());this._clientBehaviors=[];for(var c=0;c<a.length;c++)this._clientBehaviors[c]=dvt.AfComponentFactory.parseAndStamp(b,a[c],null)}return this._clientBehaviors};
dvt.AdfDiagramNode.prototype.getPopupBounds=function(a){return a&&(a=a.getAlignId())&&this.getNodeDef().getId()==a?this.GetNodePopupBounds():null};dvt.AdfDiagramNode.prototype.GetNodePopupBounds=function(){var a=this.getContentBounds(),b=this.localToStage(new dvt.Point(a.x,a.y)),a=this.localToStage(new dvt.Point(a.x+a.w,a.y+a.h));return new dvt.Rectangle(b.x,b.y,a.x-b.x,a.y-b.y)};
dvt.AdfDiagramNode.prototype.findComponentPopupBounds=function(a){if(this.getNodeDef().getId()==a)return this.GetNodePopupBounds();var b=null;if(this.isDisclosed()){if(this._containerTopObj){var c=this._containerTopObj._compTree;c&&(b=dvt.AdfDiagramNode.FindAfComponent(a,c))}!b&&this._containerBottomObj&&(c=this._containerBottomObj._compTree)&&(b=dvt.AdfDiagramNode.FindAfComponent(a,c));!b&&this._containerLeftObj&&(c=this._containerLeftObj._compTree)&&(b=dvt.AdfDiagramNode.FindAfComponent(a,c));!b&&
this._containerRightObj&&(c=this._containerRightObj._compTree)&&(b=dvt.AdfDiagramNode.FindAfComponent(a,c))}else this._afRoot&&(c=this._afRoot._compTree)&&(b=dvt.AdfDiagramNode.FindAfComponent(a,c));return b&&(a=b.getDisplayObj())?a.getDimensions(a.getCtx().getStage()):null};dvt.AdfDiagramNode.FindAfComponent=function(a,b){if(a==b.getId())return b;for(var c=b.getNumChildren(),d=0;d<c;d++){var e=dvt.AdfDiagramNode.FindAfComponent(a,b.getChildAt(d));if(e)return e}return null};
dvt.AdfDiagramNode.prototype.setStateProp=function(a,b){this._stateProps[a]=b};dvt.AdfDiagramNode.prototype.getStateProp=function(a){return this._stateProps[a]};dvt.AdfDiagramNode.prototype._setContainerFacetScale=function(a,b,c,d){a?(a.addProp(dvt.Animator.TYPE_NUMBER,b,b.getScaleX,b.setScaleX,c),a.addProp(dvt.Animator.TYPE_NUMBER,b,b.getScaleY,b.setScaleY,d)):b.setScale(c,d)};
dvt.AdfDiagramNode.prototype._setContainerFacetTranslate=function(a,b,c,d){a?(a.addProp(dvt.Animator.TYPE_NUMBER,b,b.getTranslateX,b.setTranslateX,c),a.addProp(dvt.Animator.TYPE_NUMBER,b,b.getTranslateY,b.setTranslateY,d)):b.setTranslate(c,d)};dvt.AdfDiagramNode.prototype.getContainerStyle=function(){return this._containerStyle};dvt.AdfDiagramNode.prototype.setContainerStyle=function(a){this._containerStyle=a};dvt.AdfDiagramNode.prototype.getOverviewStyle=function(){return this._overviewStyle};
dvt.AdfDiagramNode.prototype.setOverviewStyle=function(a){this._overviewStyle=a};dvt.AdfDiagramNode.prototype.getOverviewContainerStyle=function(){return this._overviewContainerStyle};dvt.AdfDiagramNode.prototype.setOverviewContainerStyle=function(a){this._overviewContainerStyle=a};dvt.AdfDiagramNode.prototype._getContainerBgColor=function(){if(this._containerStyle){var a=this._containerStyle.getStyle(dvt.CSSStyle.BACKGROUND_COLOR);if(a)return a}return this._defaultContainerBgColor};
dvt.AdfDiagramNode.prototype._getContainerBorderColor=function(){if(this._containerStyle){var a=this._containerStyle.getStyle(dvt.CSSStyle.BORDER_COLOR);if(a)return a}return this._defaultContainerBorderColor};dvt.AdfDiagramNode.prototype._getContainerBorderRx=function(){if(this._containerStyle){var a=this._containerStyle.getStyle(dvt.CSSStyle.BORDER_RADIUS);if(a)return dvt.CSSStyle.toNumber(a)}return this._defaultContainerBorderRx};
dvt.AdfDiagramNode.prototype._getContainerBorderWidth=function(){if(this._containerStyle){var a=this._containerStyle.getStyle(dvt.CSSStyle.BORDER_WIDTH);if(a)return dvt.CSSStyle.toNumber(a)}return null};dvt.AdfDiagramNode.prototype.applyBadgeTextStyles=function(a){var b=new dvt.CSSStyle;b.setStyle(dvt.CSSStyle.FONT_FAMILY,dvt.AfStyleUtils.getDefaultFontFamily());var c=this._diagram.getStackBadgeStyles();c&&b.merge(c);a.setCSSStyle(b)};
dvt.AdfDiagramNode.prototype.applyBadgeStyles=function(a){var b,c,d,e=this._diagram.getStackBadgeStyles();e&&(b=e.getStyle(dvt.CSSStyle.BACKGROUND_COLOR),c=e.getStyle(dvt.CSSStyle.BORDER_COLOR),(d=e.getStyle(dvt.CSSStyle.BORDER_RADIUS))&&(d=dvt.CSSStyle.toNumber(d)));b=new dvt.SolidFill(b);a.setFill(b);c&&(c=this._getUnderlayStroke(c),a.setStroke(c));d&&(a.setRx(d),a.setRy(d));a.setPixelHinting(!0)};
dvt.AdfDiagramNode.prototype.getAncestors=function(){var a=[],b=this.getData().getGroupId();b&&(a=this.GetDiagram().getNodeById(b).getAncestors(),a.splice(0,0,b));return a};
dvt.AdfDiagramNode.prototype.getAccessibilityStates=function(){var a=[];this.isSelectable()&&a.push(dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,this.isSelected()?"STATE_SELECTED":"STATE_UNSELECTED"));this.isContainer()&&a.push(this.isDisclosed()?dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"STATE_EXPANDED"):dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"STATE_COLLAPSED"));this.isStack()&&(a.push(dvt.Bundle.getTranslatedString(dvt.Bundle.ADF_DIAGRAM_PREFIX,"STATE_STACKED")),
a.push(dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"COLON_SEP_LIST",[dvt.Bundle.getTranslatedString(dvt.Bundle.ADF_DIAGRAM_PREFIX,"SIZE"),this.getStackCount()])));this.isPartiallyExpanded()&&this.getData().isShowIsolate()&&a.push(dvt.Bundle.getTranslatedString(dvt.Bundle.ADF_DIAGRAM_PREFIX,"STATE_HAS_ADDITIONAL_LINKS"));return a};dvt.AdfDiagramNode.prototype.getAriaLabel=function(){return dvt.Displayable.generateAriaLabel(this.getShortDesc(),this.getAccessibilityStates())};
dvt.AdfDiagramNode.prototype.UpdateAccessibilityAttributes=function(){if(!dvt.Agent.deferAriaCreation()){var a=this.getAriaLabel();a&&this.setAriaProperty("label",a)}};dvt.AdfDiagramNode.prototype.addAccessibilityAttributes=function(){this.setAriaRole("group");if(!dvt.Agent.deferAriaCreation()){var a=this.getAriaLabel();a&&this.setAriaProperty("label",a)}};
dvt.AdfDiagramNode.prototype.HandleKeyboardEvent=function(a){var b=a.keyCode;if(b==dvt.KeyboardEvent.ENTER)if((b=this.GetDiagram().getEditor())&&b.getLinkCreateWithKeyboard()&&this._diagram.isLinkToolEnabled())for(a=[],b.processLinkCreateEnd(this,null,a),b=0;b<a.length;b++)this.GetDiagram().dispatchEvent(a[b]);else if(a.altKey)this.getData().isShowStack()&&this.isStack()&&this.HandleStackPreview(null);else if(a.shiftKey)this.getData().isShowIsolate()&&this.GetDiagram().IsNodeIsolateValid(this.getData().getId())?
this.HandleIsolate(null):this.getData().isShowIsolate()&&this.HandleRestore(null);else if(this.isContainer()&&!this.isHiddenAncestor()&&this.getData().isShowDrill())this.HandleDrill(null);else{if(b=this.getShowPopupBehaviors()){var c=this.GetDiagram().getEventManager(),d=this.localToStage(new dvt.Point(0,0));a=dvt.DomEventFactory.generateMouseEventFromKeyboardEvent(a,this.getCtx(),dvt.MouseEvent.CLICK,this.getCtx().getStage(),d.x,d.y);c.getPopupHandler().processPopupHelper(this,b,[dvt.ShowPopupBehavior.TRIGGER_TYPE_ACTION,
dvt.ShowPopupBehavior.TRIGGER_TYPE_CLICK],new dvt.Point(a.pageX,a.pageY),a)}}else b==dvt.KeyboardEvent.SINGLE_QUOTE?this.isPartiallyExpanded()&&this.getData().isShowIsolate()&&this.HandlePartialExpand(null):b==dvt.KeyboardEvent.SPACE&&a.ctrlKey&&a.shiftKey?this.isContainer()&&(a=this.getData().getId(),this._diagram.setNodeDisclosed(a,!this.isDisclosed())):dvt.KeyboardEvent.isSemicolon(a)&&a.shiftKey?this.getData().isShowStack()&&this.isStack()&&(this._stackBadgeHandler&&this._stackBadgeHandler.isDialogVisible()?
this._stackBadgeHandler.CloseDialog(!0):this.HandleStackExplode(null)):dvt.KeyboardEvent.isSemicolon(a)?this.isRestackable()&&this.HandleStackRestack(null):b==dvt.KeyboardEvent.ESCAPE&&this.getData().isShowStack()&&this.isStack()&&this._stackBadgeHandler&&this._stackBadgeHandler.isDialogVisible()&&this._stackBadgeHandler.CloseDialog()};
dvt.AdfDiagramNode.prototype.CopyState=function(a){this._nodeWidth=a._nodeWidth;this._nodeHeight=a._nodeHeight;this._labelDims=a._labelDims;this._hover=a._hover;this._bStack=a._bStack;this._bDisclosed=a._bDisclosed;this._bPartialExpand=a._bPartialExpand;this._nodeWidth100=a._nodeWidth100;this._nodeHeight100=a._nodeHeight100;this._bHiddenAncestor=a._bHiddenAncestor;this._bVisible=a._bVisible;this._stateProps=a._stateProps};
dvt.AdfDiagramNode.prototype.destroy=function(){this.DestroyDisclosedContent(this);this.DestroyUndisclosedContent(this);dvt.AdfDiagramNode.superclass.destroy.call(this)};dvt.AdfDiagramNode.prototype.CreateCustomAnimPlayable=function(){return new dvt.CustomAnimation(this.getCtx(),null,this.GetDiagram().getAnimationDuration())};
dvt.AdfDiagramNode.prototype.AnimateUpdate=function(a,b){var c=null,d=b.getVisible(),e=this.getVisible();if(d!=e)c||(c=this.CreateCustomAnimPlayable()),a.SkipDescendants(this.getData().getId(),this.GetDiagram()),d?(d=this.GetParentContainer(),b.InsertNodeIntoParent(d),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,b,b.getAlpha,b.setAlpha,0),dvt.Playable.appendOnEnd(c,function(){b.getParent().removeChild(b);b.destroy()}),this._dataAnimStackPos&&(c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,b,
b.getTranslateX,b.setTranslateX,this._dataAnimStackPos.x),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,b,b.getTranslateY,b.setTranslateY,this._dataAnimStackPos.y),this._dataAnimStackPos=null),a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_DELETE)):e&&(this.setAlpha(0),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,this.GetMaxAlpha()),this._dataAnimStackPos&&(d=this.getTranslateX(),e=this.getTranslateY(),this.setTranslate(this._dataAnimStackPos.x,this._dataAnimStackPos.y),
c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this,this.getTranslateX,this.setTranslateX,d),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this,this.getTranslateY,this.setTranslateY,e),this._dataAnimStackPos=null),a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_INSERT));else{var f=b.getTranslateX(),g=b.getTranslateY(),d=this.getTranslateX(),e=this.getTranslateY();f!=d&&(c||(c=this.CreateCustomAnimPlayable()),this.setTranslateX(f),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this,this.getTranslateX,
this.setTranslateX,d));g!=e&&(c||(c=this.CreateCustomAnimPlayable()),this.setTranslateY(g),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this,this.getTranslateY,this.setTranslateY,e));b._labelObj&&this._labelObj&&(f=b._labelObj.getMatrix(),g=this._labelObj.getMatrix(),f.equals(g)||(c||(c=this.CreateCustomAnimPlayable()),this._labelObj.setMatrix(f),c.getAnimator().addProp(dvt.Animator.TYPE_MATRIX,this._labelObj,this._labelObj.getMatrix,this._labelObj.setMatrix,g)));f=b.isDisclosed();g=this.isDisclosed();
if(f!=g)c||(c=this.CreateCustomAnimPlayable()),a.SkipDescendants(this.getData().getId(),this.GetDiagram()),this.AnimateUpdateDisclosure(a,b,c.getAnimator(),d,e),a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_UPDATE);else{b.isHiddenAncestor()!=this.isHiddenAncestor()&&(d=this.CreateCustomAnimPlayable(),this.AnimateUpdateHiddenAncestor(a,d.getAnimator()),a.add(d,this.isHiddenAncestor()?DvtAdfDiagramDataAnimationHandler.PHASE_DELETE:DvtAdfDiagramDataAnimationHandler.PHASE_INSERT));this._childNodePane&&
b._childNodePane&&(f=b._childNodePane.getTranslateX(),g=b._childNodePane.getTranslateY(),d=this._childNodePane.getTranslateX(),e=this._childNodePane.getTranslateY(),f!=d&&(c||(c=this.CreateCustomAnimPlayable()),this._childNodePane.setTranslateX(f),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getTranslateX,this._childNodePane.setTranslateX,d)),g!=e&&(c||(c=this.CreateCustomAnimPlayable()),this._childNodePane.setTranslateY(g),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,
this._childNodePane,this._childNodePane.getTranslateY,this._childNodePane.setTranslateY,e)));this._containerChrome&&(d=this._nodeWidth,e=this._nodeHeight,f=this._getContainerChromeClipPathDef(),d!=b._nodeWidth&&(c||(c=this.CreateCustomAnimPlayable()),this._containerChrome.setWidth(b._nodeWidth),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getWidth,this._containerChrome.setWidth,d)),e!=b._nodeHeight&&(c||(c=this.CreateCustomAnimPlayable()),this._containerChrome.setHeight(b._nodeHeight),
c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getHeight,this._containerChrome.setHeight,e)),d!=b._nodeWidth||e!=b._nodeHeight)&&(c||(c=this.CreateCustomAnimPlayable()),this._setContainerChromeClipPath(b._getContainerChromeClipPathDef()),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER_ARRAY,this,this._getContainerChromeClipPathDef,this._setContainerChromeClipPath,f));this._containerLeftObj&&(c||(c=this.CreateCustomAnimPlayable()),d=b._nodeHeight/this._nodeHeight,
this._setContainerFacetScale(null,this._containerLeftObj,1,d),this._setContainerFacetScale(c.getAnimator(),this._containerLeftObj,1,1));this._containerRightObj&&(c||(c=this.CreateCustomAnimPlayable()),d=b._nodeHeight/this._nodeHeight,this._setContainerFacetScale(null,this._containerRightObj,1,d),this._setContainerFacetScale(c.getAnimator(),this._containerRightObj,1,1));this._containerTopObj&&(c||(c=this.CreateCustomAnimPlayable()),d=b._nodeWidth/this._nodeWidth,this._setContainerFacetScale(null,this._containerTopObj,
d,1),this._setContainerFacetScale(c.getAnimator(),this._containerTopObj,1,1));this._containerBottomObj&&(c||(c=this.CreateCustomAnimPlayable()),d=b._nodeWidth/this._nodeWidth,this._setContainerFacetScale(null,this._containerBottomObj,d,1),this._setContainerFacetScale(c.getAnimator(),this._containerBottomObj,1,1));this._containerBadge&&b._containerBadge&&(d=this._containerBadge.getTranslateX(),e=this._containerBadge.getTranslateY(),f=b._containerBadge.getTranslateX(),g=b._containerBadge.getTranslateY(),
d!=f&&(c||(c=this.CreateCustomAnimPlayable()),this._containerBadge.setTranslateX(f),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._containerBadge,this._containerBadge.getTranslateX,this._containerBadge.setTranslateX,d)),e!=g&&(c||(c=this.CreateCustomAnimPlayable()),this._containerBadge.setTranslateY(g),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._containerBadge,this._containerBadge.getTranslateY,this._containerBadge.setTranslateY,e)));this._partialExpandIndicator&&b._partialExpandIndicator&&
(d=this._partialExpandIndicator.getTranslateX(),e=this._partialExpandIndicator.getTranslateY(),f=b._partialExpandIndicator.getTranslateX(),g=b._partialExpandIndicator.getTranslateY(),d!=f&&(c||(c=this.CreateCustomAnimPlayable()),this._partialExpandIndicator.setTranslateX(f),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._partialExpandIndicator,this._partialExpandIndicator.getTranslateX,this._partialExpandIndicator.setTranslateX,d)),e!=g&&(c||(c=this.CreateCustomAnimPlayable()),this._partialExpandIndicator.setTranslateY(g),
c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._partialExpandIndicator,this._partialExpandIndicator.getTranslateY,this._partialExpandIndicator.setTranslateY,e)));if(this._focusUnderlay&&b._focusUnderlay&&this._focusUnderlay instanceof dvt.Rect){var d=this._focusUnderlay.getX(),e=this._focusUnderlay.getY(),f=this._focusUnderlay.getWidth(),g=this._focusUnderlay.getHeight(),h=b._focusUnderlay.getX(),k=b._focusUnderlay.getY(),l=b._focusUnderlay.getWidth(),m=b._focusUnderlay.getHeight();d!=h&&(c||
(c=this.CreateCustomAnimPlayable()),this._focusUnderlay.setX(h),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getX,this._focusUnderlay.setX,d));e!=k&&(c||(c=this.CreateCustomAnimPlayable()),this._focusUnderlay.setY(k),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getY,this._focusUnderlay.setY,e));f!=l&&(c||(c=this.CreateCustomAnimPlayable()),this._focusUnderlay.setWidth(l),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,
this._focusUnderlay,this._focusUnderlay.getWidth,this._focusUnderlay.setWidth,f));g!=m&&(c||(c=this.CreateCustomAnimPlayable()),this._focusUnderlay.setHeight(m),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._focusUnderlay,this._focusUnderlay.getHeight,this._focusUnderlay.setHeight,g))}this._nodeUnderlay&&b._nodeUnderlay&&(d=this._nodeUnderlay.getX(),e=this._nodeUnderlay.getY(),f=this._nodeUnderlay.getWidth(),g=this._nodeUnderlay.getHeight(),h=b._nodeUnderlay.getX(),k=b._nodeUnderlay.getY(),
l=b._nodeUnderlay.getWidth(),m=b._nodeUnderlay.getHeight(),d!=h&&(c||(c=this.CreateCustomAnimPlayable()),this._nodeUnderlay.setX(h),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getX,this._nodeUnderlay.setX,d)),e!=k&&(c||(c=this.CreateCustomAnimPlayable()),this._nodeUnderlay.setY(k),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getY,this._nodeUnderlay.setY,e)),f!=l&&(c||(c=this.CreateCustomAnimPlayable()),this._nodeUnderlay.setWidth(l),
c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getWidth,this._nodeUnderlay.setWidth,f)),g!=m&&(c||(c=this.CreateCustomAnimPlayable()),this._nodeUnderlay.setHeight(m),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getHeight,this._nodeUnderlay.setHeight,g)));c&&a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_UPDATE)}}};
dvt.AdfDiagramNode.prototype.AnimateUpdateDisclosure=function(a,b,c,d,e){var f=this;this._nodeUnderlay&&(this._bPreventHoverEffect=!0,dvt.Playable.appendOnEnd(c,function(){f._bPreventHoverEffect=!1}));var g=this.getParent(),h=g.getChildIndex(this);g.addChildAt(b,h+1);c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getTranslateX,b.setTranslateX,d);c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getTranslateY,b.setTranslateY,e);c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getAlpha,b.setAlpha,0);dvt.Playable.appendOnEnd(c,
function(){b.getParent().removeChild(b);b.destroy()});d=this._getContentContainer()?this._getContentContainer():this;d.setAlpha(0);c.addProp(dvt.Animator.TYPE_NUMBER,d,d.getAlpha,d.setAlpha,this.GetMaxAlpha());d=b.getContentBounds();e=this.getContentBounds();b.isDisclosed()?(c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getScaleX,b.setScaleX,e.w/d.w),c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getScaleY,b.setScaleY,e.h/d.h),c=this.CreateCustomAnimPlayable(),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,b._childNodePane,
b._childNodePane.getAlpha,b._childNodePane.setAlpha,0),a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_DELETE)):this.isDisclosed()&&(this.setScale(d.w/e.w,d.h/e.h),c.addProp(dvt.Animator.TYPE_NUMBER,this,this.getScaleX,this.setScaleX,1),c.addProp(dvt.Animator.TYPE_NUMBER,this,this.getScaleY,this.setScaleY,1),c=this.CreateCustomAnimPlayable(),this._childNodePane.setAlpha(0),c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this._childNodePane,this._childNodePane.getAlpha,this._childNodePane.setAlpha,
1),a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_INSERT))};
dvt.AdfDiagramNode.prototype.AnimateUpdateHiddenAncestor=function(a,b){var c=this.isHiddenAncestor()?0:1,d=!this.isHiddenAncestor();this._stackUnderlay&&(this._stackUnderlay.setAlpha(1-c),b.addProp(dvt.Animator.TYPE_NUMBER,this._stackUnderlay,this._stackUnderlay.getAlpha,this._stackUnderlay.setAlpha,c));this._stackBadge&&(this._stackBadge.setAlpha(1-c),b.addProp(dvt.Animator.TYPE_NUMBER,this._stackBadge,this._stackBadge.getAlpha,this._stackBadge.setAlpha,c));this._afRoot&&(this._afRoot.setMouseEnabled(d),
this._afRoot.setAlpha(1-c),b.addProp(dvt.Animator.TYPE_NUMBER,this._afRoot,this._afRoot.getAlpha,this._afRoot.setAlpha,c));this._containerBadge&&(this._containerBadge.setMouseEnabled(d),this._containerBadge.setAlpha(1-c),b.addProp(dvt.Animator.TYPE_NUMBER,this._containerBadge,this._containerBadge.getAlpha,this._containerBadge.setAlpha,c));this._partialExpandIndicator&&(this._partialExpandIndicator.setMouseEnabled(d),this._partialExpandIndicator.setAlpha(1-c),b.addProp(dvt.Animator.TYPE_NUMBER,this._partialExpandIndicator,
this._partialExpandIndicator.getAlpha,this._partialExpandIndicator.setAlpha,c));this._containerChrome&&(this._containerChrome.setMouseEnabled(d),this._containerChrome.setAlpha(1-c),b.addProp(dvt.Animator.TYPE_NUMBER,this._containerChrome,this._containerChrome.getAlpha,this._containerChrome.setAlpha,c));this._labelObj&&(this._labelObj.setMouseEnabled(d),this._labelObj.setAlpha(1-c),b.addProp(dvt.Animator.TYPE_NUMBER,this._labelObj,this._labelObj.getAlpha,this._labelObj.setAlpha,c));if(this._overlays)for(var e=
0;e<this._overlays.length;e++){var f=this._overlays[e].overlay;f.setMouseEnabled(d);f.setAlpha(1-c);b.addProp(dvt.Animator.TYPE_NUMBER,f,f.getAlpha,f.setAlpha,c)}this._nodeUnderlay&&(this._nodeUnderlay.setAlpha(1-c),b.addProp(dvt.Animator.TYPE_NUMBER,this._nodeUnderlay,this._nodeUnderlay.getAlpha,this._nodeUnderlay.setAlpha,c))};
dvt.AdfDiagramNode.prototype.AnimateInsert=function(a){var b=!0,c=this.getData().getGroupId();c&&(this.GetDiagram()._oldNodes[c]||(b=!1));b&&(b=new dvt.CustomAnimation(this.getCtx(),this.GetDiagram().getAnimationDuration()),c=b.getAnimator(),this.setAlpha(0),c.addProp(dvt.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,this._maxAlpha),a.add(b,DvtAdfDiagramDataAnimationHandler.PHASE_INSERT),a.SkipDescendants(this.getData().getId(),this.GetDiagram()))};
dvt.AdfDiagramNode.prototype.AnimateDelete=function(a,b){var c=!0,d=this.getData().getGroupId();d?(d=b.getNodeById(d))&&d.GetChildNodePane()?this.InsertNodeIntoParent(d.GetChildNodePane()):c=!1:this.InsertNodeIntoParent(b._nodesPane);if(c){c=new dvt.CustomAnimation(this.getCtx(),b.getAnimationDuration());c.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,0);var e=this;dvt.Playable.appendOnEnd(c,function(){e.getParent().removeChild(e);e.destroy()});a.add(c,DvtAdfDiagramDataAnimationHandler.PHASE_DELETE);
a.SkipDescendants(this.getData().getId(),this.GetDiagram())}};dvt.AdfDiagramNode.prototype.isRestackable=function(){var a=!1;if(this.getData().isShowStack()&&!this.isStack()){var b=this._diagram.getAttributeGroups(),c=this._diagram.getExplodedStacks();if(b&&0<b.length&&c&&0<c.length)for(var b=this._diagram.CreateStackName(this.getData().getId(),this._diagram.getAttributeGroups()),d=0;d<c.length;d++)if(b==c[d]){a=!0;break}}return a};dvt.AdfDiagramNode.prototype.getDetailContents=function(){return this._detailContents};
dvt.AdfDiagramNode.prototype.getTabStopsArray=function(){return this._tabStopsNodeArray};dvt.AdfDiagramNode.prototype.getNextTabStop=function(){this._curTabStopIdx++;if(this._tabStopsNodeArray&&this._tabStopsNodeArray.length>this._curTabStopIdx)return this._tabStopsNodeArray[this._curTabStopIdx];this._curTabStopIdx=-1;return null};
dvt.AdfDiagramNode.prototype.getPrevTabStop=function(){this._curTabStopIdx--;if(0<=this._curTabStopIdx&&this._tabStopsNodeArray&&this._tabStopsNodeArray.length>this._curTabStopIdx)return this._tabStopsNodeArray[this._curTabStopIdx];this._curTabStopIdx=-1;return null};dvt.AdfDiagramNode.prototype.getCurrentTabStop=function(){return-1<this._curTabStopIdx&&this._tabStopsNodeArray&&this._tabStopsNodeArray.length>this._curTabStopIdx?this._tabStopsNodeArray[this._curTabStopIdx]:null};
dvt.AdfDiagramNode.prototype.resetTabStops=function(){var a=this.getCurrentTabStop();a&&a!=this&&a.hideKeyboardFocusEffect&&a.hideKeyboardFocusEffect();this._curTabStopIdx=-1};
dvt.AdfDiagramNode.prototype.CreateLinkHandle=function(){var a=this._diagram.getPalette();if(a&&!a.hasLinkSection())return null;var a=new DvtAdfDiagramNodeEndpoint(this.getCtx(),this,this.getId(),this._diagram.getEditorStyles()),b=this.getContentBounds();a.setPosition(new dvt.Point(b.w/2,0));a.setCursor(dvt.SelectionEffectUtils.getSelectingCursor());a.setVisible(!1);this.addChild(a);return a};
dvt.AdfDiagramNode.prototype.showLinkHandle=function(){(this._linkHandle=this.getLinkHandle())&&!this._diagram.isDragged()&&this._linkHandle.setVisible(!0)};dvt.AdfDiagramNode.prototype.hideLinkHandle=function(){this._linkHandle&&this._linkHandle.setVisible(!1)};dvt.AdfDiagramNode.prototype.getLinkHandle=function(){this._diagram.isReadOnly()||null!=this._linkHandle||(this._linkHandle=this.CreateLinkHandle());return this._linkHandle};dvt.AdfDiagramNode.prototype.getForceZoom100Facet=function(){return this._bForceZoom100Facet};
dvt.AdfDiagramNode.prototype.getZoom=function(){return this._zoom};dvt.AdfDiagramNode.prototype.setZoom=function(a){this._zoom=a};dvt.AdfDiagramNode.prototype.ClearNodeSize=function(){this._nodeHeight=this._nodeWidth=this._nodeHeight100=this._nodeWidth100=0};dvt.AdfDiagramNode.prototype.setWidth=function(a){this._width=a};dvt.AdfDiagramNode.prototype.getWidth=function(){return this._width};dvt.AdfDiagramNode.prototype.setHeight=function(a){this._height=a};dvt.AdfDiagramNode.prototype.getHeight=function(){return this._height};
dvt.AdfDiagramNode.prototype.cleanUp=function(){if(this._copyForDelayedRemoval){this.removeChild(this._copyForDelayedRemoval);for(var a=this._copyForDelayedRemoval.getNumChildren(),b=0;b<a;b++){var c=this._copyForDelayedRemoval.getChildAt(b);this._copyForDelayedRemoval.removeChild(c);c&&c.destroy&&c.destroy()}}this._copyForDelayedRemoval=null};
dvt.AdfDiagramNode.prototype.CreateCopyForDelayedRemoval=function(){var a=new dvt.Container(this.getCtx(),this.getData().getId()+"_tempCopy");this._afRoot&&a.addChild(this._afRoot);this._afRoot=null;this._labelObj&&a.addChild(this._labelObj);this._labelObj=null;this._backgroundObj&&a.addChild(this._backgroundObj);this._backgroundObj=null;if(this._overlays){for(var b=0;b<this._overlays.length;b++)a.addChild(this._overlays[b].overlay);this._overlays=null}this._containerTopObj&&a.addChild(this._containerTopObj);
this._containerTopObj=null;this._containerBottomObj&&a.addChild(this._containerBottomObj);this._containerBottomObj=null;this._containerLeftObj&&a.addChild(this._containerLeftObj);this._containerLeftObj=null;this._containerRightObj&&a.addChild(this._containerRightObj);this._containerRightObj=null;this._containerChrome&&a.addChild(this._containerChrome);this._containerChrome=null;this._containerUnderlay&&a.addChild(this._containerUnderlay);this._containerUnderlay=null;this._focusUnderlay&&a.addChild(this._focusUnderlay);
this._focusUnderlay=null;a.setVisible(!1);this.addChild(a);return a};dvt.AdfDiagramNode.prototype._canRemoveNodeContent=function(){var a=!0;if(dvt.Agent.isTouchDevice()){var b=this.GetDiagram().getPanZoomCanvas().getCurrentTouchTargets();if(b)for(var c=0;c<b.length;c++)dvt.DisplayableUtils.isAncestor(this,b[c])&&(a=!1)}return a};dvt.AdfDiagramNode.prototype.setDraggable=function(a){this._draggable=a};dvt.AdfDiagramNode.prototype.isDraggable=function(){return this._draggable};
dvt.AdfDiagramNode.prototype.setDragFlavor=function(a){this.DragFlavor=a&&this._diagram.ConvertDataFlavorFunc?this._diagram.ConvertDataFlavorFunc("javax.faces.component.UIComponent/"+a):null};dvt.AdfDiagramNode.prototype.setDropFlavors=function(a){this.DropFlavors=dvt.AdfDiagramJsonParser.ParseDropFlavors(a,this._diagram.ConvertDataFlavorFunc)};dvt.AdfDiagramNode.prototype.getDragContext=function(a,b){return{dragFlavor:this.DragFlavor,typeName:this.getTypeName()}};
dvt.AdfDiagramNode.prototype._refreshCursor=function(){var a=dvt.SelectionEffectUtils.getSelectingCursor();if(!this.isHiddenAncestor()){if(this.isSelectable()){this.setCursor(a);return}var b=this.getShowPopupBehaviors();if(dvt.ArrayUtils.isArray(b))for(var c=0;c<b.length;c++)if(b[c]&&"click"==b[c].getTriggerType()){this.setCursor(a);return}b=this.getClientBehaviors();if(dvt.ArrayUtils.isArray(b))for(c=0;c<b.length;c++)if(b[c]&&"click"==b[c].getTriggerType()){this.setCursor(a);return}}this.setCursor(null)};
dvt.AdfDiagramNode.prototype._getUnderlayStroke=function(a,b,c){var d=this._diagram.supportsVectorEffects()?1:1/this._diagram.getPanZoomCanvas().getZoom();a=new dvt.SolidStroke(a,b?b:1,(c?c:1)*d);a.setFixedWidth(!0);return a};dvt.AdfDiagramNode.prototype.GetChildNodePane=function(){return this._childNodePane};
dvt.AdfDiagramNode.prototype.SetPosition=function(a,b,c){c?(c.addProp(dvt.Animator.TYPE_NUMBER,this,this.getTranslateX,this.setTranslateX,a),c.addProp(dvt.Animator.TYPE_NUMBER,this,this.getTranslateY,this.setTranslateY,b)):this.setTranslate(a,b);this.getParent()instanceof DvtAdfDiagramLayoutContainer||DvtAdfDiagramOverviewUtils.SetNodePosition(this.GetDiagram(),this,a,b,c)};
dvt.AdfDiagramNode.prototype.SetAlpha=function(a,b){var c=this.getDisplayables();if(b)for(var d=0;d<c.length;d++)b.addProp(dvt.Animator.TYPE_NUMBER,c[d],c[d].getAlpha,c[d].setAlpha,a);else for(d=0;d<c.length;d++)c[d].setAlpha(a);DvtAdfDiagramOverviewUtils.SetNodeAlpha(this.GetDiagram(),this,a,b)};
dvt.AdfDiagramNode.prototype.getAutomationState=function(a){var b=this.GetDiagram().getAutomationState(this.getData().getId(),a);if(null==b){if("stack"==a)return this.isStack();if("disclosed"==a)return this.isDisclosed();if("partialExpand"==a)return this.isPartiallyExpanded();if("visible"==a)return this.getVisible()}return b};dvt.AdfDiagramNode.prototype._addContainerFacetTabStops=function(a,b){this._containerFacetsTabStops||(this._containerFacetsTabStops={});this._containerFacetsTabStops[b]=[];a.setTabStopsArray(this._containerFacetsTabStops[b])};
dvt.AdfDiagramNode.prototype._clearContainerFacetTabStops=function(){if(this._containerFacetsTabStops&&this._tabStopsNodeArray){var a=function(a,c){if(a){var d=dvt.ArrayUtils.getIndex(c,a[0]);0<d&&c.splice(d,a.length)}};a(this._containerFacetsTabStops.top,this._tabStopsNodeArray);a(this._containerFacetsTabStops.left,this._tabStopsNodeArray);a(this._containerFacetsTabStops.right,this._tabStopsNodeArray);a(this._containerFacetsTabStops.bottom,this._tabStopsNodeArray);this._containerFacetsTabStops={}}};
dvt.AdfDiagramNode.prototype._updateNodeTabStops=function(){if(this._containerFacetsTabStops&&this._tabStopsNodeArray){var a=function(a,c){if(a)for(var d=0;d<a.length;d++)c.push(a[d])};1<this._tabStopsNodeArray.length&&this._tabStopsNodeArray[this._tabStopsNodeArray.length-1]==this&&this._tabStopsNodeArray.pop();a(this._containerFacetsTabStops.top,this._tabStopsNodeArray);dvt.Agent.isRightToLeft()?(a(this._containerFacetsTabStops.right,this._tabStopsNodeArray),a(this._containerFacetsTabStops.left,
this._tabStopsNodeArray)):(a(this._containerFacetsTabStops.left,this._tabStopsNodeArray),a(this._containerFacetsTabStops.right,this._tabStopsNodeArray));a(this._containerFacetsTabStops.bottom,this._tabStopsNodeArray)}};dvt.AdfDiagramNode.prototype.getGroupId=function(){return this.getData().getGroupId()};
dvt.AdfDiagramNodeDef=function(){this.Init()};dvt.Obj.createSubclass(dvt.AdfDiagramNodeDef,dvt.Obj,"dvt.AdfDiagramNodeDef");
dvt.AdfDiagramNodeDef.prototype.Init=function(){this._styleClass=this._skinStyle=this._inlineStyle=this._id=null;this._nodeTemplates={};this._clientBehaviors=this._showPopupBehaviors=this._overlayTemplate=this._containerRightTemplate=this._containerLeftTemplate=this._containerBottomTemplate=this._containerTopTemplate=this._backgroundTemplate=this._labelTemplate=this._detailTemplate=this._propMap=null};dvt.AdfDiagramNodeDef.prototype.setId=function(a){this._id=a};
dvt.AdfDiagramNodeDef.prototype.getId=function(){return this._id};dvt.AdfDiagramNodeDef.prototype.setWidth=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_WIDTH,a)};dvt.AdfDiagramNodeDef.prototype.getWidth=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_WIDTH)};dvt.AdfDiagramNodeDef.prototype.setHeight=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_HEIGHT,a)};dvt.AdfDiagramNodeDef.prototype.getHeight=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_HEIGHT)};
dvt.AdfDiagramNodeDef.prototype.setInlineStyle=function(a){this._inlineStyle=a};dvt.AdfDiagramNodeDef.prototype.getInlineStyle=function(){return this._inlineStyle};dvt.AdfDiagramNodeDef.prototype.setSkinStyle=function(a){this._skinStyle=a};dvt.AdfDiagramNodeDef.prototype.getSkinStyle=function(){return this._skinStyle};dvt.AdfDiagramNodeDef.prototype.setStyleClass=function(a){this._styleClass=a};dvt.AdfDiagramNodeDef.prototype.getStyleClass=function(){return this._styleClass};
dvt.AdfDiagramNodeDef.prototype.setNodeTemplate=function(a,b){this._nodeTemplates[b]=a};dvt.AdfDiagramNodeDef.prototype.getNodeTemplate=function(a){a||(a="zoom100");return this._nodeTemplates[a]};dvt.AdfDiagramNodeDef.prototype.setDetailTemplate=function(a){this._detailTemplate=a};dvt.AdfDiagramNodeDef.prototype.getDetailTemplate=function(){return this._detailTemplate};dvt.AdfDiagramNodeDef.prototype.setLabelTemplate=function(a){this._labelTemplate=a};
dvt.AdfDiagramNodeDef.prototype.getLabelTemplate=function(){return this._labelTemplate};dvt.AdfDiagramNodeDef.prototype.setBackgroundTemplate=function(a){this._backgroundTemplate=a};dvt.AdfDiagramNodeDef.prototype.getBackgroundTemplate=function(){return this._backgroundTemplate};dvt.AdfDiagramNodeDef.prototype.setContainerTopTemplate=function(a){a instanceof dvt.AfPanelGroupLayout&&a.setInlineStyle(this._prependInlineStyle("width:100%",a.getInlineStyle()));this._containerTopTemplate=a};
dvt.AdfDiagramNodeDef.prototype.getContainerTopTemplate=function(){return this._containerTopTemplate};dvt.AdfDiagramNodeDef.prototype.setContainerBottomTemplate=function(a){a instanceof dvt.AfPanelGroupLayout&&a.setInlineStyle(this._prependInlineStyle("width:100%",a.getInlineStyle()));this._containerBottomTemplate=a};dvt.AdfDiagramNodeDef.prototype.getContainerBottomTemplate=function(){return this._containerBottomTemplate};
dvt.AdfDiagramNodeDef.prototype.setContainerLeftTemplate=function(a){a instanceof dvt.AfPanelGroupLayout&&a.setInlineStyle(this._prependInlineStyle("height:100%",a.getInlineStyle()));this._containerLeftTemplate=a};dvt.AdfDiagramNodeDef.prototype.getContainerLeftTemplate=function(){return this._containerLeftTemplate};
dvt.AdfDiagramNodeDef.prototype.setContainerRightTemplate=function(a){a instanceof dvt.AfPanelGroupLayout&&a.setInlineStyle(this._prependInlineStyle("height:100%",a.getInlineStyle()));this._containerRightTemplate=a};dvt.AdfDiagramNodeDef.prototype.getContainerRightTemplate=function(){return this._containerRightTemplate};dvt.AdfDiagramNodeDef.prototype.setOverlayTemplate=function(a){this._overlayTemplate=a};dvt.AdfDiagramNodeDef.prototype.getOverlayTemplate=function(){return this._overlayTemplate};
dvt.AdfDiagramNodeDef.prototype.setShortDesc=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC,a)};dvt.AdfDiagramNodeDef.prototype.getShortDesc=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC)};dvt.AdfDiagramNodeDef.prototype.setLayout=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_LAYOUT,a)};dvt.AdfDiagramNodeDef.prototype.getLayout=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_LAYOUT)};
dvt.AdfDiagramNodeDef.prototype.setReadOnly=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY,a)};dvt.AdfDiagramNodeDef.prototype.getReadOnly=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY)};dvt.AdfDiagramNodeDef.prototype.setSelectable=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_SELECTABLE,a)};dvt.AdfDiagramNodeDef.prototype.getSelectable=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_SELECTABLE)};
dvt.AdfDiagramNodeDef.prototype.setLabel=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_LABEL,a)};dvt.AdfDiagramNodeDef.prototype.getLabel=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_LABEL)};dvt.AdfDiagramNodeDef.prototype.setDraggable=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_DRAGGABLE,a)};dvt.AdfDiagramNodeDef.prototype.getDraggable=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_DRAGGABLE)};
dvt.AdfDiagramNodeDef.prototype.setDragFlavor=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_DRAG_FLAVOR,a)};dvt.AdfDiagramNodeDef.prototype.getDragFlavor=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_DRAG_FLAVOR)};dvt.AdfDiagramNodeDef.prototype.setDropFlavors=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_DROP_FLAVORS,a)};dvt.AdfDiagramNodeDef.prototype.getDropFlavors=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_AF_DROP_FLAVORS)};
dvt.AdfDiagramNodeDef.prototype.stamp=function(a,b){if(this._propMap){var c=this._propMap.stamp(a);this.ProcessResolvedProperties(c,b)}};
dvt.AdfDiagramNodeDef.prototype.ProcessResolvedProperties=function(a,b){b.setWidth(a.getProperty(dvt.AdfDiagramParser._ATTR_WIDTH)?parseInt(a.getProperty(dvt.AdfDiagramParser._ATTR_WIDTH)):null);b.setHeight(a.getProperty(dvt.AdfDiagramParser._ATTR_HEIGHT)?parseInt(a.getProperty(dvt.AdfDiagramParser._ATTR_HEIGHT)):null);b.setShortDesc(a.getProperty(dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC));b.setLayout(a.getProperty(dvt.AdfDiagramParser._ATTR_LAYOUT));b.setLabel(a.getProperty(dvt.AdfDiagramParser._ATTR_LABEL));
b.setDeleteEnabled(!a.getBooleanProp(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY,!1));b.setSelectable(a.getBooleanProp(dvt.AdfDiagramParser._ATTR_SELECTABLE,!0));b.setDraggable(b.isSelectable()?a.getBooleanProp(dvt.AdfDiagramParser._ATTR_AF_DRAGGABLE,!0):!1);b.setDragFlavor(a.getProperty(dvt.AdfDiagramParser._ATTR_AF_DRAG_FLAVOR));b.setDropFlavors(a.getProperty(dvt.AdfDiagramParser._ATTR_AF_DROP_FLAVORS));var c=a.getProperty(dvt.AdfDiagramParser._ATTR_CONTAINER_STYLE);c&&b.setContainerStyle(new dvt.CSSStyle(c));
(c=a.getProperty(dvt.AdfDiagramParser._ATTR_OVERVIEW_STYLE))&&b.setOverviewStyle(new dvt.CSSStyle(c));(c=a.getProperty(dvt.AdfDiagramParser._ATTR_OVERVIEW_CONTAINER_STYLE))&&b.setOverviewContainerStyle(new dvt.CSSStyle(c))};dvt.AdfDiagramNodeDef.prototype.getDefaultNodeTemplate=function(a,b){a&&!b&&(b=a);b&&!a&&(a=b);a||b||(a=233,b=330);var c=new dvt.AfSpacer;c.setWidth(a+"");c.setHeight(b+"");return c};
dvt.AdfDiagramNodeDef.prototype.addShowPopupBehavior=function(a){this._showPopupBehaviors||(this._showPopupBehaviors=[]);this._showPopupBehaviors.push(a)};dvt.AdfDiagramNodeDef.prototype.getShowPopupBehaviors=function(){return this._showPopupBehaviors};dvt.AdfDiagramNodeDef.prototype.addClientBehavior=function(a){this._clientBehaviors||(this._clientBehaviors=[]);this._clientBehaviors.push(a)};dvt.AdfDiagramNodeDef.prototype.getClientBehaviors=function(){return this._clientBehaviors};
dvt.AdfDiagramNodeDef.prototype.getContainerStyle=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_CONTAINER_STYLE)};dvt.AdfDiagramNodeDef.prototype.setContainerStyle=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_CONTAINER_STYLE,a)};dvt.AdfDiagramNodeDef.prototype.getOverviewStyle=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_OVERVIEW_STYLE)};
dvt.AdfDiagramNodeDef.prototype.setOverviewStyle=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_OVERVIEW_STYLE,a)};dvt.AdfDiagramNodeDef.prototype.getOverviewContainerStyle=function(){return this._getPropMapProperty(dvt.AdfDiagramParser._ATTR_OVERVIEW_CONTAINER_STYLE)};dvt.AdfDiagramNodeDef.prototype.setOverviewContainerStyle=function(a){this._setPropMapProperty(dvt.AdfDiagramParser._ATTR_OVERVIEW_CONTAINER_STYLE,a)};
dvt.AdfDiagramNodeDef.prototype._prependInlineStyle=function(a,b){return a+(b?";"+b:"")};dvt.AdfDiagramNodeDef.prototype._setPropMapProperty=function(a,b){this._propMap||(this._propMap=new dvt.PropMap);this._propMap.setProperty(a,b)};dvt.AdfDiagramNodeDef.prototype._getPropMapProperty=function(a){return this._propMap?this._propMap.getProperty(a):null};
var DvtAdfDiagramNodeExpandHandler=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(DvtAdfDiagramNodeExpandHandler,dvt.Obj,"DvtAdfDiagramNodeExpandHandler");DvtAdfDiagramNodeExpandHandler.prototype.Init=function(a,b){this._diagram=a;this._nodeId=b};DvtAdfDiagramNodeExpandHandler.prototype.getTooltip=function(){return this._diagram.getResourcesMap().additionalLinksTip};
var DvtAdfDiagramOverviewUtils={};dvt.Obj.createSubclass(DvtAdfDiagramOverviewUtils,dvt.Obj,"DvtAdfDiagramOverviewUtils");
DvtAdfDiagramOverviewUtils.CreateOverviewContent=function(a,b,c){var d=new dvt.Container(a.getCtx(),"dg_ovContent");a._overviewContent=d;d.setMouseEnabled(!1);a._overviewNodes||(a._overviewNodes={});for(var e=0;e<a._arNodeIds.length;e++){var f=a._arNodeIds[e],g=a.getNodeById(f),h=DvtAdfDiagramOverviewUtils.CreateOverviewNode(a,g,c);a._overviewNodes[f]=h;DvtAdfDiagramOverviewUtils.PositionOverviewNode(a,g);if(f=g.getData().getGroupId()){var f=a._nodes[f],k=DvtAdfDiagramOverviewUtils.GetOverviewNode(a,
f);k&&(k._ovChildNodePane||(k._ovChildNodePane=new dvt.Container(a.getCtx(),k.getId()+"_cnp"),k.addChild(k._ovChildNodePane),DvtAdfDiagramOverviewUtils._translateChildNodePane(a,f)),k._ovChildNodePane.addChild(h))}else d.addChild(h);DvtAdfDiagramOverviewUtils.SetNodeVisible(a,g,g.getVisible())}DvtAdfDiagramOverviewUtils.ZoomToFitOverviewContent(a,b);b=this.CalcAdjustedViewport(a,null);a._overviewWindow.setViewportDimensions(b);return d};
DvtAdfDiagramOverviewUtils.ZoomToFitOverviewContent=function(a,b,c){var d=a._overviewContent,e=a._overviewWindow.getContentAreaWidth(),f=a._overviewWindow.getContentAreaHeight();b=b?b:a.GetViewBounds(c);var g=DvtAdfDiagramOverviewUtils.CalcOverviewScale(a,b);if(!a.supportsVectorEffects())for(var h=0;h<a._arNodeIds.length;h++){var k=a._overviewNodes[a._arNodeIds[h]],l=k.getStroke();l&&(l=l.clone(),l.setWidth(l.getWidth()*d.getScaleX()/g),c?c.addProp(dvt.Animator.TYPE_STROKE,k,k.getStroke,k.setStroke,
l):k.setStroke(l))}c?(c.addProp(dvt.Animator.TYPE_NUMBER,d,d.getScaleX,d.setScaleX,g),c.addProp(dvt.Animator.TYPE_NUMBER,d,d.getScaleY,d.setScaleY,g)):d.setScale(g,g);a=(e-b.w*g)/2-b.x*g;f=(f-b.h*g)/2-b.y*g;c?(c.addProp(dvt.Animator.TYPE_NUMBER,d,d.getTranslateX,d.setTranslateX,a),c.addProp(dvt.Animator.TYPE_NUMBER,d,d.getTranslateY,d.setTranslateY,f)):d.setTranslate(a,f)};
DvtAdfDiagramOverviewUtils.CalcOverviewScale=function(a,b){var c=a._overviewWindow.getContentAreaWidth()-20,d=a._overviewWindow.getContentAreaHeight()-20;return Math.min(c/b.w,d/b.h)};DvtAdfDiagramOverviewUtils.CreateOverviewNodeId=function(a){return"ov_"+a};DvtAdfDiagramOverviewUtils._getNodeIdFromOverviewNode=function(a){return DvtAdfDiagramOverviewUtils._getNodeIdFromOverviewNodeId(a.getId())};DvtAdfDiagramOverviewUtils._getNodeIdFromOverviewNodeId=function(a){return a.substring(3)};
DvtAdfDiagramOverviewUtils.CreateOverviewNode=function(a,b,c){var d=b.getLayoutBounds();a=new dvt.Rect(a.getCtx(),0,0,d.w,d.h,DvtAdfDiagramOverviewUtils.CreateOverviewNodeId(b.getData().getId()));a._disclosed=b.isDisclosed();a._hiddenAncestor=b.isHiddenAncestor();d=DvtAdfDiagramOverviewUtils.CreateFill(b,c);a.setFill(d);(d=DvtAdfDiagramOverviewUtils.CreateStroke(b,c))&&a.setStroke(d);DvtAdfDiagramOverviewUtils.setBorderRadius(a,b,c);return a};
DvtAdfDiagramOverviewUtils.UpdateOverviewNode=function(a,b,c,d){var e=DvtAdfDiagramOverviewUtils.GetOverviewNode(a,b);if(e){if(e._disclosed!=b.isDisclosed()||e._hiddenAncestor!=b.isHiddenAncestor()){var f=DvtAdfDiagramOverviewUtils.CreateFill(b,d);d=DvtAdfDiagramOverviewUtils.CreateStroke(b,d);if(c){if(f.equals(e.getFill())||c.addProp(dvt.Animator.TYPE_FILL,e,e.getFill,e.setFill,f),(f=e.getStroke())||d)if(f?d||(d=new dvt.SolidStroke("rgba(0,0,0,0)")):f=new dvt.SolidStroke("rgba(0,0,0,0)"),f.getColor()!=
d.getColor()||f.getAlpha()!=d.getAlpha())e.setStroke(f),c.addProp(dvt.Animator.TYPE_STROKE,e,e.getStroke,e.setStroke,d)}else e.setFill(f),e.setStroke(d);e._disclosed=b.isDisclosed();e._hiddenAncestor=b.isHiddenAncestor()}f=b.getLayoutBounds();d=e.getWidth();var g=e.getHeight();d!=f.w&&(c?c.addProp(dvt.Animator.TYPE_NUMBER,e,e.getWidth,e.setWidth,f.w):e.setWidth(f.w));g!=f.h&&(c?c.addProp(dvt.Animator.TYPE_NUMBER,e,e.getHeight,e.setHeight,f.h):e.setHeight(f.h));DvtAdfDiagramOverviewUtils._translateChildNodePane(a,
b,c)}};
DvtAdfDiagramOverviewUtils._translateChildNodePane=function(a,b,c){if((a=DvtAdfDiagramOverviewUtils.GetOverviewNode(a,b))&&b.isDisclosed()){var d=b.getContainerTopHeight(),e=b.getContainerLeftWidth();if(b=b.getContainerPadding())e+=b.left,d+=b.top;a._ovChildNodePane&&(e!=a._ovChildNodePane.getTranslateX()&&(c?c.addProp(dvt.Animator.TYPE_NUMBER,a._ovChildNodePane,a._ovChildNodePane.getTranslateX,a._ovChildNodePane.setTranslateX,e):a._ovChildNodePane.setTranslateX(e)),d!=a._ovChildNodePane.getTranslateY()&&(c?
c.addProp(dvt.Animator.TYPE_NUMBER,a._ovChildNodePane,a._ovChildNodePane.getTranslateY,a._ovChildNodePane.setTranslateY,d):a._ovChildNodePane.setTranslateY(d)))}};
DvtAdfDiagramOverviewUtils.CreateFill=function(a,b){var c;a.isDisclosed()?(c=b[dvt.AdfDiagram.OVERVIEW_CONTAINER_STYLE],a.getOverviewContainerStyle()&&(c=a.getOverviewContainerStyle().clone().mergeUnder(c))):(c=b[dvt.AdfDiagram.OVERVIEW_STYLE],a.getOverviewStyle()&&(c=a.getOverviewStyle().clone().mergeUnder(c)));c=c.getStyle(dvt.CSSStyle.BACKGROUND_COLOR);return new dvt.SolidFill(dvt.ColorUtils.makeRGB(dvt.ColorUtils.getRed(c),dvt.ColorUtils.getGreen(c),dvt.ColorUtils.getBlue(c)),a.isHiddenAncestor()?
0:Math.min(dvt.ColorUtils.getAlpha(c),a.GetMaxAlpha()))};
DvtAdfDiagramOverviewUtils.CreateStroke=function(a,b){var c,d;a.isDisclosed()?(c=DvtAdfDiagramOverviewUtils.getBorderStyles(b[dvt.AdfDiagram.OVERVIEW_CONTAINER_STYLE]),d=DvtAdfDiagramOverviewUtils.getBorderStyles(a.getOverviewContainerStyle())):(c=DvtAdfDiagramOverviewUtils.getBorderStyles(b[dvt.AdfDiagram.OVERVIEW_STYLE]),d=DvtAdfDiagramOverviewUtils.getBorderStyles(a.getOverviewStyle()));d&&(c=d.clone().mergeUnder(c));return c?(d=c.getStyle(dvt.CSSStyle.BORDER_COLOR),d=new dvt.SolidStroke(dvt.ColorUtils.makeRGB(dvt.ColorUtils.getRed(d),
dvt.ColorUtils.getGreen(d),dvt.ColorUtils.getBlue(d)),a.isHiddenAncestor()?0:dvt.ColorUtils.getAlpha(d),c.getBorderWidth()),c.getStyle(dvt.CSSStyle.BORDER_STYLE)&&d.setType(dvt.Stroke.convertTypeString(c.getStyle(dvt.CSSStyle.BORDER_STYLE))),d.setFixedWidth(!0),d):null};
DvtAdfDiagramOverviewUtils.getBorderStyles=function(a){if(a){var b=new dvt.CSSStyle,c,d=!1;if(c=a.getStyle(dvt.CSSStyle.BORDER_COLOR))b.setStyle(dvt.CSSStyle.BORDER_COLOR,c),d=!0;if(c=a.getStyle(dvt.CSSStyle.BORDER_WIDTH))b.setStyle(dvt.CSSStyle.BORDER_WIDTH,c),d=!0;if(c=a.getStyle(dvt.CSSStyle.BORDER_STYLE))b.setStyle(dvt.CSSStyle.BORDER_STYLE,c),d=!0;return d?b:null}};
DvtAdfDiagramOverviewUtils.setBorderRadius=function(a,b,c){c=b.isDisclosed()?(b=b.getOverviewContainerStyle())?b.getStyle(dvt.CSSStyle.BORDER_RADIUS)?b.getStyle(dvt.CSSStyle.BORDER_RADIUS):c[dvt.AdfDiagram.OVERVIEW_CONTAINER_STYLE].getStyle(dvt.CSSStyle.BORDER_RADIUS):c[dvt.AdfDiagram.OVERVIEW_CONTAINER_STYLE].getStyle(dvt.CSSStyle.BORDER_RADIUS):(b=b.getOverviewStyle())?b.getStyle(dvt.CSSStyle.BORDER_RADIUS)?b.getStyle(dvt.CSSStyle.BORDER_RADIUS):c[dvt.AdfDiagram.OVERVIEW_STYLE].getStyle(dvt.CSSStyle.BORDER_RADIUS):
c[dvt.AdfDiagram.OVERVIEW_STYLE].getStyle(dvt.CSSStyle.BORDER_RADIUS);c&&(c=dvt.StringUtils.trim(c).split(" "),0<c.length&&c[0]&&(b=parseFloat(c[0]),a.setRx(0>b?0:b)),1<c.length&&c[1]&&(b=parseFloat(c[1]),a.setRy(0>b?0:b)))};DvtAdfDiagramOverviewUtils.PositionOverviewNode=function(a,b,c){var d,e;c?(d=c.getDestVal(b,b.getTranslateX),e=c.getDestVal(b,b.getTranslateY)):(d=b.getTranslateX(),e=b.getTranslateY());DvtAdfDiagramOverviewUtils.SetNodePosition(a,b,d,e,c)};
DvtAdfDiagramOverviewUtils.SyncOverviewContent=function(a,b){if(a._overviewWindow){DvtAdfDiagramOverviewUtils.ZoomToFitOverviewContent(a,null,b);var c=DvtAdfDiagramOverviewUtils.CalcAdjustedViewport(a,b);a._overviewWindow.setViewportDimensions(c,b)}};DvtAdfDiagramOverviewUtils.CalcAdjustedViewport=function(a,b){return DvtAdfDiagramOverviewUtils._calcViewportFromMatrix(a,a.getPanZoomCanvas().getContentPaneMatrix(b))};
DvtAdfDiagramOverviewUtils._calcViewportFromMatrix=function(a,b){var c=new dvt.Rectangle(0,0,a.getWidth(),a.getHeight()),d=b.getTx(),e=b.getTy(),f=b.getA();return new dvt.Rectangle(c.x-d/f,c.y-e/f,c.w/f,c.h/f)};
DvtAdfDiagramOverviewUtils.SetNodePosition=function(a,b,c,d,e){if(a=DvtAdfDiagramOverviewUtils.GetOverviewNode(a,b))c=new dvt.Point(c,d),e?(e.addProp(dvt.Animator.TYPE_NUMBER,a,a.getTranslateX,a.setTranslateX,c.x),e.addProp(dvt.Animator.TYPE_NUMBER,a,a.getTranslateY,a.setTranslateY,c.y)):a.setTranslate(c.x,c.y)};
DvtAdfDiagramOverviewUtils.GetMaxAlpha=function(a,b){var c=b.GetMaxAlpha();if(b.isDisclosed()){var d=a.getOverviewWindowContentStyle(),d=parseFloat(DvtAdfDiagramOverviewUtils.getSkinStyleAttr(d,dvt.AdfDiagram.OVERVIEW_DISCLOSED_ALPHA));isNaN(d)&&(d=dvt.AdfDiagram.OVERVIEW_DISCLOSED_DFLT_ALPHA);c=Math.min(d,c)}return c};
DvtAdfDiagramOverviewUtils.SetNodeAlpha=function(a,b,c,d){var e=DvtAdfDiagramOverviewUtils.GetOverviewNode(a,b);if(e){var f=e.getFill();f&&(a=Math.min(c,DvtAdfDiagramOverviewUtils.GetMaxAlpha(a,b)),a!=f.getAlpha()&&(f=f.clone(),f.setAlpha(a),d?d.addProp(dvt.Animator.TYPE_FILL,e,e.getFill,e.setFill,f):e.setFill(f)))}};DvtAdfDiagramOverviewUtils.SetNodeVisible=function(a,b,c){(a=DvtAdfDiagramOverviewUtils.GetOverviewNode(a,b))&&a.setVisible(c)};
DvtAdfDiagramOverviewUtils.GetOverviewNode=function(a,b){return a._overviewWindow&&a._overviewNodes?a._overviewNodes[b.getData().getId()]:null};DvtAdfDiagramOverviewUtils.HandlePanEvent=function(a,b){var c=a.getPanZoomCanvas().getContentPaneMatrix(b.getAnimator()).clone();c.translate(b.getNewX()-b.getOldX(),b.getNewY()-b.getOldY());a._overviewWindow.setViewportDimensions(DvtAdfDiagramOverviewUtils._calcViewportFromMatrix(a,c),b.getAnimator())};
DvtAdfDiagramOverviewUtils.HandleZoomEvent=function(a,b){var c=a.getPanZoomCanvas().getContentPaneMatrix(b.getAnimator()).clone();c.scale(b.getNewZoom()/b.getOldZoom(),b.getNewZoom()/b.getOldZoom(),b.getCenterPoint().x,b.getCenterPoint().y);c.translate(b.getTx(),b.getTy());a._overviewWindow.setViewportDimensions(DvtAdfDiagramOverviewUtils._calcViewportFromMatrix(a,c),b.getAnimator())};DvtAdfDiagramOverviewUtils.getSkinStyleAttr=function(a,b){return a&&"undefined"!=a[b]?a[b]:null};
DvtAdfDiagramOverviewUtils._createCustomAnimPlayable=function(a){return new dvt.CustomAnimation(a.getCtx(),null,a.getAnimationDuration())};
DvtAdfDiagramOverviewUtils.AnimateUpdate=function(a,b,c,d,e,f,g,h,k,l){DvtAdfDiagramOverviewUtils._animateUpdateContent(a,b,c,d,e,f);c={};for(var m in h)c[m]=h[m];h=c;c={};for(m in g)c[m]=g[m];g=c;c={};if(g)for(d=0;d<k.length;d++)if(m=k[d],c[m])delete g[m],delete h[m];else if(e=g[m])(f=h[m])?(DvtAdfDiagramOverviewUtils._animateUpdate(a,b,e,f,g,h,c),delete h[m]):DvtAdfDiagramOverviewUtils._animateDelete(a,b,e);k=[];for(d=0;d<l.length;d++)m=l[d],h[m]&&k.push(m);for(d=0;d<k.length;d++)m=k[d],c[m]?(delete g[m],
delete h[m]):h[m]&&DvtAdfDiagramOverviewUtils._animateInsert(a,b,h[m])};
DvtAdfDiagramOverviewUtils._animateUpdateContent=function(a,b,c,d,e,f){var g=null;e=e.getMatrix();var h=f.getMatrix();e.equals(h)||(g||(g=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),f.setMatrix(e),g.getAnimator().addProp(dvt.Animator.TYPE_MATRIX,f,f.getMatrix,f.setMatrix,h));f=d.GetViewportRectangle();if(c.x!=f.x||c.y!=f.y||c.w!=f.w||c.h!=f.h)g||(g=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d.SetViewportRectangle(c),g.getAnimator().addProp(dvt.Animator.TYPE_RECTANGLE,d,
d.GetViewportRectangle,d.SetViewportRectangle,f);g&&b.add(g,DvtAdfDiagramDataAnimationHandler.PHASE_UPDATE)};
DvtAdfDiagramOverviewUtils._animateUpdate=function(a,b,c,d,e,f,g){var h=null,k=c.getVisible(),l=d.getVisible();if(k!=l)h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),DvtAdfDiagramOverviewUtils._skipDescendants(DvtAdfDiagramOverviewUtils._getNodeIdFromOverviewNode(d),e,f,0,g),k?(d.getParent().addChild(c),h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,c,c.getAlpha,c.setAlpha,0),dvt.Playable.appendOnEnd(h,function(){c.getParent().removeChild(c);c.destroy()}),b.add(h,DvtAdfDiagramDataAnimationHandler.PHASE_DELETE)):
l&&(a=d.getAlpha(),d.setAlpha(0),h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,d,d.getAlpha,d.setAlpha,a),b.add(h,DvtAdfDiagramDataAnimationHandler.PHASE_INSERT));else{e=c.getTranslateX();f=d.getTranslateX();e!=f&&(h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d.setTranslateX(e),h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,d,d.getTranslateX,d.setTranslateX,f));e=c.getTranslateY();f=d.getTranslateY();e!=f&&(h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d.setTranslateY(e),
h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,d,d.getTranslateY,d.setTranslateY,f));e=c.getWidth();f=d.getWidth();e!=f&&(h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d.setWidth(e),h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,d,d.getWidth,d.setWidth,f));e=c.getHeight();f=d.getHeight();e!=f&&(h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d.setHeight(e),h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,d,d.getHeight,d.setHeight,f));e=c.getAlpha();f=d.getAlpha();
e!=f&&(h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d.setAlpha(e),h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,d,d.getAlpha,d.setAlpha,f));e=c.getFill();f=d.getFill();e&&f&&e.getColor()!=f.getColor()&&(h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d.setFill(e),h.getAnimator().addProp(dvt.Animator.TYPE_FILL,d,d.getFill,d.setFill,f));e=c.getStroke();f=d.getStroke();if(e||f)if(e?f||(f=new dvt.SolidStroke("rgba(0,0,0,0)")):e=new dvt.SolidStroke("rgba(0,0,0,0)"),
e.getColor()!=f.getColor()||e.getAlpha()!=f.getAlpha())h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d.setStroke(e),h.getAnimator().addProp(dvt.Animator.TYPE_STROKE,d,d.getStroke,d.setStroke,f);c._ovChildNodePane&&d._ovChildNodePane&&(e=c._ovChildNodePane.getTranslateX(),f=d._ovChildNodePane.getTranslateX(),e!=f&&(h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d._ovChildNodePane.setTranslateX(e),h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,d._ovChildNodePane,d._ovChildNodePane.getTranslateX,
d._ovChildNodePane.setTranslateX,f)),e=c._ovChildNodePane.getTranslateY(),f=d._ovChildNodePane.getTranslateY(),e!=f&&(h||(h=DvtAdfDiagramOverviewUtils._createCustomAnimPlayable(a)),d._ovChildNodePane.setTranslateY(e),h.getAnimator().addProp(dvt.Animator.TYPE_NUMBER,d._ovChildNodePane,d._ovChildNodePane.getTranslateY,d._ovChildNodePane.setTranslateY,f)));h&&b.add(h,DvtAdfDiagramDataAnimationHandler.PHASE_UPDATE)}};DvtAdfDiagramOverviewUtils._animateInsert=function(a,b,c){};
DvtAdfDiagramOverviewUtils._animateDelete=function(a,b,c){};DvtAdfDiagramOverviewUtils._skipDescendants=function(a,b,c,d,e){if(!d||0>d)d=0;a=c[a];if(a._ovChildNodePane)for(var f=a._ovChildNodePane.getNumChildren(),g=0;g<f;g++){var h=a._ovChildNodePane.getChildAt(g).getId(),h=DvtAdfDiagramOverviewUtils._getNodeIdFromOverviewNodeId(h);1>d&&(e[h]=!0);DvtAdfDiagramOverviewUtils._skipDescendants(h,b,c,d-1,e)}};
dvt.AdfDiagramParser=function(a){this.Init(a)};dvt.Obj.createSubclass(dvt.AdfDiagramParser,dvt.Obj,"dvt.AdfDiagramParser");dvt.AdfDiagramParser._ELEM_DIAGRAM_EVENT="dg_e";dvt.AdfDiagramParser._ELEM_DATA="d";dvt.AdfDiagramParser._ELEM_EL="el";dvt.AdfDiagramParser._ELEM_F="f";dvt.AdfDiagramParser._ELEM_LEGEND="legend";dvt.AdfDiagramParser._ELEM_PALETTE="palette";dvt.AdfDiagramParser._ELEM_LINK="l";dvt.AdfDiagramParser._ELEM_LINK_DATA="ld";dvt.AdfDiagramParser._ELEM_NODE="n";
dvt.AdfDiagramParser._ELEM_NODE_DATA="nd";dvt.AdfDiagramParser._ELEM_OVERVIEWWINDOW="overviewWindow";dvt.AdfDiagramParser._ELEM_POINT_LOCATION="pLoc";dvt.AdfDiagramParser._ELEM_TEMPLATES="t";dvt.AdfDiagramParser._ELEM_MDEF="mdef";dvt.AdfDiagramParser._ELEM_MARKERDEF="markerDef";dvt.AdfDiagramParser._ELEM_FILLDEF="fillDef";dvt.AdfDiagramParser._ELEM_GRADIENT="g";dvt.AdfDiagramParser._ELEM_CONTEXT_MENU="menus";dvt.AdfDiagramParser._ELEM_RESOURCES="resources";dvt.AdfDiagramParser._ELEM_SELECTORS="st";
dvt.AdfDiagramParser._ELEM_AF_STYLES="afStyles";dvt.AdfDiagramParser._ELEM_CT_STYLES="ctStyles";dvt.AdfDiagramParser._ELEM_SHOW_POPUP_BEHAVIOR="spb";dvt.AdfDiagramParser._ELEM_CLIENT_BEHAVIOR="bhvr";dvt.AdfDiagramParser._ATTR_AF_INLINE_STYLE="inlineStyle";dvt.AdfDiagramParser._ATTR_AF_STYLE_CLASS="styleClass";dvt.AdfDiagramParser._ATTR_AF_NAME="name";dvt.AdfDiagramParser._ATTR_AF_RENDERED="rendered";dvt.AdfDiagramParser._ATTR_AF_READ_ONLY="readOnly";dvt.AdfDiagramParser._ATTR_AF_HAS_DRAG_SOURCE="hasDragSource";
dvt.AdfDiagramParser._ATTR_AF_DRAGGABLE="draggable";dvt.AdfDiagramParser._ATTR_AF_DRAG_FLAVOR="dragFlavor";dvt.AdfDiagramParser._ATTR_AF_DROP_FLAVORS="dropFlavors";dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC="shortDesc";dvt.AdfDiagramParser._ATTR_ATTR_GRPS="attrGrps";dvt.AdfDiagramParser._ATTR_UNGROUPED="ungrouped";dvt.AdfDiagramParser._ATTR_HIDDEN="hidden";dvt.AdfDiagramParser._ATTR_HEIGHT="height";dvt.AdfDiagramParser._ATTR_NODE_HIGHLIGHT_BEHAVIOR="nodeHL";
dvt.AdfDiagramParser._ATTR_LINK_HIGHLIGHT_BEHAVIOR="linkHL";dvt.AdfDiagramParser._ATTR_HIGHLIGHTED_NODES="hlNodes";dvt.AdfDiagramParser._ATTR_HIGHLIGHTED_LINKS="hlLinks";dvt.AdfDiagramParser._ATTR_ID="id";dvt.AdfDiagramParser._ATTR_INIT_ANIM="initAnim";dvt.AdfDiagramParser._ATTR_DATA_CHANGE_ANIM="dataChangeAnim";dvt.AdfDiagramParser._ATTR_ANIMATION_DURATION="animDuration";dvt.AdfDiagramParser._ATTR_CHILD_ID="ci";dvt.AdfDiagramParser._ATTR_CLIENT_LAYOUTS="clientLayouts";
dvt.AdfDiagramParser._ATTR_DROP_TARGET_BACKGROUND_COLOR="dropTargetBackgroundColor";dvt.AdfDiagramParser._ATTR_DROP_TARGET_BORDER_COLOR="dropTargetBorderColor";dvt.AdfDiagramParser._ATTR_DROP_TARGET_OPACITY="dropTargetOpacity";dvt.AdfDiagramParser._ATTR_END_CONNECTOR_TYPE="endConnectorType";dvt.AdfDiagramParser._ATTR_GROUP_ID="gi";dvt.AdfDiagramParser._ATTR_LABEL="label";dvt.AdfDiagramParser._ATTR_LAYOUT="layout";dvt.AdfDiagramParser._ATTR_LAYOUT_ATTRS="layoutAttrs";
dvt.AdfDiagramParser.ATTR_DATA_PPR="dataPPR";dvt.AdfDiagramParser._ATTR_LEGEND_JSON_DATA="legendJsonData";dvt.AdfDiagramParser._ATTR_SUMMARY="summary";dvt.AdfDiagramParser._ATTR_LINK_COLOR="linkColor";dvt.AdfDiagramParser._ATTR_LINK_STYLE="linkStyle";dvt.AdfDiagramParser._ATTR_LINK_TYPE="linkType";dvt.AdfDiagramParser._ATTR_LINK_WIDTH="linkWidth";dvt.AdfDiagramParser._ATTR_LINK_LENGTH="linkLength";dvt.AdfDiagramParser._ATTR_PARENT_ID="pi";dvt.AdfDiagramParser._ATTR_POINT_X="pointX";
dvt.AdfDiagramParser._ATTR_POINT_Y="pointY";dvt.AdfDiagramParser._ATTR_ROLLOVER_BEHAVIOR="rolloverBehavior";dvt.AdfDiagramParser._ATTR_SELECTION_MODE="selectionMode";dvt.AdfDiagramParser._ATTR_SELECTABLE="selectable";dvt.AdfDiagramParser._ATTR_SELECTED_NODES="selectedNodes";dvt.AdfDiagramParser._ATTR_SELECTED_LINKS="selectedLinks";dvt.AdfDiagramParser._ATTR_SHOW_DRILL="showDrill";dvt.AdfDiagramParser._ATTR_SHOW_ISOLATE="showIsolate";dvt.AdfDiagramParser._ATTR_SHOW_RESTORE="showRestore";
dvt.AdfDiagramParser._ATTR_SHOW_EXPAND_CHILDREN="showExpandChildren";dvt.AdfDiagramParser._ATTR_SHOW_NODE_ACTIONS="showNodeActions";dvt.AdfDiagramParser._ATTR_SHOW_STACK="showStack";dvt.AdfDiagramParser._ATTR_DISCLOSED_NODES="disclosedNodes";dvt.AdfDiagramParser._ATTR_START_CONNECTOR_TYPE="startConnectorType";dvt.AdfDiagramParser._ATTR_TEMPLATE_ID="ti";dvt.AdfDiagramParser._ATTR_WIDTH="width";dvt.AdfDiagramParser._ATTR_ISOLATED_NODES="isolatedNodes";dvt.AdfDiagramParser._ATTR_EMPTY_TEXT="emptyText";
dvt.AdfDiagramParser._ATTR_MAX_ZOOM="maxZoom";dvt.AdfDiagramParser._ATTR_MIN_ZOOM="minZoom";dvt.AdfDiagramParser._ATTR_CONTROL_PANEL_BEHAVIOR="controlPanelBehavior";dvt.AdfDiagramParser._ATTR_PANNING="pan";dvt.AdfDiagramParser._ATTR_PANDIRECTION="panDirection";dvt.AdfDiagramParser._ATTR_ZOOMING="zoom";dvt.AdfDiagramParser._ATTR_CENTER_NODE="center";dvt.AdfDiagramParser._ATTR_ROOT_NODE="root";dvt.AdfDiagramParser._ATTR_ROW_INDEX="idx";dvt.AdfDiagramParser._ATTR_CONTEXT_MENU_ID="cm";
dvt.AdfDiagramParser._ATTR_STRUCTURE_ONLY="so";dvt.AdfDiagramParser._ATTR_CONTAINER="container";dvt.AdfDiagramParser._ATTR_CHILDREN_FETCHED="cf";dvt.AdfDiagramParser._COLON=":";dvt.AdfDiagramParser._SEMICOLON=";";dvt.AdfDiagramParser._ATTR_OV_WIN_NODE="ovNode";dvt.AdfDiagramParser._ATTR_OV_WIN_DISCLOSED_NODE="ovDisclosedNode";dvt.AdfDiagramParser._ATTR_OV_WIN_VIEWPORT_BG_COLOR="ovViewportBgColor";dvt.AdfDiagramParser._ATTR_OV_WIN_VIEWPORT_BORDER_COLOR="ovViewportBorderColor";
dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER="buttonContainer";dvt.AdfDiagramParser._ATTR_BUTTON_FILL_TYPE="FillType";dvt.AdfDiagramParser._ATTR_BUTTON_BACKGROUND_COLOR="BackgroundColor";dvt.AdfDiagramParser._ATTR_BUTTON_BACKGROUND="Background";dvt.AdfDiagramParser._ATTR_BUTTON_BOX_SHADOW="BoxShadow";dvt.AdfDiagramParser._ATTR_BUTTON_BORDER_COLOR="BorderColor";dvt.AdfDiagramParser._ATTR_BUTTON_LABEL="buttonLabel";dvt.AdfDiagramParser._ATTR_ENABLED_STATE="";dvt.AdfDiagramParser._ATTR_HOVER_STATE="Hover";
dvt.AdfDiagramParser._ATTR_ACTIVE_STATE="Active";dvt.AdfDiagramParser._ATTR_LAYOUT_BEHAVIOR="layoutBehavior";dvt.AdfDiagramParser._ATTR_NODE_SELECT_COLOR=dvt.AdfDiagramNode.SELECTED_COLOR;dvt.AdfDiagramParser._ATTR_NODE_HOVER_INNER_COLOR=dvt.AdfDiagramNode.HOVER_INNER_COLOR;dvt.AdfDiagramParser._ATTR_NODE_HOVER_OUTER_COLOR=dvt.AdfDiagramNode.HOVER_OUTER_COLOR;dvt.AdfDiagramParser._ATTR_NODE_CONTAINER_STYLE=dvt.AdfDiagramNode.CONTAINER_STYLE;dvt.AdfDiagramParser._ATTR_NODE_OVERVIEW_STYLE=dvt.AdfDiagramNode.OVERVIEW_STYLE;
dvt.AdfDiagramParser._ATTR_NODE_OVERVIEW_CONTAINER_STYLE=dvt.AdfDiagramNode.OVERVIEW_CONTAINER_STYLE;dvt.AdfDiagramParser._ATTR_NODE_LABEL_STYLE=dvt.AdfDiagramNode.LABEL_STYLE;dvt.AdfDiagramParser._ATTR_LINK_SELECT_COLOR=dvt.AdfDiagramLink.SELECTED_COLOR;dvt.AdfDiagramParser._ATTR_LINK_HOVER_INNER_COLOR=dvt.AdfDiagramLink.HOVER_INNER_COLOR;dvt.AdfDiagramParser._ATTR_LINK_HOVER_OUTER_COLOR=dvt.AdfDiagramLink.HOVER_OUTER_COLOR;dvt.AdfDiagramParser._ATTR_LINK_PROMOTED_COLOR=dvt.AdfDiagramLink.PROMOTED_COLOR;
dvt.AdfDiagramParser._ATTR_LINK_PROMOTED_STYLE=dvt.AdfDiagramLink.PROMOTED_STYLE;dvt.AdfDiagramParser._ATTR_LINK_PROMOTED_WIDTH=dvt.AdfDiagramLink.PROMOTED_WIDTH;dvt.AdfDiagramParser._ATTR_LINK_LABEL_STYLE=dvt.AdfDiagramLink.LABEL_STYLE;dvt.AdfDiagramParser._LINK_STYLE_CONVERTER={solid:dvt.AdfDiagramLinkDef.LINK_STYLE_SOLID,dashed:dvt.AdfDiagramLinkDef.LINK_STYLE_DASH,dotted:dvt.AdfDiagramLinkDef.LINK_STYLE_DOT,"dashed-dotted":dvt.AdfDiagramLinkDef.LINK_STYLE_DASH_DOT};
dvt.AdfDiagramParser._ATTR_BREADCRUMBS_STYLE="breadcrumbsStyle";dvt.AdfDiagramParser._ATTR_BREADCRUMBS_HOVER_STYLE="breadcrumbsHoverStyle";dvt.AdfDiagramParser._ATTR_BREADCRUMBS_ACTIVE_STYLE="breadcrumbsActiveStyle";dvt.AdfDiagramParser._ATTR_BREADCRUMBS_SELECTED_STYLE="breadcrumbsSelectedStyle";dvt.AdfDiagramParser._ATTR_CONTAINER_STYLE="containerStyle";dvt.AdfDiagramParser._ATTR_OVERVIEW_STYLE="overviewStyle";dvt.AdfDiagramParser._ATTR_OVERVIEW_CONTAINER_STYLE="overviewContainerStyle";
dvt.AdfDiagramParser._ATTR_PAN_X="panX";dvt.AdfDiagramParser._ATTR_PAN_Y="panY";dvt.AdfDiagramParser._ATTR_ZOOM="zoomPct";dvt.AdfDiagramParser._ATTR_EVENT_TYPE="type";dvt.AdfDiagramParser._ATTR_STACK_PREVIEW_COLOR="stackPreviewColor";dvt.AdfDiagramParser._ATTR_STACK_BADGE_STYLE="stackCounterStyle";dvt.AdfDiagramParser._ATTR_UNDERLAY_STYLE="stackStyle";dvt.AdfDiagramParser._ATTR_PREVIEW_NODE="previewRow";dvt.AdfDiagramParser._ATTR_PREVIEW_PAN_X="previewPanX";
dvt.AdfDiagramParser._ATTR_PREVIEW_PAN_Y="previewPanY";dvt.AdfDiagramParser._ATTR_PREVIEW_ZOOM="previewZoom";dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_ENA="buttonStyleEna";dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_OVR="buttonStyleOvr";dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_DWN="buttonStyleDwn";dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_STYLE="paletteSectionStyle";dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_HOVER_STYLE="paletteSectionHoverStyle";
dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_ACTIVE_STYLE="paletteSectionActiveStyle";dvt.AdfDiagramParser._ATTR_PALETTE_ITEM_STYLE="paletteItemStyle";dvt.AdfDiagramParser._ELEM_CARD="c";dvt.AdfDiagramParser._ELEM_CARDS="cd";dvt.AdfDiagramParser._ATTR_NEW_NODE_SDI_MAP="newNodeSdis";dvt.AdfDiagramParser._ATTR_NODE_SDI_MAP="nodeShowDetailItems";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_SKIN="navButtonSkin";dvt.AdfDiagramParser._ATTR_CARD_TEXT="t";dvt.AdfDiagramParser._ATTR_CARD_ICON="i";
dvt.AdfDiagramParser._ATTR_CARD_ID="id";dvt.AdfDiagramParser._ATTR_CARD_INDEXES="cardIndexes";dvt.AdfDiagramParser._ATTR_CARD_FILL_TYPE="cardFillType";dvt.AdfDiagramParser._ATTR_CARD_BORDER_TYPE="cardBorderType";dvt.AdfDiagramParser._ATTR_CARD_BORDER_COLOR="cardBorderColor";dvt.AdfDiagramParser._ATTR_CARD_BACKGROUND_COLOR="cardBackgroundColor";dvt.AdfDiagramParser._ATTR_CARD_BORDER_RADIUS="cardBorderRadius";dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT="cardHeaderStyle";
dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT75="cardHeaderStyle75";dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT50="cardHeaderStyle50";dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT25="cardHeaderStyle25";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_FILL_TYPE="cardNavButtonFillType";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ICON_COLOR="cardNavButtonIconColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_BORDER_COLOR="cardNavButtonBorderColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_BACKGROUND_COLOR="cardNavButtonBackgroundColor";
dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_FILL_TYPE="cardNavButtonHoverFillType";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_ICON_COLOR="cardNavButtonHoverIconColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_BORDER_COLOR="cardNavButtonHoverBorderColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_BACKGROUND_COLOR="cardNavButtonHoverBackgroundColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_FILL_TYPE="cardNavButtonActiveFillType";
dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_ICON_COLOR="cardNavButtonActiveIconColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_BORDER_COLOR="cardNavButtonActiveBorderColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_BACKGROUND_COLOR="cardNavButtonActiveBackgroundColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_FILL_TYPE="cardNavButtonDisabledFillType";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_ICON_COLOR="cardNavButtonDisabledIconColor";
dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_BORDER_COLOR="cardNavButtonDisabledBorderColor";dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_BACKGROUND_COLOR="cardNavButtonDisabledBackgroundColor";dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_VISIBILITY="cardTrainButtonVisibility";dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_BORDER_COLOR="cardTrainButtonBorderColor";dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_BACKGROUND_COLOR="cardTrainButtonBackgroundColor";
dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_BORDER_COLOR="cardTrainButtonActiveBorderColor";dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_BACKGROUND_COLOR="cardTrainButtonActiveBackgroundColor";dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ICON="cardTrainIcon";dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_HOVER_ICON="cardTrainHoverIcon";dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_ICON="cardTrainActiveIcon";dvt.AdfDiagramParser._ATTR_CARD_PREV_ICON="cardPrevIcon";
dvt.AdfDiagramParser._ATTR_CARD_PREV_HOVER_ICON="cardPrevHoverIcon";dvt.AdfDiagramParser._ATTR_CARD_PREV_ACTIVE_ICON="cardPrevActiveIcon";dvt.AdfDiagramParser._ATTR_CARD_PREV_DISABLED_ICON="cardPrevDisabledIcon";dvt.AdfDiagramParser._ATTR_CARD_NEXT_ICON="cardNextIcon";dvt.AdfDiagramParser._ATTR_CARD_NEXT_HOVER_ICON="cardNextHoverIcon";dvt.AdfDiagramParser._ATTR_CARD_NEXT_ACTIVE_ICON="cardNextActiveIcon";dvt.AdfDiagramParser._ATTR_CARD_NEXT_DISABLED_ICON="cardNextDisabledIcon";
dvt.AdfDiagramParser._SEARCH_EVENT="hv_sea";dvt.AdfDiagramParser._SEARCH_EVENT_TYPE_NEXT="next";dvt.AdfDiagramParser._FETCH_EVENT="dvtDiagramFetchEvent";dvt.AdfDiagramParser._PANELCARD_FETCH_EVENT="hv_pcfet";dvt.AdfDiagramParser._ATTR_SCROLLBAR_BACKGROUND="scrollbarBg";dvt.AdfDiagramParser._ATTR_SCROLLBAR_BORDER_COLOR="scrollbarBorderColor";dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_COLOR="scrollbarHandleColor";dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_ACTIVE_COLOR="scrollbarHandleActiveColor";
dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_HOVER_COLOR="scrollbarHandleHoverColor";dvt.AdfDiagramParser.prototype.Init=function(a){this._diagram=a};
dvt.AdfDiagramParser.prototype.loadXmlInitial=function(a,b,c){if(dvt.AdfDiagramParser._ELEM_DIAGRAM_EVENT==a.getName()){b=a.getChildNodes()[0];c=a.getAttr(dvt.AdfDiagramParser._ATTR_EVENT_TYPE);this._diagram._eventType=c;try{if(dvt.AdfDiagramParser._SEARCH_EVENT==c){var d=a.getAttr("clientRowKey"),e=a.getAttr("searchText");this._diagram.LoadSearchResultsData(b,e,dvt.AdfDiagramParser._SEARCH_EVENT_TYPE_NEXT,d)}else if(dvt.AdfDiagramParser._FETCH_EVENT==c){this.LoadDiagramElement(b);var f=a.getAttr("clientRowKey"),
g=a.getAttr("subtype");this._diagram.getNodeById(f).getData().setChildrenFetched(!0);this._diagram._resetTransitionState();dvt.AdfDiagramFetchEvent.DRILL===g?this._diagram.drillNode(f):this._diagram.setNodeDisclosed(f,!0,!1,!0)}else if(dvt.AdfDiagramParser._PANELCARD_FETCH_EVENT==c){var d=a.getAttr("clientRowKey"),h=a.getAttr("nextc"),k=a.getAttr("pchw");this.ParseAdditionalPanelCardData(b);this._diagram.applyPanelCardData(d,h,k)}}finally{this._diagram._eventType=null}this._diagram._handledEventXml=
!0}else this.LoadDiagramElement(a)};
dvt.AdfDiagramParser.prototype.LoadDiagramElement=function(a){if(this.ParseDiagramNodeAttrs(a)){var b=null,c=null,d=a.getElementsByTagName(dvt.AdfDiagramParser._ELEM_SELECTORS);d&&d[0]&&(b=d[0].getAttributes());(d=a.getElementsByTagName(dvt.AdfDiagramParser._ELEM_AF_STYLES))&&d[0]&&(c=d[0].getAttributes());b&&c&&dvt.AfStyleUtils.setTagSkinKeyMap(b,c);(b=a.getElementsByTagName(dvt.AdfDiagramParser._ELEM_CT_STYLES))&&b[0]&&b[0].getAttributes();this.setPanelCardStyles();b=a.getChildNodes();for(c=0;c<
b.length;c++)this.ParseDiagramNodeChild(b[c]);this.ParseDiagramIsolation(a)}};
dvt.AdfDiagramParser.prototype.ParseDiagramNodeAttrs=function(a){var b;this._diagram.parseComponentAttrs(a);this.parseScrollbarStylesAttrs(a);this.parseOverviewContentAttrs(a);this.parseStackingStyles(a);this.parseStackPreview(a);this.parseDiagramButtonStyles(a);this.parseSelection(a);this.parseBreadcrumbsAttrs(a);this.parsePaletteAttrs(a);this.ParseNodeStyles(a);this.ParseLinkStyles(a);if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CLIENT_LAYOUTS)){b=eval("("+b+")");for(var c in b){try{var d=eval(b[c].strMethod);
this._diagram.getLayoutCallback().addLayout(c,d)}catch(f){"ReferenceError"==f.name&&this._diagram.Log(f.name+":"+f.message,"2")}b[c].layoutAttrs&&this._diagram.setLayoutAttributes(c,b[c].layoutAttrs)}}(b=a.getAttr(dvt.AdfDiagramParser._ATTR_LAYOUT))&&this._diagram.setLayout(b);if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_INIT_ANIM))"auto"==b&&(b=dvt.BlackBoxAnimationHandler.ALPHA_FADE),this._diagram.setInitAnim(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_DATA_CHANGE_ANIM))&&this._diagram.setDataChangeAnim(b);
(b=a.getAttr(dvt.AdfDiagramParser._ATTR_ANIMATION_DURATION))&&this._diagram.setAnimationDuration(parseInt(b)/1E3);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_NODE_HIGHLIGHT_BEHAVIOR))&&this._diagram.setNodeHighlightBehavior(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_LINK_HIGHLIGHT_BEHAVIOR))&&this._diagram.setLinkHighlightBehavior(b);if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_HIGHLIGHTED_NODES))this._diagram._highlightedNodes=b.split(",");if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_HIGHLIGHTED_LINKS))this._diagram._highlightedLinks=
b.split(",");b=a.getAttr(dvt.AdfDiagramParser._ATTR_DISCLOSED_NODES);this._diagram._disclosedNodes=b?b.split(","):null;(b=a.getAttr(dvt.AdfDiagramParser._ATTR_ATTR_GRPS))&&this._diagram.setAttributeGroups(b.split(/[\s;]+/));(b=a.getAttr(dvt.AdfDiagramParser._ATTR_UNGROUPED))&&this._diagram.setExplodedStacks(b.split(","));(b=a.getAttr(dvt.AdfDiagramParser._ATTR_HIDDEN))&&this._diagram.setHiddenAttributeGroups(b.split(","));(b=a.getAttr(dvt.AdfDiagramParser._ATTR_ROLLOVER_BEHAVIOR))&&this._diagram.setRolloverBehavior(b);
(b=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY))&&this._diagram.setReadOnly("true"==b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_HAS_DRAG_SOURCE))&&this._diagram.setHasDragSource("true"==b);if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_MAX_ZOOM)){var e=2;b=parseFloat(b);0<b&&(e=b);this._diagram.setMaxZoom(e)}if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_MIN_ZOOM))c=0,b=parseFloat(b),0<b&&(c=Math.min(b,e)),this._diagram.setMinZoom(c);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CONTROL_PANEL_BEHAVIOR))&&
this._diagram.setControlPanelBehavior(b);e=this._diagram.getDisplayedControls();b=a.getAttr(dvt.AdfDiagramParser._ATTR_PANNING);b="none"!=b;this._diagram.SetPanningEnabled(b);b||(e&=~dvt.ControlPanel.CONTROLS_CENTER_BUTTON);b=a.getAttr(dvt.AdfDiagramParser._ATTR_ZOOMING);b="none"!=b;this._diagram.SetZoomingEnabled(b);b||(e&=~dvt.ControlPanel.CONTROLS_ZOOM,e&=~dvt.ControlPanel.CONTROLS_ZOOM_TO_FIT_BUTTON);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_SHOW_RESTORE))&&this._diagram.SetShowRestore("off"==b?
"off":"on");this._diagram.setDisplayedControls(e);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CENTER_NODE))&&this._diagram.setCenterNode(b);if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_ROOT_NODE))this._diagram._drillRoot=b;e={};c=!1;if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_PAN_X))c=!0,e.panX=parseFloat(b);if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_PAN_Y))c=!0,e.panY=parseFloat(b);if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_ZOOM))c=!0,e.zoom=parseFloat(b);c&&(this._diagram._panZoom=e);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_DROP_TARGET_BACKGROUND_COLOR))&&
this._diagram.setDropFeedbackFillColor(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_DROP_TARGET_BORDER_COLOR))&&this._diagram.setDropFeedbackBorderColor(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_DROP_TARGET_OPACITY))&&this._diagram.setDropFeedbackFillAlpha(parseFloat(b));(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_INDEXES))&&this._diagram.setCardIndexes(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_EMPTY_TEXT))&&this._diagram.setEmptyText(b);this.ParsePanelCardAttrs(a);this.ParsePanelCardHeaderAttrs(a);
this.ParsePanelCardNavButtonAttrs(a);this.ParsePanelCardTrainButtonAttrs(a);this.ParsePanelCardNextPrevButtonAttrs(a);return!0};dvt.AdfDiagramParser.prototype.ParseDiagramIsolation=function(a){if(a=a.getAttr(dvt.AdfDiagramParser._ATTR_ISOLATED_NODES))for(this._diagram._isolatedNodes=a.split(","),this._diagram._isolatedNodeMap={},a=0;a<this._diagram._isolatedNodes.length;a++)this._diagram._isolatedNodeMap[this._diagram._isolatedNodes[a]]=!1};
dvt.AdfDiagramParser.prototype.parseSelection=function(a){var b;b=a.getAttr(dvt.AdfDiagramParser._ATTR_SELECTION_MODE);this._diagram.setSelectionMode(b);if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_SELECTED_NODES))this._diagram._selectedNodes=b.split(",");if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_SELECTED_LINKS))this._diagram._selectedLinks=b.split(",")};
dvt.AdfDiagramParser.SplitLayoutAttrsMap=function(a){a=a.split(dvt.AdfDiagramParser._SEMICOLON);for(var b={},c=a.length,d,e=0;e<c;e++)d=a[e],d=d.split(dvt.AdfDiagramParser._COLON),1<d.length&&(b[d[0]]=d[1]);return b};
dvt.AdfDiagramParser.prototype.ParseDiagramNodeChild=function(a){switch(a.getName()){case dvt.AdfDiagramParser._ELEM_TEMPLATES:this.ParseTemplates(a);break;case dvt.AdfDiagramParser._ELEM_DATA:this.ParseData(a);break;case dvt.AdfDiagramParser._ELEM_SHOW_POPUP_BEHAVIOR:this.ParseShowPopupBehavior(a);break;case dvt.AdfDiagramParser._ELEM_CONTEXT_MENU:this._diagram._contextMenuHandler=new dvt.ContextMenuHandler(this._diagram.getCtx(),a);this._diagram.getEventManager().setContextMenuHandler(this._diagram._contextMenuHandler);
break;case dvt.AdfDiagramParser._ELEM_LEGEND:this.ParseLegend(a);break;case dvt.AdfDiagramParser._ELEM_OVERVIEWWINDOW:this.ParseOverviewWindow(a);break;case dvt.AdfDiagramParser._ELEM_RESOURCES:this.ParseResources(a);break;case dvt.AdfDiagramParser._ELEM_CARDS:this.ParseCards(a);break;case dvt.SearchPanel.ELEM_SEARCH_RESULTS_TEMPLATE:case dvt.SearchPanel.ELEM_SEARCH_ADVANCED_TEMPLATE:case dvt.SearchPanel.ELEM_SEARCH_RESULTS_DATA:this._diagram.getSearchPanel(!0).parseNode(a)}};
dvt.AdfDiagramParser.prototype.ParseTemplates=function(a){a=a.getChildNodes();for(var b=0;b<a.length;b++){var c=a[b];switch(c.getName()){case dvt.AdfDiagramParser._ELEM_NODE:this.ParseNode(c);break;case dvt.AdfDiagramParser._ELEM_LINK:this.ParseLink(c)}}};dvt.AdfDiagramParser.prototype.CreateNodeDef=function(){return new dvt.AdfDiagramNodeDef};
dvt.AdfDiagramParser.prototype.ParseNode=function(a){var b=this.CreateNodeDef();this.ParseNodeAttrs(a,b);if((a=a.getChildNodes())&&0<a.length)for(var c,d=0;d<a.length;d++)if(c=a[d],c.getName()===dvt.AdfDiagramParser._ELEM_F){var e=c.getAttr(dvt.AdfDiagramParser._ATTR_AF_NAME);"zoom100"===e||"zoom75"===e||"zoom50"===e||"zoom25"===e?(c=dvt.AfComponentFactory.parseXml(c))&&b.setNodeTemplate(c,e):"label"===e?(c=dvt.AfComponentFactory.parseXml(c))&&b.setLabelTemplate(c):"overlay"===e?(c=dvt.AfComponentFactory.parseXml(c))&&
b.setOverlayTemplate(c):"background"===e?(c=dvt.AfComponentFactory.parseXml(c))&&b.setBackgroundTemplate(c):"containerTop"===e?(c=dvt.AfComponentFactory.parseXml(c))&&b.setContainerTopTemplate(c):"containerBottom"===e?(c=dvt.AfComponentFactory.parseXml(c))&&b.setContainerBottomTemplate(c):"containerLeft"===e?(c=dvt.AfComponentFactory.parseXml(c))&&b.setContainerLeftTemplate(c):"containerRight"===e?(c=dvt.AfComponentFactory.parseXml(c))&&b.setContainerRightTemplate(c):"containerStart"===e?(c=dvt.AfComponentFactory.parseXml(c))&&
(dvt.Agent.isRightToLeft()?b.getContainerRightTemplate()||b.setContainerRightTemplate(c):b.getContainerLeftTemplate()||b.setContainerLeftTemplate(c)):"containerEnd"===e&&(c=dvt.AfComponentFactory.parseXml(c))&&(dvt.Agent.isRightToLeft()?b.getContainerLeftTemplate()||b.setContainerLeftTemplate(c):b.getContainerRightTemplate()||b.setContainerRightTemplate(c));a.splice(d,1);d--}else c.getName()===dvt.AdfDiagramParser._ELEM_SHOW_POPUP_BEHAVIOR?(e=dvt.AfComponentFactory.parseElement(c))&&b.addShowPopupBehavior(e):
c.getName()===dvt.AdfDiagramParser._ELEM_CLIENT_BEHAVIOR&&(e=dvt.AfComponentFactory.parseElement(c))&&b.addClientBehavior(e);this._diagram.addNodeDef(b)};
dvt.AdfDiagramParser.prototype.ParseNodeAttrs=function(a,b){var c;c=a.getAttr(dvt.AdfDiagramParser._ATTR_ID);b.setId(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_WIDTH))&&b.setWidth(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_HEIGHT))&&b.setHeight(c);c=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_INLINE_STYLE);b.setInlineStyle(c);c=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_STYLE_CLASS);b.setStyleClass(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY))&&b.setReadOnly(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_DRAGGABLE))&&
"no"===c.toLowerCase()?b.setDraggable(!1):c&&"yes"===c.toLowerCase()&&b.setDraggable(!0);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_SELECTABLE))&&b.setSelectable(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC))&&b.setShortDesc(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LAYOUT))&&b.setLayout(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LABEL))&&b.setLabel(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_CONTAINER_STYLE))&&b.setContainerStyle(c)};
dvt.AdfDiagramParser.prototype.parseLinkTemplate=function(a){var b=new dvt.AdfDiagramLinkDef,c;c=a.getAttr(dvt.AdfDiagramParser._ATTR_ID);b.setId(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LINK_WIDTH))&&b.setLinkWidth(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LINK_LENGTH))&&b.setLinkLength(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_READ_ONLY))&&b.setReadOnly(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_SELECTABLE))&&b.setSelectable(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LINK_COLOR))&&(c=dvt.AdfDiagramParser.validateColor(c))&&
b.setLinkColor(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LINK_TYPE))&&b.setLinkType(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LABEL))&&b.setLabel(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LINK_STYLE))&&b.setLinkStyle(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_RENDERED))&&b.setRendered(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC))&&b.setShortDesc(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_END_CONNECTOR_TYPE))&&b.setEndConnectorType(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_START_CONNECTOR_TYPE))&&
b.setStartConnectorType(c);if((a=a.getChildNodes())&&0<a.length){var d;for(c=0;c<a.length;c++)if(d=a[c],d.getName()===dvt.AdfDiagramParser._ELEM_F){var e=d.getAttr(dvt.AdfDiagramParser._ATTR_AF_NAME);"endConnector"===e||"startConnector"===e?(d=dvt.AfComponentFactory.parseXml(d))&&b.setConnectorTemplate(d,e):"label"===e&&(d=dvt.AfComponentFactory.parseXml(d))&&b.setLabelTemplate(d)}else d.getName()===dvt.AdfDiagramParser._ELEM_SHOW_POPUP_BEHAVIOR&&(e=dvt.AfComponentFactory.parseElement(d))&&b.addShowPopupBehavior(e)}return b};
dvt.AdfDiagramParser.prototype.ParseLink=function(a){a=this.parseLinkTemplate(a);this._diagram.addLinkDef(a)};dvt.AdfDiagramParser.prototype.ParseData=function(a){a=a.getChildNodes();this._diagram.startParsingData();for(var b=0;b<a.length;b++){var c=a[b];switch(c.getName()){case dvt.AdfDiagramParser._ELEM_NODE_DATA:c=this.ParseNodeData(c);this._diagram.addNodeData(c);break;case dvt.AdfDiagramParser._ELEM_LINK_DATA:c=this.ParseLinkData(c),this._diagram.addLinkData(c)}}this._diagram.stopParsingData()};
dvt.AdfDiagramParser.prototype.ParseShowPopupBehavior=function(a){if(a){a=a.getChildNodes();for(var b=0;b<a.length;b++){var c=dvt.AfComponentFactory.parseElement(a[b]);c&&this._diagram.addShowPopupBehavior(c)}}};dvt.AdfDiagramParser.prototype.CreateNodeData=function(){return new dvt.AdfDiagramNodeData};
dvt.AdfDiagramParser.prototype.ParseNodeData=function(a){var b=this.CreateNodeData(),c;c=a.getAttr(dvt.AdfDiagramParser._ATTR_ID);b.setId(c);c=a.getAttr(dvt.AdfDiagramParser._ATTR_GROUP_ID);b.setGroupId(c);c=a.getAttr(dvt.AdfDiagramParser._ATTR_STRUCTURE_ONLY);if("true"===c)b.setStructureOnly(!0);else{c=a.getAttr(dvt.AdfDiagramParser._ATTR_TEMPLATE_ID);b.setTemplateId(c);c=parseInt(a.getAttr(dvt.AdfDiagramParser._ATTR_ROW_INDEX));b.setRowIndex(c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_ATTR_GRPS))&&
b.setAttributeGroups(c.split(dvt.AdfDiagramParser._SEMICOLON));(c=a.getAttr(dvt.AdfDiagramParser._ATTR_SHOW_ISOLATE))&&b.setShowIsolate("false"!==c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_SHOW_EXPAND_CHILDREN))&&b.setShowExpandChildren("false"!==c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_SHOW_DRILL))&&b.setShowDrill("false"!==c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_SHOW_STACK))&&b.setShowStack("false"!==c);(c=a.getAttr(dvt.AdfDiagramParser._ATTR_SHOW_NODE_ACTIONS))&&b.setShowNodeActions("false"!==
c);if(c=a.getAttr(dvt.AdfDiagramParser._ATTR_LAYOUT_ATTRS))c=eval("("+c+")"),b.setLayoutAttributes(c);if(c=a.getAttr(dvt.AdfDiagramParser._ATTR_CONTAINER))b.setContainer("true"===c),b.isContainer()&&(c=a.getAttr(dvt.AdfDiagramParser._ATTR_CHILDREN_FETCHED))&&b.setChildrenFetched("true"===c);if((a=a.getFirstChild())&&a.getName()===dvt.AdfDiagramParser._ELEM_EL){a=a.getAttributes();for(var d={},e=0;e<a.length;e++)c=a[e],d[c.name]=c.value;b.setElAttributes(d)}}return b};
dvt.AdfDiagramParser.prototype.ParseLinkData=function(a){var b=new DvtAdfDiagramLinkData,c;c=a.getAttr(dvt.AdfDiagramParser._ATTR_ID);b.setId(c);c=a.getAttr(dvt.AdfDiagramParser._ATTR_GROUP_ID);b.setGroupId(c);c=a.getAttr(dvt.AdfDiagramParser._ATTR_TEMPLATE_ID);b.setTemplateId(c);c=a.getAttr(dvt.AdfDiagramParser._ATTR_PARENT_ID);b.setStartId(c);c=a.getAttr(dvt.AdfDiagramParser._ATTR_CHILD_ID);b.setEndId(c);if((c=a.getFirstChild())&&c.getName()===dvt.AdfDiagramParser._ELEM_EL){c=c.getAttributes();
for(var d,e={},f=0;f<c.length;f++)d=c[f],e[d.name]=d.value;b.setElAttributes(e)}c=parseInt(a.getAttr(dvt.AdfDiagramParser._ATTR_ROW_INDEX));b.setRowIndex(c);return b};dvt.AdfDiagramParser.prototype.ParseLegend=function(a){if(a=a.getAttr(dvt.AdfDiagramParser._ATTR_LEGEND_JSON_DATA))a=eval("("+a+")"),this._diagram.SetLegendJson(a)};
dvt.AdfDiagramParser.prototype.ParseOverviewWindow=function(a){var b=new dvt.OverviewWindow(this._diagram.getCtx(),"dgOverviewWindow",0,0,108,81);b.loadXmlNode(a);var c=b.getSkinStyle();c||(c={});c[dvt.OverviewWindow.VIEWPORT_BORDER_COLOR]=a.getAttr(dvt.AdfDiagramParser._ATTR_OV_WIN_VIEWPORT_BORDER_COLOR);c[dvt.OverviewWindow.VIEWPORT_BG_COLOR]=a.getAttr(dvt.AdfDiagramParser._ATTR_OV_WIN_VIEWPORT_BG_COLOR);b.setSkinStyle(c);this._diagram.setOverviewWindow(b)};
dvt.AdfDiagramParser.prototype.ParseResources=function(a){this._diagram.setResources(a)};dvt.AdfDiagramParser.prototype.parseOverviewContentAttrs=function(a){var b=this._diagram.getOverviewWindowContentStyle();b||(b={});b[dvt.AdfDiagram.OVERVIEW_STYLE]=new dvt.CSSStyle(a.getAttr(dvt.AdfDiagramParser._ATTR_OV_WIN_NODE));b[dvt.AdfDiagram.OVERVIEW_CONTAINER_STYLE]=new dvt.CSSStyle(a.getAttr(dvt.AdfDiagramParser._ATTR_OV_WIN_DISCLOSED_NODE));this._diagram.setOverviewWindowContentStyle(b)};
dvt.AdfDiagramParser.validateColor=function(a){dvt.ColorUtils.isColor(a,!1)||(a=dvt.ColorUtils.getColorFromName(a));return a};
dvt.AdfDiagramParser.prototype.ParsePanelCardAttrs=function(a){var b,c=new dvt.CSSStyle,d=!1;if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_FILL_TYPE))c.setStyle(dvt.CSSStyle.FILL_TYPE,b),d=!0;if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_BORDER_TYPE))c.setStyle(dvt.CSSStyle.BORDER_TYPE,b),d=!0;if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_BORDER_COLOR))c.setStyle(dvt.CSSStyle.BORDER_COLOR,b),d=!0;if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_BACKGROUND_COLOR))c.setStyle(dvt.CSSStyle.BACKGROUND_COLOR,
b),d=!0;if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_BORDER_RADIUS))c.setStyle("border-radius",b),d=!0;d&&this._diagram.setCardStyle(c)};
dvt.AdfDiagramParser.prototype.ParsePanelCardHeaderAttrs=function(a){var b,c=this._diagram.getCardHeaderStyle();b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT);this.AddCardHeaderStyle(c,b,"zoom100");b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT75);this.AddCardHeaderStyle(c,b,"zoom75");b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT50);this.AddCardHeaderStyle(c,b,"zoom50");b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT25);this.AddCardHeaderStyle(c,b,"zoom25");this._diagram.setCardHeaderStyle(c)};
dvt.AdfDiagramParser.prototype.ParsePanelCardNavButtonAttrs=function(a){var b,c=new dvt.CSSStyle,d=!1;b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_FILL_TYPE);d=this.AddButtonStyle(c,b,dvt.CSSStyle.FILL_TYPE,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_BORDER_COLOR);d=this.AddButtonStyle(c,b,dvt.CSSStyle.BORDER_COLOR,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ICON_COLOR);d=this.AddButtonStyle(c,b,dvt.CSSStyle.COLOR,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_BACKGROUND_COLOR);
if(d=this.AddButtonStyle(c,b,dvt.CSSStyle.BACKGROUND_COLOR,d))this._diagram.getSkinName()==dvt.CSSStyle.SKIN_SKYROS&&c.setStyle(dvt.CSSStyle.FILL_TYPE,"solid"),this._diagram.setCardNavButtonStyle(c);c=new dvt.CSSStyle;d=!1;b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_FILL_TYPE);d=this.AddButtonStyle(c,b,dvt.CSSStyle.FILL_TYPE,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_BORDER_COLOR);d=this.AddButtonStyle(c,b,dvt.CSSStyle.BORDER_COLOR,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_ICON_COLOR);
d=this.AddButtonStyle(c,b,dvt.CSSStyle.COLOR,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_BACKGROUND_COLOR);if(d=this.AddButtonStyle(c,b,dvt.CSSStyle.BACKGROUND_COLOR,d))this._diagram.getSkinName()==dvt.CSSStyle.SKIN_SKYROS&&c.setStyle(dvt.CSSStyle.FILL_TYPE,"solid"),this._diagram.setCardNavButtonHoverStyle(c);c=new dvt.CSSStyle;d=!1;b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_FILL_TYPE);d=this.AddButtonStyle(c,b,dvt.CSSStyle.FILL_TYPE,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_ICON_COLOR);
d=this.AddButtonStyle(c,b,dvt.CSSStyle.COLOR,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_BORDER_COLOR);d=this.AddButtonStyle(c,b,dvt.CSSStyle.BORDER_COLOR,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_BACKGROUND_COLOR);if(d=this.AddButtonStyle(c,b,dvt.CSSStyle.BACKGROUND_COLOR,d))this._diagram.getSkinName()==dvt.CSSStyle.SKIN_SKYROS&&c.setStyle(dvt.CSSStyle.FILL_TYPE,"solid"),this._diagram.setCardNavButtonActiveStyle(c);c=new dvt.CSSStyle;d=!1;b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_FILL_TYPE);
d=this.AddButtonStyle(c,b,dvt.CSSStyle.FILL_TYPE,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_BORDER_COLOR);d=this.AddButtonStyle(c,b,dvt.CSSStyle.BORDER_COLOR,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_ICON_COLOR);d=this.AddButtonStyle(c,b,dvt.CSSStyle.COLOR,d);b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_BACKGROUND_COLOR);if(d=this.AddButtonStyle(c,b,dvt.CSSStyle.BACKGROUND_COLOR,d))this._diagram.getSkinName()==dvt.CSSStyle.SKIN_SKYROS&&
c.setStyle(dvt.CSSStyle.FILL_TYPE,"solid"),this._diagram.setCardNavButtonDisabledStyle(c)};
dvt.AdfDiagramParser.prototype.ParsePanelCardTrainButtonAttrs=function(a){var b;(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_VISIBILITY))&&"false"===b.toLowerCase()&&this._diagram.setCardTrainButtonVisible(!1);var c,d=new dvt.CSSStyle,e=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ICON);e?(b=!0,d.setIconUrl(e)):(c=!1,b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_BORDER_COLOR),this.AddButtonStyle(d,b,dvt.CSSStyle.BORDER_COLOR,c),b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_BACKGROUND_COLOR),
b=this.AddButtonStyle(d,b,dvt.CSSStyle.BACKGROUND_COLOR,c));b&&this._diagram.setCardTrainButtonStyle(d);d=new dvt.CSSStyle;(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_HOVER_ICON))||(b=e);b&&(d.setIconUrl(b),this._diagram.setCardTrainButtonHoverStyle(d));d=new dvt.CSSStyle;(c=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_ICON))||(c=e);c?(b=!0,d.setIconUrl(c)):(c=!1,b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_BORDER_COLOR),this.AddButtonStyle(d,b,dvt.CSSStyle.BORDER_COLOR,
c),b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_BACKGROUND_COLOR),b=this.AddButtonStyle(d,b,dvt.CSSStyle.BACKGROUND_COLOR,c));b&&this._diagram.setCardTrainButtonActiveStyle(d)};
dvt.AdfDiagramParser.prototype.ParsePanelCardNextPrevButtonAttrs=function(a){var b=dvt.AdfDiagramParser.getButtonImages(a,dvt.AdfDiagramParser._ATTR_CARD_PREV_ICON,dvt.AdfDiagramParser._ATTR_CARD_PREV_HOVER_ICON,dvt.AdfDiagramParser._ATTR_CARD_PREV_ACTIVE_ICON);b&&this._diagram.setCardPrevButtonIcon(b);(b=dvt.AdfDiagramParser.getButtonImages(a,dvt.AdfDiagramParser._ATTR_CARD_NEXT_ICON,dvt.AdfDiagramParser._ATTR_CARD_NEXT_HOVER_ICON,dvt.AdfDiagramParser._ATTR_CARD_NEXT_ACTIVE_ICON))&&this._diagram.setCardNextButtonIcon(b)};
dvt.AdfDiagramParser.prototype.AddButtonStyle=function(a,b,c,d){b&&(a.setStyle(c,b),d=!0);return d};dvt.AdfDiagramParser.prototype.AddCardHeaderStyle=function(a,b,c){if(b){var d=new dvt.CSSStyle;d.parseInlineStyle(b);a[c]=d}};dvt.AdfDiagramParser.prototype.ParseAdditionalPanelCardData=function(a){this._diagram.startParsingPanelCardData();(a=a.getElementsByTagName(dvt.AdfDiagramParser._ELEM_DATA))&&a[0]&&this._parsePanelCardData(a[0]);this._diagram.stopParsingPanelCardData()};
dvt.AdfDiagramParser.prototype._parsePanelCardData=function(a){a=a.getChildNodes();for(var b=0;b<a.length;b++){var c=a[b];c&&c.getName()==dvt.AdfDiagramParser._ELEM_NODE_DATA&&this._parsePanelCardItemData(c)}};dvt.AdfDiagramParser.prototype._parsePanelCardItemData=function(a){var b=a.getAttr(dvt.AdfDiagramParser._ATTR_ID);b&&(a=a.getChildNodes())&&(a=a[0])&&a.getName()==dvt.AdfDiagramParser._ELEM_EL&&this._diagram.addPanelCardData(b,a.getAttributes())};
dvt.AdfDiagramParser.prototype.ParseCards=function(a){var b=a.getAttr(dvt.AdfDiagramParser._ATTR_NODE_SDI_MAP);b&&this._diagram.setNodeShowDetailItemIndexMap(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_NEW_NODE_SDI_MAP))&&this._diagram.setShowDetailItems(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_SKIN))&&this._diagram.setCardNavButtonSkin(b);b=[];a=a.getChildNodes();for(var c=0;c<a.length;c++){var d=a[c];d&&d.getName()==dvt.AdfDiagramParser._ELEM_CARD&&b.push([d.getAttr(dvt.AdfDiagramParser._ATTR_CARD_TEXT),
d.getAttr(dvt.AdfDiagramParser._ATTR_CARD_ICON),d.getAttr(dvt.AdfDiagramParser._ATTR_CARD_ID)])}0<b.length&&this._diagram.setCardSelectorList(b)};
dvt.AdfDiagramParser.prototype.setPanelCardStyles=function(){var a=dvt.AfStyleUtils.getDefaultPanelCardStyles(),b=a[0],c=this._diagram.getCardStyle();b.merge(c);a.push(this._diagram.getCardNavButtonStyle());a.push(this._diagram.getCardNavButtonHoverStyle());a.push(this._diagram.getCardNavButtonActiveStyle());a.push(this._diagram.getCardHeaderStyle().zoom100);a.push(this._diagram.getCardHeaderStyle().zoom75);b=this._diagram.getCardPrevButtonIcon();c=0;if(b)a.push(b[0]),a.push(b[1]),a.push(b[2]);else for(c=
0;3>c;c++)a.push(null);if(b=this._diagram.getCardNextButtonIcon())a.push(b[0]),a.push(b[1]),a.push(b[2]);else for(c=0;3>c;c++)a.push(null);a.push(this._diagram.getCardTrainButtonStyle());a.push(this._diagram.getCardTrainButtonHoverStyle());a.push(this._diagram.getCardTrainButtonActiveStyle());dvt.AfStyleUtils.setPanelCardDefault(a)};
dvt.AdfDiagramParser.getButtonImages=function(a,b,c,d){var e=[];b=a.getAttr(b);c=a.getAttr(c)?a.getAttr(c):b;a=a.getAttr(d)?a.getAttr(d):b;if(b||c||a)e.push(b),e.push(c),e.push(a);else return null;return e};
dvt.AdfDiagramParser.prototype.parseStackingStyles=function(a){var b;(b=a.getAttr(dvt.AdfDiagramParser._ATTR_STACK_PREVIEW_COLOR))&&(b=dvt.AdfDiagramParser.validateColor(b))&&this._diagram.setStackPreviewColor(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_STACK_BADGE_STYLE))&&this._diagram.setStackBadgeStyles(new dvt.CSSStyle(b));(b=a.getAttr(dvt.AdfDiagramParser._ATTR_UNDERLAY_STYLE))&&this._diagram.setStackUnderlayStyles(new dvt.CSSStyle(b))};
dvt.AdfDiagramParser.prototype.parseStackPreview=function(a){var b={},c=!1,d=a.getAttr(dvt.AdfDiagramParser._ATTR_PREVIEW_NODE);d&&(this._diagram._stackPreviewNode=d);if(d=a.getAttr(dvt.AdfDiagramParser._ATTR_PREVIEW_PAN_X))b.panX=parseFloat(d),c=!0;if(d=a.getAttr(dvt.AdfDiagramParser._ATTR_PREVIEW_PAN_Y))b.panY=parseFloat(d),c=!0;if(d=a.getAttr(dvt.AdfDiagramParser._ATTR_PREVIEW_ZOOM))b.zoom=parseFloat(d),c=!0;c&&(this._diagram._stackPreviewPanZoom=b)};
dvt.AdfDiagramParser.prototype.parseDiagramButtonStyles=function(a){var b,c=new dvt.CSSStyle;(b=a.getAttr(dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_ENA))&&c.parseInlineStyle(b);var d;d=(b=a.getAttr(dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_OVR))?new dvt.CSSStyle(b):c.clone();a=(b=a.getAttr(dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_DWN))?new dvt.CSSStyle(b):c.clone();b=[];b[dvt.AdfDiagram.BUTTON_STATE_ENA]=c;b[dvt.AdfDiagram.BUTTON_STATE_OVR]=d;b[dvt.AdfDiagram.BUTTON_STATE_DWN]=a;this._diagram.setDiagramButtonStyles(b)};
dvt.AdfDiagramParser.prototype.parseBreadcrumbsAttrs=function(a){(a=dvt.AdfDiagramParser.getBreadcrumbsStyles(a,dvt.AdfDiagramParser._ATTR_BREADCRUMBS_STYLE,dvt.AdfDiagramParser._ATTR_BREADCRUMBS_HOVER_STYLE,dvt.AdfDiagramParser._ATTR_BREADCRUMBS_ACTIVE_STYLE,dvt.AdfDiagramParser._ATTR_BREADCRUMBS_SELECTED_STYLE))&&this._diagram.setBreadcrumbsStyles(a)};
dvt.AdfDiagramParser.getBreadcrumbsStyles=function(a,b,c,d,e){b=a.getAttr(b);c=a.getAttr(c)?a.getAttr(c):b;d=a.getAttr(d)?a.getAttr(d):b;a=a.getAttr(e)?a.getAttr(e):b;c=dvt.AdfDiagramParser.mergeStyles(b,c);d=dvt.AdfDiagramParser.mergeStyles(b,d);a=dvt.AdfDiagramParser.mergeStyles(b,a);e=[];e[dvt.AdfDiagram.BUTTON_STATE_ENA]=b;e[dvt.AdfDiagram.BUTTON_STATE_OVR]=c;e[dvt.AdfDiagram.BUTTON_STATE_DWN]=d;e[dvt.AdfDiagram.BUTTON_STATE_DIS]=a;return e};
dvt.AdfDiagramParser.mergeStyles=function(a,b){if(!a)return null;if(a==b)return a;var c=a;b&&(c=new dvt.CSSStyle(a),c.parseInlineStyle(b),c=c.toString());return c};
dvt.AdfDiagramParser.prototype.ParseNodeStyles=function(a){var b={},c=!1,d=a.getAttr(dvt.AdfDiagramNode.SELECTED_COLOR);d&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramNode.SELECTED_COLOR]=d);(d=a.getAttr(dvt.AdfDiagramNode.HOVER_INNER_COLOR))&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramNode.HOVER_INNER_COLOR]=d);(d=a.getAttr(dvt.AdfDiagramNode.HOVER_OUTER_COLOR))&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramNode.HOVER_OUTER_COLOR]=d);
if(d=a.getAttr(dvt.AdfDiagramNode.CONTAINER_STYLE))c=!0,b[dvt.AdfDiagramNode.CONTAINER_STYLE]=new dvt.CSSStyle(d);if(d=a.getAttr(dvt.AdfDiagramNode.LABEL_STYLE))c=!0,b[dvt.AdfDiagramNode.LABEL_STYLE]=new dvt.CSSStyle(d);c&&this._diagram.setNodeStyles(b)};
dvt.AdfDiagramParser.prototype.ParseLinkStyles=function(a){var b={},c=!1,d=a.getAttr(dvt.AdfDiagramParser._ATTR_LINK_COLOR);d&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.COLOR]=d);(d=a.getAttr(dvt.AdfDiagramLink.SELECTED_COLOR))&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.SELECTED_COLOR]=d);(d=a.getAttr(dvt.AdfDiagramLink.HOVER_INNER_COLOR))&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.HOVER_INNER_COLOR]=d);(d=a.getAttr(dvt.AdfDiagramLink.HOVER_OUTER_COLOR))&&
(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.HOVER_OUTER_COLOR]=d);if(d=a.getAttr(dvt.AdfDiagramLink.LABEL_STYLE))c=!0,b[dvt.AdfDiagramLink.LABEL_STYLE]=new dvt.CSSStyle(d);(d=a.getAttr(dvt.AdfDiagramLink.PROMOTED_COLOR))&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.PROMOTED_COLOR]=d);if(d=a.getAttr(dvt.AdfDiagramLink.PROMOTED_STYLE))c=!0,d=dvt.AdfDiagramParser._LINK_STYLE_CONVERTER[d],b[dvt.AdfDiagramLink.PROMOTED_STYLE]=d?d:dvt.AdfDiagramLinkDef.LINK_STYLE_DOT;
(d=a.getAttr(dvt.AdfDiagramLink.PROMOTED_WIDTH))&&!isNaN(parseInt(d))&&(c=!0,b[dvt.AdfDiagramLink.PROMOTED_WIDTH]=d);c&&this._diagram.setLinkStyles(b)};
dvt.AdfDiagramParser.prototype.ParseButtonStyle=function(a){var b=[],c=[];this.ParseButtonContainerStyle(a,b,dvt.AdfDiagramParser._ATTR_ENABLED_STATE);this.ParseButtonContainerStyle(a,b,dvt.AdfDiagramParser._ATTR_HOVER_STATE);this.ParseButtonContainerStyle(a,b,dvt.AdfDiagramParser._ATTR_ACTIVE_STATE);this._diagram.setButtonStyle(b);this.ParseButtonLabelStyle(a,c,dvt.AdfDiagramParser._ATTR_ENABLED_STATE);this.ParseButtonLabelStyle(a,c,dvt.AdfDiagramParser._ATTR_HOVER_STATE);this.ParseButtonLabelStyle(a,
c,dvt.AdfDiagramParser._ATTR_ACTIVE_STATE);this._diagram.setLabelStyle(c)};
dvt.AdfDiagramParser.prototype.ParseButtonContainerStyle=function(a,b,c){var d,e=new dvt.CSSStyle,f=!1;(d=a.getAttr(dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER+c+dvt.AdfDiagramParser._ATTR_BUTTON_FILL_TYPE))&&(f=this.AddButtonStyle(e,d,dvt.CSSStyle.FILL_TYPE,f));(d=a.getAttr(dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER+c+dvt.AdfDiagramParser._ATTR_BUTTON_BACKGROUND_COLOR))&&(f=this.AddButtonStyle(e,d,dvt.CSSStyle.BACKGROUND_COLOR,f));(d=a.getAttr(dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER+c+dvt.AdfDiagramParser._ATTR_BUTTON_BACKGROUND))&&
(f=this.AddButtonStyle(e,d,dvt.CSSStyle.BACKGROUND,f));(d=a.getAttr(dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER+c+dvt.AdfDiagramParser._ATTR_BUTTON_BORDER_COLOR))&&(f=this.AddButtonStyle(e,d,dvt.CSSStyle.BORDER_COLOR,f));f?b.push(e):b.push(null)};dvt.AdfDiagramParser.prototype.ParseButtonLabelStyle=function(a,b,c){(a=a.getAttr(dvt.AdfDiagramParser._ATTR_BUTTON_LABEL+c))?(c=new dvt.CSSStyle,c.parseInlineStyle(a),b.push(c)):b.push(null)};
dvt.AdfDiagramParser.prototype.parsePaletteAttrs=function(a){var b,c=new dvt.CSSStyle;(b=a.getAttr(dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_STYLE))&&c.parseInlineStyle(b);(b=a.getAttr(dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_HOVER_STYLE))?new dvt.CSSStyle(b):c.clone();(b=a.getAttr(dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_ACTIVE_STYLE))?new dvt.CSSStyle(b):c.clone();var d={};d.skin=this._diagram.getSkinName();d.sectionHeader={};d.sectionHeader.styleEna=c;d.sectionHeader.styleOvr=c;d.sectionHeader.styleDwn=
c;c=new dvt.CSSStyle;if(b=a.getAttr(dvt.AdfDiagramParser._ATTR_PALETTE_ITEM_STYLE))c.parseInlineStyle(b),d.sectionItem={},d.sectionItem.style=c;this._diagram.setPaletteStyles(d)};
dvt.AdfDiagramParser.prototype.parseScrollbarStylesAttrs=function(a){var b={};dvt.StyleUtils.setStyle(b,DvtScrollbar.BACKGROUND,a.getAttr(dvt.AdfDiagramParser._ATTR_SCROLLBAR_BACKGROUND));dvt.StyleUtils.setStyle(b,DvtScrollbar.BORDER_COLOR,a.getAttr(dvt.AdfDiagramParser._ATTR_SCROLLBAR_BORDER_COLOR));dvt.StyleUtils.setStyle(b,DvtScrollbar.HANDLE_COLOR,a.getAttr(dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_COLOR));dvt.StyleUtils.setStyle(b,DvtScrollbar.HANDLE_ACTIVE_COLOR,a.getAttr(dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_ACTIVE_COLOR));
dvt.StyleUtils.setStyle(b,DvtScrollbar.HANDLE_HOVER_COLOR,a.getAttr(dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_HOVER_COLOR));a=dvt.JsonUtils.merge(b,this._diagram.getSubcomponentStyles());this._diagram.setSubcomponentStyles(a)};
dvt.AdfDiagramJsonParser=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(dvt.AdfDiagramJsonParser,dvt.Obj,"dvt.AdfDiagramJsonParser");dvt.AdfDiagramJsonParser.prototype.Init=function(a,b){this._diagramParser=a;this._diagram=b};
dvt.AdfDiagramJsonParser.prototype.loadJsonInitial=function(a,b,c){if(b=a[dvt.AdfDiagramParser._ELEM_DIAGRAM_EVENT]){c=b[dvt.AdfDiagramParser._ATTR_EVENT_TYPE];this._diagram._eventType=c;try{if(dvt.AdfDiagramParser._SEARCH_EVENT==c){var d=b.clientRowKey;this._diagram.LoadSearchResultsDataJson(a,b.searchText,dvt.AdfDiagramParser._SEARCH_EVENT_TYPE_NEXT,d)}else if(dvt.AdfDiagramParser._FETCH_EVENT==c){this.LoadDiagramElement(a);var e=b.clientRowKey,f=b.subtype;this._diagram.getNodeById(e).getData().setChildrenFetched(!0);
this._diagram._resetTransitionState();dvt.AdfDiagramFetchEvent.DRILL===f?this._diagram.drillNode(e):this._diagram.setNodeDisclosed(e,!0,!1,!0);this._diagram.setInteractionEnabled(!0)}else if(dvt.AdfDiagramParser._PANELCARD_FETCH_EVENT==c){var d=b.clientRowKey,g=b.nextc,h=b.pchw;this.ParseAdditionalPanelCardData(a);this._diagram.applyPanelCardData(d,g,h)}}finally{this._diagram._eventType=null}this._diagram._handledEventXml=!0}else if(a[dvt.AdfDiagramParser.ATTR_DATA_PPR]){if(d=a[dvt.AdfDiagramParser._ELEM_DATA]){if(e=
d[dvt.AdfDiagramParser._ELEM_NODE_DATA])for(a=0;a<e.length;a++)if(f=this._diagram.getNodeById(e[a][dvt.AdfDiagramParser._ATTR_ID]))this.parseNode(e[a],f.getData(),this._diagramParser),f.setNodeDef(f.getNodeDef()),f.FullRenderNode(!0);if(d=d[dvt.AdfDiagramParser._ELEM_LINK_DATA])for(a=0;a<d.length;a++)if(e=this._diagram.getLinkbyId(d[a][dvt.AdfDiagramParser._ATTR_ID]))this.parseLink(d[a],e.getData(),this._diagramParser),e.setLinkDef(e.getLinkDef()),e.renderLink()}this._diagram._handledEventXml=!0}else this._diagram.resetInteractionEnabled(),
this.LoadDiagramElement(a)};dvt.AdfDiagramJsonParser.prototype.LoadDiagramElement=function(a){this.ParseDiagramNodeJson(a)&&this.ParseJsonAttributes(a)};dvt.AdfDiagramJsonParser.prototype.ParseJsonAttributes=function(a){if(a){var b=a[dvt.AdfDiagramParser._ELEM_SELECTORS],c=a[dvt.AdfDiagramParser._ELEM_AF_STYLES];b&&c&&dvt.AfStyleUtils.setTagSkinKeyMapJSON(b,c);(b=a[dvt.AdfDiagramParser._ELEM_CT_STYLES])&&b[0].getAttributes();this._diagramParser.setPanelCardStyles();this.ParseDiagramNodeChild(a);this.ParseDiagramIsolation(a)}};
dvt.AdfDiagramJsonParser.prototype.ParseDiagramNodeChild=function(a){var b=a[dvt.AdfDiagramParser._ELEM_TEMPLATES];if(b){var c=b[dvt.AdfDiagramParser._ELEM_NODE];c&&this.parseNodeTemplates(c,this._diagramParser);(c=b[dvt.AdfDiagramParser._ELEM_LINK])&&this.parseLinkTemplates(c,this._diagramParser)}if(c=a[dvt.AdfDiagramParser._ELEM_DATA])if(b=c[dvt.AdfDiagramParser._ELEM_NODE_DATA],c=c[dvt.AdfDiagramParser._ELEM_LINK_DATA],b||c)this._diagram.startParsingData(),b&&this.parseNodeData(b,this._diagramParser),
c&&this.parseLinkData(c,this._diagramParser),(b=a[dvt.AdfDiagramParser._ELEM_CARDS])&&this.parseCards(b,this),this._diagram.stopParsingData();if(b=a[dvt.AdfDiagramParser._ELEM_SHOW_POPUP_BEHAVIOR])if(b=b.children)for(c=0;c<b.length;c++){var d=dvt.AfComponentFactory.parseJsonElement(b[c]);d&&b[c].component==dvt.AdfDiagramParser._ELEM_SHOW_POPUP_BEHAVIOR&&this._diagram.addShowPopupBehavior(d)}if(b=a[dvt.AdfDiagramParser._ELEM_CONTEXT_MENU])this._diagram._contextMenuHandler=new dvt.ContextMenuHandler(this._diagram.getCtx(),
b),this._diagram.getEventManager().setContextMenuHandler(this._diagram._contextMenuHandler);(b=a[dvt.AdfDiagramParser._ELEM_LEGEND])&&this._diagram.SetLegendJson(b);(b=a[dvt.AdfDiagramParser._ELEM_OVERVIEWWINDOW])&&this.ParseOverviewWindow(b,this);(b=a[dvt.AdfDiagramParser._ELEM_PALETTE])&&this._diagram.SetPaletteJson(b);b=a[dvt.SearchPanel.ELEM_SEARCH_ADVANCED_TEMPLATE];c=a[dvt.SearchPanel.ELEM_SEARCH_RESULTS_DATA];(a[dvt.SearchPanel.ELEM_SEARCH_RESULTS_TEMPLATE]||b||c)&&this._diagram.getSearchPanel(!0).parseNodeJson(a)};
dvt.AdfDiagramJsonParser.prototype.ParseDiagramNodeJson=function(a){var b;this._diagram.parseComponentJson(a);this.parseScrollbarStylesJson(a);this.parseOverviewContentJson(a);this.parseStackingStylesJson(a);this.parseStackPreviewJson(a);this.parseDiagramButtonStylesJson(a);this.parseSelectionJson(a);this.parseBreadcrumbsJson(a);this.parsePaletteJson(a);this.ParseNodeStylesJson(a);this.ParseLinkStylesJson(a);b=a[dvt.AdfDiagramParser._ATTR_CLIENT_LAYOUTS];for(var c in b){try{var d=window,e=b[c].strMethod.split(".");
for(i=0;i<e.length;i++)d=d[e[i]];var f=function(a){return function(b){a(b)}}(d);this._diagram.getLayoutCallback().addLayout(c,f)}catch(h){"ReferenceError"==h.name&&this._diagram.Log(h.name+":"+h.message,"2")}b[c].layoutAttrs&&this._diagram.setLayoutAttributes(c,b[c].layoutAttrs)}(b=a[dvt.AdfDiagramParser._ATTR_SUMMARY])&&this._diagram.setSummary(b);(b=a[dvt.AdfDiagramParser._ATTR_LAYOUT])&&this._diagram.setLayout(b);if(b=a[dvt.AdfDiagramParser._ATTR_INIT_ANIM])"auto"==b&&(b=dvt.BlackBoxAnimationHandler.ALPHA_FADE),
this._diagram.setInitAnim(b);(b=a[dvt.AdfDiagramParser._ATTR_DATA_CHANGE_ANIM])&&this._diagram.setDataChangeAnim(b);b=a[dvt.AdfDiagramParser._ATTR_ANIMATION_DURATION];isNaN(b)||this._diagram.setAnimationDuration(parseInt(b)/1E3);(b=a[dvt.AdfDiagramParser._ATTR_NODE_HIGHLIGHT_BEHAVIOR])&&this._diagram.setNodeHighlightBehavior(b);(b=a[dvt.AdfDiagramParser._ATTR_LINK_HIGHLIGHT_BEHAVIOR])&&this._diagram.setLinkHighlightBehavior(b);b=a[dvt.AdfDiagramParser._ATTR_HIGHLIGHTED_NODES];this._diagram._highlightedNodes=
b?b.split(","):null;b=a[dvt.AdfDiagramParser._ATTR_HIGHLIGHTED_LINKS];this._diagram._highlightedLinks=b?b.split(","):null;b=a[dvt.AdfDiagramParser._ATTR_DISCLOSED_NODES];this._diagram._disclosedNodes=b?b.split(","):null;b=a[dvt.AdfDiagramParser._ATTR_LAYOUT_BEHAVIOR];this._diagram._layoutBehavior=b?b:"container";(b=a[dvt.AdfDiagramParser._ATTR_ATTR_GRPS])&&this._diagram.setAttributeGroups(b.split(/[\s;]+/));(b=a[dvt.AdfDiagramParser._ATTR_UNGROUPED])&&this._diagram.setExplodedStacks(b.split(","));
(b=a[dvt.AdfDiagramParser._ATTR_HIDDEN])&&this._diagram.setHiddenAttributeGroups(b.split(","));(b=a[dvt.AdfDiagramParser._ATTR_ROLLOVER_BEHAVIOR])&&this._diagram.setRolloverBehavior(b);b=a[dvt.AdfDiagramParser._ATTR_AF_READ_ONLY];this._diagram.setReadOnly(0!=b);(b=a[dvt.AdfDiagramParser._ATTR_AF_HAS_DRAG_SOURCE])&&this._diagram.setHasDragSource(b);b=a[dvt.AdfDiagramParser._ATTR_MAX_ZOOM];if(!isNaN(b)){var g=2;b=parseFloat(b);0<b&&(g=b);this._diagram.setMaxZoom(g)}b=a[dvt.AdfDiagramParser._ATTR_MIN_ZOOM];
isNaN(b)||(c=0,b=parseFloat(b),0<b&&(c=Math.min(b,g)),this._diagram.setMinZoom(c));(b=a[dvt.AdfDiagramParser._ATTR_CONTROL_PANEL_BEHAVIOR])&&this._diagram.setControlPanelBehavior(b);g=this._diagram.getDisplayedControls();b=a[dvt.AdfDiagramParser._ATTR_PANNING];b="none"!=b;this._diagram.SetPanningEnabled(b);b?(g|=dvt.ControlPanel.CONTROLS_CENTER_BUTTON,(b=a[dvt.AdfDiagramParser._ATTR_PANDIRECTION])&&this._diagram.setPanDirection(b)):g&=~dvt.ControlPanel.CONTROLS_CENTER_BUTTON;b=a[dvt.AdfDiagramParser._ATTR_ZOOMING];
b="none"!=b;this._diagram.SetZoomingEnabled(b);b?(g|=dvt.ControlPanel.CONTROLS_ZOOM,g|=dvt.ControlPanel.CONTROLS_ZOOM_TO_FIT_BUTTON):(g&=~dvt.ControlPanel.CONTROLS_ZOOM,g&=~dvt.ControlPanel.CONTROLS_ZOOM_TO_FIT_BUTTON);this._diagram.setDisplayedControls(g);(b=a[dvt.AdfDiagramParser._ATTR_SHOW_RESTORE])&&this._diagram.SetShowRestore("off"==b?"off":"on");(b=a[dvt.AdfDiagramParser._ATTR_CENTER_NODE])&&this._diagram.setCenterNode(b);if(b=a[dvt.AdfDiagramParser._ATTR_ROOT_NODE])this._diagram._drillRoot=
b;g={};c=!1;b=a[dvt.AdfDiagramParser._ATTR_PAN_X];isNaN(b)||(c=!0,g.panX=parseFloat(b));b=a[dvt.AdfDiagramParser._ATTR_PAN_Y];isNaN(b)||(c=!0,g.panY=parseFloat(b));b=a[dvt.AdfDiagramParser._ATTR_ZOOM];isNaN(b)||(c=!0,g.zoom=parseFloat(b));c&&(this._diagram._panZoom=g);(b=a[dvt.AdfDiagramParser._ATTR_DROP_TARGET_BACKGROUND_COLOR])&&this._diagram.setDropFeedbackFillColor(b);(b=a[dvt.AdfDiagramParser._ATTR_DROP_TARGET_BORDER_COLOR])&&this._diagram.setDropFeedbackBorderColor(b);(b=a[dvt.AdfDiagramParser._ATTR_DROP_TARGET_OPACITY])&&
this._diagram.setDropFeedbackFillAlpha(parseFloat(b));(b=a[dvt.AdfDiagramParser._ATTR_CARD_INDEXES])&&this._diagram.setCardIndexes(b);(b=a[dvt.AdfDiagramParser._ATTR_EMPTY_TEXT])&&this._diagram.setEmptyText(b);if(b=a.convertDataFlavorFunc)this._diagram.ConvertDataFlavorFunc=function(a){a=a.split("/");return 0<=a[0].indexOf("UIComponent")?AdfDataFlavor.getDataFlavorForClass(AdfUIComponent,1<a.length?a[1]:void 0):0<=a[0].indexOf("RowKeySet")?AdfDataFlavor.getRowKeyDataFlavor(1<a.length?a[1]:void 0):
0<=a[0].indexOf("String")?AdfDataFlavor.STRING_FLAVOR:AdfDataFlavor.ANY_FLAVOR};if(b=a[dvt.AdfDiagramParser._ATTR_AF_DROP_FLAVORS])this._diagram.DropFlavors=dvt.AdfDiagramJsonParser.ParseDropFlavors(b,this._diagram.ConvertDataFlavorFunc);this.ParsePanelCardJson(a);this.ParsePanelCardHeaderJson(a);this.ParsePanelCardNavButtonJson(a);this.ParsePanelCardTrainButtonJson(a);this.ParsePanelCardNextPrevButtonJson(a);return!0};
dvt.AdfDiagramJsonParser.prototype.ParseAdditionalPanelCardData=function(a){this._diagram.startParsingPanelCardData();(a=a[dvt.AdfDiagramParser._ELEM_DATA])&&this._parsePanelCardData(a);this._diagram.stopParsingPanelCardData()};dvt.AdfDiagramJsonParser.prototype._parsePanelCardData=function(a){if(a=a[dvt.AdfDiagramParser._ELEM_NODE_DATA])for(var b=0;b<a.length;b++)this._parsePanelCardItemData(a[b])};
dvt.AdfDiagramJsonParser.prototype._parsePanelCardItemData=function(a){var b=a[dvt.AdfDiagramParser._ATTR_ID];b&&(a=a[dvt.AdfDiagramParser._ELEM_EL])&&this._diagram.addPanelCardDataJson(b,a)};dvt.AdfDiagramJsonParser.prototype.parseNodeTemplates=function(a,b){for(var c=0;c<a.length;c++){var d=b.CreateNodeDef();this.parseNodeAttributes(a[c],d);this.parseNodeFacets(a[c],d);b._diagram.addNodeDef(d)}};
dvt.AdfDiagramJsonParser.prototype.parseNodeAttributes=function(a,b){var c,d;for(d in a)if(a.hasOwnProperty(d))switch(c=a[d],d){case dvt.AdfDiagramParser._ATTR_ID:b.setId(c);break;case dvt.AdfDiagramParser._ATTR_WIDTH:b.setWidth(c);break;case dvt.AdfDiagramParser._ATTR_HEIGHT:b.setHeight(c);break;case dvt.AdfDiagramParser._ATTR_AF_INLINE_STYLE:b.setInlineStyle(c);break;case dvt.AdfDiagramParser._ATTR_AF_STYLE_CLASS:b.setStyleClass(c);break;case dvt.AdfDiagramParser._ATTR_AF_READ_ONLY:b.setReadOnly(c);
break;case dvt.AdfDiagramParser._ATTR_AF_DRAGGABLE:b.setDraggable(c);break;case dvt.AdfDiagramParser._ATTR_AF_DRAG_FLAVOR:b.setDragFlavor(c);break;case dvt.AdfDiagramParser._ATTR_AF_DROP_FLAVORS:b.setDropFlavors(c);break;case dvt.AdfDiagramParser._ATTR_SELECTABLE:b.setSelectable(c);break;case dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC:b.setShortDesc(c);break;case dvt.AdfDiagramParser._ATTR_LAYOUT:b.setLayout(c);break;case dvt.AdfDiagramParser._ATTR_LABEL:b.setLabel(c);break;case dvt.AdfDiagramParser._ATTR_CONTAINER_STYLE:b.setContainerStyle(c);
break;case dvt.AdfDiagramParser._ATTR_OVERVIEW_STYLE:b.setOverviewStyle(c);break;case dvt.AdfDiagramParser._ATTR_OVERVIEW_CONTAINER_STYLE:b.setOverviewContainerStyle(c)}};
dvt.AdfDiagramJsonParser.prototype.parseNodeFacets=function(a,b){var c,d;for(d in a)if(a.hasOwnProperty(d))if(c=a[d],"zoom100"===d||"zoom75"===d||"zoom50"===d||"zoom25"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setNodeTemplate(c,d);else if("label"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setLabelTemplate(c);else if("overlay"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setOverlayTemplate(c);else if("background"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setBackgroundTemplate(c);else if("containerTop"===
d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setContainerTopTemplate(c);else if("containerBottom"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setContainerBottomTemplate(c);else if("containerLeft"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setContainerLeftTemplate(c);else if("containerRight"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setContainerRightTemplate(c);else if("containerStart"===d)(c=dvt.AfComponentFactory.parseJson(c))&&(dvt.Agent.isRightToLeft(this._diagram.getCtx())?b.getContainerRightTemplate()||
b.setContainerRightTemplate(c):b.getContainerLeftTemplate()||b.setContainerLeftTemplate(c));else if("containerEnd"===d)(c=dvt.AfComponentFactory.parseJson(c))&&(dvt.Agent.isRightToLeft(this._diagram.getCtx())?b.getContainerLeftTemplate()||b.setContainerLeftTemplate(c):b.getContainerRightTemplate()||b.setContainerRightTemplate(c));else if("children"===d)for(var e=0;e<c.length;e++){var f=dvt.AfComponentFactory.parseJsonElement(c[e]),g=c[e].component;g&&f&&(g===dvt.AdfDiagramParser._ELEM_SHOW_POPUP_BEHAVIOR?
b.addShowPopupBehavior(f):g===dvt.AdfDiagramParser._ELEM_CLIENT_BEHAVIOR&&b.addClientBehavior(f))}};dvt.AdfDiagramJsonParser.prototype.parseLinkTemplates=function(a,b){for(var c=0;c<a.length;c++){var d=this.parseLinkTemplate(a[c]);b._diagram.addLinkDef(d)}};dvt.AdfDiagramJsonParser.prototype.parseLinkTemplate=function(a){var b=new dvt.AdfDiagramLinkDef;this.parseLinkAttributes(a,b);this.parseLinkFacets(a,b);return b};
dvt.AdfDiagramJsonParser.prototype.parseLinkAttributes=function(a,b){var c,d;for(d in a)if(a.hasOwnProperty(d))switch(c=a[d],d){case dvt.AdfDiagramParser._ATTR_ID:b.setId(c);break;case dvt.AdfDiagramParser._ATTR_LINK_WIDTH:b.setLinkWidth(c);break;case dvt.AdfDiagramParser._ATTR_LINK_LENGTH:b.setLinkLength(c);break;case dvt.AdfDiagramParser._ATTR_AF_READ_ONLY:b.setReadOnly(c);break;case dvt.AdfDiagramParser._ATTR_SELECTABLE:b.setSelectable(c);break;case dvt.AdfDiagramParser._ATTR_LINK_COLOR:dvt.AdfDiagramParser.validateColor(c)&&
b.setLinkColor(c);break;case dvt.AdfDiagramParser._ATTR_LINK_TYPE:b.setLinkType(c);break;case dvt.AdfDiagramParser._ATTR_LABEL:b.setLabel(c);break;case dvt.AdfDiagramParser._ATTR_LINK_STYLE:b.setLinkStyle(c);break;case dvt.AdfDiagramParser._ATTR_AF_RENDERED:b.setRendered(c);break;case dvt.AdfDiagramParser._ATTR_AF_SHORT_DESC:b.setShortDesc(c);break;case dvt.AdfDiagramParser._ATTR_END_CONNECTOR_TYPE:b.setEndConnectorType(c);break;case dvt.AdfDiagramParser._ATTR_START_CONNECTOR_TYPE:b.setStartConnectorType(c)}};
dvt.AdfDiagramJsonParser.prototype.parseLinkFacets=function(a,b){var c,d;for(d in a)if(a.hasOwnProperty(d))if(c=a[d],"endConnector"===d||"startConnector"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setConnectorTemplate(c,d);else if("label"===d)(c=dvt.AfComponentFactory.parseJson(c))&&b.setLabelTemplate(c,d);else if("children"===d)for(var e=0;e<c.length;e++){var f=dvt.AfComponentFactory.parseJsonElement(c[e]);c[e].component===dvt.AdfDiagramParser._ELEM_SHOW_POPUP_BEHAVIOR&&f&&b.addShowPopupBehavior(f)}};
dvt.AdfDiagramJsonParser.prototype.parseNodeData=function(a,b){for(var c=0;c<a.length;c++){var d=b.CreateNodeData();this.parseNode(a[c],d,b);b._diagram.addNodeData(d)}};
dvt.AdfDiagramJsonParser.prototype.parseNode=function(a,b,c){for(var d in a)if(a.hasOwnProperty(d))switch(c=a[d],d){case dvt.AdfDiagramParser._ATTR_ID:b.setId(c);break;case dvt.AdfDiagramParser._ATTR_GROUP_ID:b.setGroupId(c);break;case dvt.AdfDiagramParser._ATTR_STRUCTURE_ONLY:!0===c&&b.setStructureOnly(!0);break;case dvt.AdfDiagramParser._ATTR_TEMPLATE_ID:b.setTemplateId(c);break;case dvt.AdfDiagramParser._ATTR_ROW_INDEX:b.setRowIndex(parseInt(c));break;case dvt.AdfDiagramParser._ATTR_ATTR_GRPS:b.setAttributeGroups(c.split(dvt.AdfDiagramParser._SEMICOLON));
break;case dvt.AdfDiagramParser._ATTR_SHOW_ISOLATE:b.setShowIsolate(c);break;case dvt.AdfDiagramParser._ATTR_SHOW_EXPAND_CHILDREN:b.setShowExpandChildren(c);break;case dvt.AdfDiagramParser._ATTR_SHOW_DRILL:b.setShowDrill(c);break;case dvt.AdfDiagramParser._ATTR_SHOW_STACK:b.setShowStack(c);break;case dvt.AdfDiagramParser._ATTR_SHOW_NODE_ACTIONS:b.setShowNodeActions(c);break;case dvt.AdfDiagramParser._ATTR_LAYOUT_ATTRS:b.setLayoutAttributes(c);break;case dvt.AdfDiagramParser._ATTR_CONTAINER:b.setContainer(c);
b.isContainer()&&(c=a[dvt.AdfDiagramParser._ATTR_CHILDREN_FETCHED])&&b.setChildrenFetched(c);break;case dvt.AdfDiagramParser._ELEM_EL:b.setElAttributes(c)}};dvt.AdfDiagramJsonParser.prototype.parseLinkData=function(a,b){for(var c=0;c<a.length;c++){var d=new DvtAdfDiagramLinkData;this.parseLink(a[c],d,b);b._diagram.addLinkData(d)}};
dvt.AdfDiagramJsonParser.prototype.parseLink=function(a,b,c){for(var d in a)if(a.hasOwnProperty(d))switch(c=a[d],d){case dvt.AdfDiagramParser._ATTR_ID:b.setId(c);break;case dvt.AdfDiagramParser._ATTR_GROUP_ID:b.setGroupId(c);break;case dvt.AdfDiagramParser._ATTR_TEMPLATE_ID:b.setTemplateId(c);break;case dvt.AdfDiagramParser._ATTR_PARENT_ID:b.setStartId(c);break;case dvt.AdfDiagramParser._ATTR_CHILD_ID:b.setEndId(c);break;case dvt.AdfDiagramParser._ATTR_LAYOUT_ATTRS:b.setLayoutAttributes(c);break;
case dvt.AdfDiagramParser._ATTR_ROW_INDEX:b.setRowIndex(c);break;case dvt.AdfDiagramParser._ELEM_EL:b.setElAttributes(c)}};
dvt.AdfDiagramJsonParser.prototype.parseCards=function(a,b){var c,d;for(d in a)if(a.hasOwnProperty(d)&&(c=a[d]))switch(d){case dvt.AdfDiagramParser._ATTR_NODE_SDI_MAP:b._diagram.setNodeShowDetailItemIndexMap(c);break;case dvt.AdfDiagramParser._ATTR_NEW_NODE_SDI_MAP:b._diagram.setShowDetailItems(c);break;case dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_SKIN:b._diagram.setCardNavButtonSkin(c);break;case dvt.AdfDiagramParser._ELEM_CARD:for(var e=[],f=0;f<c.length;f++){var g=c[f];e.push([g[dvt.AdfDiagramParser._ATTR_CARD_TEXT],
g[dvt.AdfDiagramParser._ATTR_CARD_ICON],g[dvt.AdfDiagramParser._ATTR_CARD_ID]])}0<e.length&&this._diagram.setCardSelectorList(e)}};
dvt.AdfDiagramJsonParser.prototype.ParseOverviewWindow=function(a,b){if(a){var c=new dvt.OverviewWindow(b._diagram.getCtx(),"dgOverviewWindow",0,0,108,81);c.setDisclosed(a.disclosed);var d=c.getSkinStyle();d||(d={});d[dvt.OverviewWindow.VIEWPORT_BORDER_COLOR]=a[dvt.AdfDiagramParser._ATTR_OV_WIN_VIEWPORT_BORDER_COLOR];d[dvt.OverviewWindow.VIEWPORT_BG_COLOR]=a[dvt.AdfDiagramParser._ATTR_OV_WIN_VIEWPORT_BG_COLOR];c.setSkinStyle(d);b._diagram.setOverviewWindow(c)}};
dvt.AdfDiagramJsonParser.prototype.parseOverviewContentJson=function(a){var b=this._diagram.getOverviewWindowContentStyle();b||(b={});b[dvt.AdfDiagram.OVERVIEW_STYLE]=new dvt.CSSStyle(a[dvt.AdfDiagramParser._ATTR_OV_WIN_NODE]);b[dvt.AdfDiagram.OVERVIEW_CONTAINER_STYLE]=new dvt.CSSStyle(a[dvt.AdfDiagramParser._ATTR_OV_WIN_DISCLOSED_NODE]);this._diagram.setOverviewWindowContentStyle(b)};
dvt.AdfDiagramJsonParser.prototype.parseStackingStylesJson=function(a){var b;(b=a[dvt.AdfDiagramParser._ATTR_STACK_PREVIEW_COLOR])&&(b=dvt.AdfDiagramParser.validateColor(b))&&this._diagram.setStackPreviewColor(b);(b=a[dvt.AdfDiagramParser._ATTR_STACK_BADGE_STYLE])&&this._diagram.setStackBadgeStyles(new dvt.CSSStyle(b));(b=a[dvt.AdfDiagramParser._ATTR_UNDERLAY_STYLE])&&this._diagram.setStackUnderlayStyles(new dvt.CSSStyle(b))};
dvt.AdfDiagramJsonParser.prototype.parseStackPreviewJson=function(a){var b={},c=!1,d=a[dvt.AdfDiagramParser._ATTR_PREVIEW_NODE];d&&(this._diagram._stackPreviewNode=d);d=a[dvt.AdfDiagramParser._ATTR_PREVIEW_PAN_X];isNaN(d)||(b.panX=parseFloat(d),c=!0);d=a[dvt.AdfDiagramParser._ATTR_PREVIEW_PAN_Y];isNaN(d)||(b.panY=parseFloat(d),c=!0);d=a[dvt.AdfDiagramParser._ATTR_PREVIEW_ZOOM];isNaN(d)||(b.zoom=parseFloat(d),c=!0);c&&(this._diagram._stackPreviewPanZoom=b)};
dvt.AdfDiagramJsonParser.prototype.parseDiagramButtonStylesJson=function(a){var b,c=new dvt.CSSStyle;(b=a[dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_ENA])&&c.parseInlineStyle(b);var d;d=(b=a[dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_OVR])?new dvt.CSSStyle(b):c.clone();a=(b=a[dvt.AdfDiagramParser._ATTR_BUTTON_STYLE_DWN])?new dvt.CSSStyle(b):c.clone();b=[];b[dvt.AdfDiagram.BUTTON_STATE_ENA]=c;b[dvt.AdfDiagram.BUTTON_STATE_OVR]=d;b[dvt.AdfDiagram.BUTTON_STATE_DWN]=a;this._diagram.setDiagramButtonStyles(b)};
dvt.AdfDiagramJsonParser.prototype.ParseDiagramIsolation=function(a){if(a=a[dvt.AdfDiagramParser._ATTR_ISOLATED_NODES])for(this._diagram._isolatedNodes=a.split(","),this._diagram._isolatedNodeMap={},a=0;a<this._diagram._isolatedNodes.length;a++)this._diagram._isolatedNodeMap[this._diagram._isolatedNodes[a]]=!1};
dvt.AdfDiagramJsonParser.prototype.parseSelectionJson=function(a){var b;b=a[dvt.AdfDiagramParser._ATTR_SELECTION_MODE];this._diagram.setSelectionMode(b);if(b=a[dvt.AdfDiagramParser._ATTR_SELECTED_NODES])this._diagram._selectedNodes=b.split(",");if(b=a[dvt.AdfDiagramParser._ATTR_SELECTED_LINKS])this._diagram._selectedLinks=b.split(",")};
dvt.AdfDiagramJsonParser.prototype.parseBreadcrumbsJson=function(a){(a=dvt.AdfDiagramJsonParser.getBreadcrumbsStyles(a,dvt.AdfDiagramParser._ATTR_BREADCRUMBS_STYLE,dvt.AdfDiagramParser._ATTR_BREADCRUMBS_HOVER_STYLE,dvt.AdfDiagramParser._ATTR_BREADCRUMBS_ACTIVE_STYLE,dvt.AdfDiagramParser._ATTR_BREADCRUMBS_DISABLED_STYLE))&&this._diagram.setBreadcrumbsStyles(a)};
dvt.AdfDiagramJsonParser.getBreadcrumbsStyles=function(a,b,c,d,e){b=a[b];c=a[c]?a[c]:b;d=a[d]?a[d]:b;a=a[e]?a[e]:b;c=dvt.AdfDiagramParser.mergeStyles(b,c);d=dvt.AdfDiagramParser.mergeStyles(b,d);a=dvt.AdfDiagramParser.mergeStyles(b,a);e=[];e[dvt.AdfDiagram.BUTTON_STATE_ENA]=b;e[dvt.AdfDiagram.BUTTON_STATE_OVR]=c;e[dvt.AdfDiagram.BUTTON_STATE_DWN]=d;e[dvt.AdfDiagram.BUTTON_STATE_DIS]=a;return e};
dvt.AdfDiagramJsonParser.prototype.parsePaletteJson=function(a){var b,c=new dvt.CSSStyle;(b=a[dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_STYLE])&&c.parseInlineStyle(b);(b=a[dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_HOVER_STYLE])?new dvt.CSSStyle(b):c.clone();(b=a[dvt.AdfDiagramParser._ATTR_PALETTE_SECTION_ACTIVE_STYLE])?new dvt.CSSStyle(b):c.clone();var d={};d.skin=this._diagram.getSkinName();d.sectionHeader={};d.sectionHeader.styleEna=c;d.sectionHeader.styleOvr=c;d.sectionHeader.styleDwn=c;d.sectionItem=
{};if(b=a[dvt.AdfDiagramParser._ATTR_PALETTE_ITEM_STYLE])c=new dvt.CSSStyle,c.parseInlineStyle(b),d.sectionItem.style=c;(b=a.paletteItemHoverStyle)&&(d.sectionItem.fillColorHover=b);(b=a.paletteItemSelectedStyle)&&(d.sectionItem.fillColorSelected=b);this._diagram.setPaletteStyles(d)};
dvt.AdfDiagramJsonParser.prototype.ParseNodeStylesJson=function(a){var b={},c=!1,d=a[dvt.AdfDiagramNode.SELECTED_COLOR];d&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramNode.SELECTED_COLOR]=d);(d=a[dvt.AdfDiagramNode.HOVER_INNER_COLOR])&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramNode.HOVER_INNER_COLOR]=d);(d=a[dvt.AdfDiagramNode.HOVER_OUTER_COLOR])&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramNode.HOVER_OUTER_COLOR]=d);if(d=a[dvt.AdfDiagramNode.CONTAINER_STYLE])c=
!0,b[dvt.AdfDiagramNode.CONTAINER_STYLE]=new dvt.CSSStyle(d);if(d=a[dvt.AdfDiagramNode.LABEL_STYLE])c=!0,b[dvt.AdfDiagramNode.LABEL_STYLE]=new dvt.CSSStyle(d);c&&this._diagram.setNodeStyles(b)};
dvt.AdfDiagramJsonParser.prototype.ParseLinkStylesJson=function(a){var b={},c=!1,d=a[dvt.AdfDiagramParser._ATTR_LINK_COLOR];d&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.COLOR]=d);(d=a[dvt.AdfDiagramLink.SELECTED_COLOR])&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.SELECTED_COLOR]=d);(d=a[dvt.AdfDiagramLink.HOVER_INNER_COLOR])&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.HOVER_INNER_COLOR]=d);(d=a[dvt.AdfDiagramLink.HOVER_OUTER_COLOR])&&
(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.HOVER_OUTER_COLOR]=d);if(d=a[dvt.AdfDiagramLink.LABEL_STYLE])c=!0,b[dvt.AdfDiagramLink.LABEL_STYLE]=new dvt.CSSStyle(d);(d=a[dvt.AdfDiagramLink.PROMOTED_COLOR])&&(d=dvt.AdfDiagramParser.validateColor(d))&&(c=!0,b[dvt.AdfDiagramLink.PROMOTED_COLOR]=d);if(d=a[dvt.AdfDiagramLink.PROMOTED_STYLE])c=!0,d=dvt.AdfDiagramParser._LINK_STYLE_CONVERTER[d],b[dvt.AdfDiagramLink.PROMOTED_STYLE]=d?d:dvt.AdfDiagramLinkDef.LINK_STYLE_DOT;(d=a[dvt.AdfDiagramLink.PROMOTED_WIDTH])&&
!isNaN(parseInt(d))&&(c=!0,b[dvt.AdfDiagramLink.PROMOTED_WIDTH]=d);c&&this._diagram.setLinkStyles(b)};
dvt.AdfDiagramJsonParser.prototype.ParseButtonStyleJson=function(a){var b=[],c=[];this.ParseButtonContainerStyle(a,b,dvt.AdfDiagramParser._ATTR_ENABLED_STATE);this.ParseButtonContainerStyle(a,b,dvt.AdfDiagramParser._ATTR_HOVER_STATE);this.ParseButtonContainerStyle(a,b,dvt.AdfDiagramParser._ATTR_ACTIVE_STATE);this._diagram.setButtonStyle(b);this.ParseButtonLabelStyle(a,c,dvt.AdfDiagramParser._ATTR_ENABLED_STATE);this.ParseButtonLabelStyle(a,c,dvt.AdfDiagramParser._ATTR_HOVER_STATE);this.ParseButtonLabelStyle(a,
c,dvt.AdfDiagramParser._ATTR_ACTIVE_STATE);this._diagram.setLabelStyle(c)};
dvt.AdfDiagramJsonParser.prototype.ParseButtonContainerStyle=function(a,b,c){var d,e=new dvt.CSSStyle,f=!1;(d=a[dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER+c+dvt.AdfDiagramParser._ATTR_BUTTON_FILL_TYPE])&&(f=this._diagramParser.AddButtonStyle(e,d,dvt.CSSStyle.FILL_TYPE,f));(d=a[dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER+c+dvt.AdfDiagramParser._ATTR_BUTTON_BACKGROUND_COLOR])&&(f=this._diagramParser.AddButtonStyle(e,d,dvt.CSSStyle.BACKGROUND_COLOR,f));(d=a[dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER+
c+dvt.AdfDiagramParser._ATTR_BUTTON_BACKGROUND])&&(f=this._diagramParser.AddButtonStyle(e,d,dvt.CSSStyle.BACKGROUND,f));(d=a[dvt.AdfDiagramParser._ATTR_BUTTON_CONTAINER+c+dvt.AdfDiagramParser._ATTR_BUTTON_BORDER_COLOR])&&(f=this._diagramParser.AddButtonStyle(e,d,dvt.CSSStyle.BORDER_COLOR,f));f?b.push(e):b.push(null)};dvt.AdfDiagramJsonParser.prototype.ParseButtonLabelStyle=function(a,b,c){(a=a[dvt.AdfDiagramParser._ATTR_BUTTON_LABEL+c])?(c=new dvt.CSSStyle,c.parseInlineStyle(a),b.push(c)):b.push(null)};
dvt.AdfDiagramJsonParser.prototype.ParsePanelCardJson=function(a){var b,c=new dvt.CSSStyle,d=!1;if(b=a[dvt.AdfDiagramParser._ATTR_CARD_FILL_TYPE])c.setStyle(dvt.CSSStyle.FILL_TYPE,b),d=!0;if(b=a[dvt.AdfDiagramParser._ATTR_CARD_BORDER_TYPE])c.setStyle(dvt.CSSStyle.BORDER_TYPE,b),d=!0;if(b=a[dvt.AdfDiagramParser._ATTR_CARD_BORDER_COLOR])c.setStyle(dvt.CSSStyle.BORDER_COLOR,b),d=!0;if(b=a[dvt.AdfDiagramParser._ATTR_CARD_BACKGROUND_COLOR])c.setStyle(dvt.CSSStyle.BACKGROUND_COLOR,b),d=!0;if(b=a[dvt.AdfDiagramParser._ATTR_CARD_BORDER_RADIUS])c.setStyle("border-radius",
b),d=!0;d&&this._diagram.setCardStyle(c)};
dvt.AdfDiagramJsonParser.prototype.ParsePanelCardHeaderJson=function(a){var b,c=this._diagram.getCardHeaderStyle();b=a[dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT];this._diagramParser.AddCardHeaderStyle(c,b,"zoom100");b=a[dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT75];this._diagramParser.AddCardHeaderStyle(c,b,"zoom75");b=a[dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT50];this._diagramParser.AddCardHeaderStyle(c,b,"zoom50");b=a[dvt.AdfDiagramParser._ATTR_CARD_HEADER_TEXT25];this._diagramParser.AddCardHeaderStyle(c,
b,"zoom25");this._diagram.setCardHeaderStyle(c)};
dvt.AdfDiagramJsonParser.prototype.ParsePanelCardNavButtonJson=function(a){var b,c=new dvt.CSSStyle,d;b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_FILL_TYPE];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.FILL_TYPE,!1);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_BORDER_COLOR];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.BORDER_COLOR,d);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ICON_COLOR];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.COLOR,d);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_BACKGROUND_COLOR];
if(d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.BACKGROUND_COLOR,d))this._diagram.getSkinName()==dvt.CSSStyle.SKIN_SKYROS&&c.setStyle(dvt.CSSStyle.FILL_TYPE,"solid"),this._diagram.setCardNavButtonStyle(c);c=new dvt.CSSStyle;b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_FILL_TYPE];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.FILL_TYPE,!1);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_BORDER_COLOR];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.BORDER_COLOR,d);
b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_ICON_COLOR];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.COLOR,d);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_HOVER_BACKGROUND_COLOR];if(d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.BACKGROUND_COLOR,d))this._diagram.getSkinName()==dvt.CSSStyle.SKIN_SKYROS&&c.setStyle(dvt.CSSStyle.FILL_TYPE,"solid"),this._diagram.setCardNavButtonHoverStyle(c);c=new dvt.CSSStyle;b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_FILL_TYPE];
d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.FILL_TYPE,!1);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_ICON_COLOR];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.COLOR,d);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_BORDER_COLOR];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.BORDER_COLOR,d);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_ACTIVE_BACKGROUND_COLOR];if(d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.BACKGROUND_COLOR,d))this._diagram.getSkinName()==
dvt.CSSStyle.SKIN_SKYROS&&c.setStyle(dvt.CSSStyle.FILL_TYPE,"solid"),this._diagram.setCardNavButtonActiveStyle(c);c=new dvt.CSSStyle;b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_FILL_TYPE];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.FILL_TYPE,!1);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_BORDER_COLOR];d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.BORDER_COLOR,d);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_ICON_COLOR];d=this._diagramParser.AddButtonStyle(c,
b,dvt.CSSStyle.COLOR,d);b=a[dvt.AdfDiagramParser._ATTR_CARD_NAV_BUTTON_DISABLED_BACKGROUND_COLOR];if(d=this._diagramParser.AddButtonStyle(c,b,dvt.CSSStyle.BACKGROUND_COLOR,d))this._diagram.getSkinName()==dvt.CSSStyle.SKIN_SKYROS&&c.setStyle(dvt.CSSStyle.FILL_TYPE,"solid"),this._diagram.setCardNavButtonDisabledStyle(c)};
dvt.AdfDiagramJsonParser.prototype.ParsePanelCardTrainButtonJson=function(a){var b;(b=a[dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_VISIBILITY])&&"false"===b.toLowerCase()&&this._diagram.setCardTrainButtonVisible(!1);var c,d=new dvt.CSSStyle,e=a[dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ICON];e?(b=!0,d.setIconUrl(e)):(c=!1,b=a[dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_BORDER_COLOR],this._diagramParser.AddButtonStyle(d,b,dvt.CSSStyle.BORDER_COLOR,c),b=a[dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_BACKGROUND_COLOR],
b=this._diagramParser.AddButtonStyle(d,b,dvt.CSSStyle.BACKGROUND_COLOR,c));b&&this._diagram.setCardTrainButtonStyle(d);d=new dvt.CSSStyle;(b=a[dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_HOVER_ICON])||(b=e);b&&(d.setIconUrl(b),this._diagram.setCardTrainButtonHoverStyle(d));d=new dvt.CSSStyle;(c=a[dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_ICON])||(c=e);c?(b=!0,d.setIconUrl(c)):(c=!1,b=a[dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_BORDER_COLOR],this._diagramParser.AddButtonStyle(d,
b,dvt.CSSStyle.BORDER_COLOR,c),b=a[dvt.AdfDiagramParser._ATTR_CARD_TRAIN_BUTTON_ACTIVE_BACKGROUND_COLOR],b=this._diagramParser.AddButtonStyle(d,b,dvt.CSSStyle.BACKGROUND_COLOR,c));b&&this._diagram.setCardTrainButtonActiveStyle(d)};
dvt.AdfDiagramJsonParser.prototype.ParsePanelCardNextPrevButtonJson=function(a){var b=dvt.AdfDiagramJsonParser.getButtonImages(a,dvt.AdfDiagramParser._ATTR_CARD_PREV_ICON,dvt.AdfDiagramParser._ATTR_CARD_PREV_HOVER_ICON,dvt.AdfDiagramParser._ATTR_CARD_PREV_ACTIVE_ICON);b&&this._diagram.setCardPrevButtonIcon(b);(b=dvt.AdfDiagramJsonParser.getButtonImages(a,dvt.AdfDiagramParser._ATTR_CARD_NEXT_ICON,dvt.AdfDiagramParser._ATTR_CARD_NEXT_HOVER_ICON,dvt.AdfDiagramParser._ATTR_CARD_NEXT_ACTIVE_ICON))&&this._diagram.setCardNextButtonIcon(b)};
dvt.AdfDiagramJsonParser.getButtonImages=function(a,b,c,d){var e=[];b=a[b];c=a[c]?a[c]:b;a=a[d]?a[d]:b;if(b||c||a)e.push(b),e.push(c),e.push(a);else return null;return e};
dvt.AdfDiagramJsonParser.prototype.parseScrollbarStylesJson=function(a){var b={};dvt.StyleUtils.setStyle(b,DvtScrollbar.BACKGROUND,a[dvt.AdfDiagramParser._ATTR_SCROLLBAR_BACKGROUND]);dvt.StyleUtils.setStyle(b,DvtScrollbar.BORDER_COLOR,a[dvt.AdfDiagramParser._ATTR_SCROLLBAR_BORDER_COLOR]);dvt.StyleUtils.setStyle(b,DvtScrollbar.HANDLE_COLOR,a[dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_COLOR]);dvt.StyleUtils.setStyle(b,DvtScrollbar.HANDLE_ACTIVE_COLOR,a[dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_ACTIVE_COLOR]);
dvt.StyleUtils.setStyle(b,DvtScrollbar.HANDLE_HOVER_COLOR,a[dvt.AdfDiagramParser._ATTR_SCROLLBAR_HANDLE_HOVER_COLOR]);a=dvt.JsonUtils.merge(b,this._diagram.getSubcomponentStyles());this._diagram.setSubcomponentStyles(a)};dvt.AdfDiagramJsonParser.ParseDropFlavors=function(a,b){if(!a||!b)return null;for(var c=[],d=a.split(" "),e=0;e<d.length;e++)c.push(b(d[e]));return c};
dvt.AdfDiagramEventManager=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(dvt.AdfDiagramEventManager,dvt.EventManager,"dvt.AdfDiagramEventManager");dvt.AdfDiagramEventManager.SWIPE_KEY="swipeKey";dvt.AdfDiagramEventManager.prototype.Init=function(a,b,c){this._diagram=c;dvt.AdfDiagramEventManager.superclass.Init.call(this,a,b,c);this._swipeStartPos=null;this._showKeyboardFocusByDefault=!1;this._currPageY=this._currPageX=0;this._touchId=this._currTarget=null};
dvt.AdfDiagramEventManager.prototype.IsPropagationEnabled=function(a,b,c){if(b&&b.isPropagationStopped&&b.isPropagationStopped())return!1;a=this.GetLogicalObject(c);return!this.ConsumesClick(a)};
dvt.AdfDiagramEventManager.prototype.ProcessKeyboardEvent=function(a){var b=!0,c=a.keyCode,d=this.getFocus();if(c==dvt.KeyboardEvent.STAR||c==dvt.KeyboardEvent.NUMPAD_STAR)(d=this._diagram.__getOverviewWindowPanel())&&(d instanceof dvt.CollapsiblePanel?d.setCollapsed(!d.isCollapsed()):d instanceof dvt.PanelDrawer&&d.setDisclosed(!d.isDisclosed())),dvt.EventManager.consumeEvent(a);else if(c==dvt.KeyboardEvent.GRAVE_ACCENT){if(d=this._diagram.__getPanelDrawer())d.setDisclosed(!d.isDisclosed()),this._diagram.setContextKeyboardHandlers();
dvt.EventManager.consumeEvent(a)}else if(c!=dvt.KeyboardEvent.ZERO&&c!=dvt.KeyboardEvent.NUMPAD_ZERO||!a.ctrlKey||!a.altKey||a.shiftKey)if(c==dvt.KeyboardEvent.ENTER||c==dvt.KeyboardEvent.SPACE&&!a.ctrlKey||c==dvt.KeyboardEvent.SINGLE_QUOTE||c==dvt.KeyboardEvent.SPACE&&a.ctrlKey&&a.shiftKey||dvt.KeyboardEvent.isSemicolon(a)||c==dvt.KeyboardEvent.ESCAPE){if(d&&d.HandleKeyboardEvent)if(c=null,d.getCurrentTabStop&&(c=d.getCurrentTabStop()),c&&c!=d&&c.handleKeyboardEvent){this.hideTooltip();c instanceof
dvt.NavButton||(d.resetTabStops(),c.hideKeyboardFocusEffect&&c.hideKeyboardFocusEffect());var e=c.getDisplayObj?c.getDisplayObj():c;c.handleKeyboardEvent(a);this.UpdateActiveElement(d);d=e.getDimensions(this.getCtx().getStage()).getCenter();d=this.getCtx().stageToPageCoords(d.x,d.y);this.ProcessObjectTooltip(a,d.x,d.y,c,null)}else d.HandleKeyboardEvent(a);dvt.EventManager.consumeEvent(a)}else c!=dvt.KeyboardEvent.OPEN_ANGLED_BRACKET&&c!=dvt.KeyboardEvent.CLOSE_ANGLED_BRACKET||a.altKey?c==dvt.KeyboardEvent.FORWARD_SLASH&&
a.ctrlKey?d instanceof dvt.AdfDiagramNode&&d.getStateProp&&((a=d.getStateProp(dvt.AfPanelCard.DISPLAYED_DETAIL_ITEM_INDEX_KEY))||(a=0),d=this._diagram.getPanelCard(d))&&(a=d.getVisibleChild(a).getText(),this._diagram.syncPanelCards(null,a,null)):c==dvt.KeyboardEvent.TAB?(b=!1,d instanceof dvt.AdfDiagramNode&&d.isShowingKeyboardFocusEffect()&&((c=d.getCurrentTabStop())&&c!=d&&c.hideKeyboardFocusEffect(),c=a.shiftKey?d.getPrevTabStop():d.getNextTabStop())&&(c!=d?(d.hideKeyboardFocusEffect(!0),e=c.getDisplayObj?
c.getDisplayObj():c,this.UpdateActiveElement(c,e),c.showKeyboardFocusEffect(),d=e.getDimensions(this.getCtx().getStage()).getCenter()):(c.showKeyboardFocusEffect(!0),d=c.getKeyboardBoundingBox(this.getCtx().getStage()).getCenter()),d=this.getCtx().stageToPageCoords(d.x,d.y),this.ProcessObjectTooltip(a,d.x,d.y,c),dvt.EventManager.consumeEvent(a),b=!0),b||(b=dvt.AdfDiagramEventManager.superclass.ProcessKeyboardEvent.call(this,a))):b=dvt.AdfDiagramEventManager.superclass.ProcessKeyboardEvent.call(this,
a):d instanceof dvt.AdfDiagramNode&&(this.hideTooltip(),(d=this._diagram.getPanelCard(d))&&c==dvt.KeyboardEvent.CLOSE_ANGLED_BRACKET?d.displayNextDetailItem():d&&c==dvt.KeyboardEvent.OPEN_ANGLED_BRACKET&&d.displayPrevDetailItem());else this._diagram.zoomAndCenter(),dvt.EventManager.consumeEvent(a);return b};
dvt.AdfDiagramEventManager.prototype.OnKeyUp=function(a){var b=a.keyCode,c=this.GetEditor();if(c)if(b==dvt.KeyboardEvent.DELETE){for(var d=this.getSelectionHandler().getSelection(),e=[],f=[],g=0;g<d.length;g++){var h=d[g],k=h.getId();"L"==k.charAt(0)?h.isDeleteEnabled()&&e.push(k):h.isDeleteEnabled()&&f.push(k)}0<f.length&&(d=new dvt.AdfDiagramDeleteNodeEvent(f),this._callback.call(this._callbackObj,d));0<e.length&&(d=new dvt.AdfDiagramDeleteLinkEvent(e),this._callback.call(this._callbackObj,d))}else b==
dvt.KeyboardEvent.L&&a.ctrlKey&&a.altKey?(e=this.getFocus(),e instanceof dvt.AdfDiagramNode&&this._diagram.isLinkToolEnabled()&&e.getLinkHandle()&&(e=c.processLinkCreateStart(e.getLinkHandle(),null),c.setLinkCreateWithKeyboard(e),c.processLinkCreateWithKeyboard(null))):b==dvt.KeyboardEvent.N&&a.ctrlKey&&a.altKey&&(e=this.getFocus(),e instanceof dvt.AdfDiagramNode&&this._diagram.isStickyNodeEnabled()&&c.processNodeCreateWithKeyboard(e));b==dvt.KeyboardEvent.ESCAPE&&(this._diagram.HideNodeTransientToolbar(),
c&&c.processLinkCreateCancel());dvt.AdfDiagramEventManager.superclass.OnKeyUp.call(this,a)};dvt.AdfDiagramEventManager.prototype.OnRollOver=function(a){dvt.AdfDiagramEventManager.superclass.OnRollOver.call(this,a);var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&b.showRollOverEffect&&b.showRollOverEffect(a)};
dvt.AdfDiagramEventManager.prototype.OnRollOut=function(a){dvt.AdfDiagramEventManager.superclass.OnRollOut.call(this,a);var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&b.hideRollOverEffect&&b.hideRollOverEffect(a)};dvt.AdfDiagramEventManager.prototype.GetEditor=function(){return this._diagram.getEditor()};
dvt.AdfDiagramEventManager.prototype.OnMouseDown=function(a){var b=this.GetEditor();if(b){var c=this.GetLogicalObject(this.GetCurrentTargetForEvent(a)),d=this._context.pageToStageCoords(a.pageX,a.pageY);b.processDragStart(c,d).dragStarted&&this._setPanningEnabled(!1)}dvt.AdfDiagramEventManager.superclass.OnMouseDown.call(this,a)};
dvt.AdfDiagramEventManager.prototype.OnMouseMove=function(a){this._currPageX=a.pageX;this._currPageY=a.pageY;this._currTarget=a.target;var b=this.GetEditor();if(b){var c=this.GetLogicalObject(this.GetCurrentTargetForEvent(a)),d=this._context.pageToStageCoords(a.pageX,a.pageY);b.processDragMove(c,d)}dvt.AdfDiagramEventManager.superclass.OnMouseMove.call(this,a)};
dvt.AdfDiagramEventManager.prototype.OnMouseUp=function(a){var b=this.GetEditor();if(b){for(var c=this.GetLogicalObject(this.GetCurrentTargetForEvent(a)),d=this._context.pageToStageCoords(a.pageX,a.pageY),b=b.processDragEnd(c,d).events,c=0;c<b.length;c++)this._diagram.dispatchEvent(b[c]);this._setPanningEnabled(!0)}dvt.AdfDiagramEventManager.superclass.OnMouseUp.call(this,a)};
dvt.AdfDiagramEventManager.prototype.OnMouseOut=function(a){if(null!=a.target&&null==a.relatedTarget){var b=this.GetEditor();if(b)for(var c=this.GetLogicalObject(this.GetCurrentTargetForEvent(a)),d=this._context.pageToStageCoords(a.pageX,a.pageY),b=b.processDragCancel(c,d).events,c=0;c<b.length;c++)this._diagram.dispatchEvent(b[c]);this.OnMouseUp(a)}b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));c=this.GetLogicalObject(a.relatedTarget);c instanceof DvtAdfDiagramNodeEndpoint&&c.getParent()==
b&&c.setHovered(!0);dvt.AdfDiagramEventManager.superclass.OnMouseOut.call(this,a)};dvt.AdfDiagramEventManager.GetTempLinkPositionOnNode=function(a,b){if(a&&a.getLayoutBounds){var c=a.getLayoutBounds(),c=new dvt.Point(c.x+c.w/2,c.y+c.h/2),c=a.localToStage(c);return b.stageToLocal(c)}return null};dvt.AdfDiagramEventManager.GetParentNode=function(a){for(;a;){if(a instanceof dvt.AdfDiagramNode)return a;if(!a.getParent)break;a=a.getParent()}};
dvt.AdfDiagramEventManager.GetCreateNodeEvent=function(a,b,c){return new dvt.AdfDiagramCreateNodeEvent(c,a,b)};
dvt.AdfDiagramEventManager.prototype.OnClick=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a)),c=!1,d=this.GetEditor();if(d){var e=this._context.pageToStageCoords(a.pageX,a.pageY),d=d.processNodeCreate(b,e).events;if(0<d.length){for(c=0;c<d.length;c++)this._diagram.dispatchEvent(d[c]);c=!0}}c||(dvt.AdfDiagramEventManager.superclass.OnClick.call(this,a),b&&b.HandleClick&&b.HandleClick(a))};
dvt.AdfDiagramEventManager.prototype.OnDblClickInternal=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&b.isDoubleClickable&&b.isDoubleClickable()&&b.HandleDblClick&&b.HandleDblClick(a)};
dvt.AdfDiagramEventManager.prototype.GetContextMenuType=function(a){var b=(a=this.getSelectionHandler())?a.getSelection().length:0;return 0>=b?dvt.ContextMenuHandler.TYPE_BODY_CONTEXT_MENU:1==b?"L"==a.getSelection()[0].getId().charAt(0)?dvt.AdfDiagramEventManager.TYPE_LINK_CONTEXT_MENU:dvt.ContextMenuHandler.TYPE_CONTEXT_MENU:dvt.ContextMenuHandler.TYPE_MULTI_SELECT_CONTEXT_MENU};dvt.AdfDiagramEventManager.prototype.ShowKeyboardFocusByDefault=function(){return this._showKeyboardFocusByDefault&&!dvt.Agent.isTouchDevice()};
dvt.AdfDiagramEventManager.prototype.setShowKeyboardFocusByDefault=function(a){this._showKeyboardFocusByDefault=a};dvt.AdfDiagramEventManager.TYPE_LINK_CONTEXT_MENU="linkContextMenu";dvt.AdfDiagramEventManager.prototype.CreateClientBehaviorHandler=function(a,b,c){return this._diagram.CreateClientBehaviorHandler(a,b,c)};dvt.AdfDiagramEventManager.prototype.isClearMenuAllowed=function(){return!1};
dvt.AdfDiagramEventManager.prototype.ProcessClientBehaviorForTouch=function(a,b){var c=this._diagram.GetTransientToolbarDataId(),d=this.ClientBehaviorHandler.processClick(a,b);this._diagram.SetTransientToolbarDataId(c);return d};dvt.AdfDiagramEventManager.prototype.HandleTouchClickInternal=function(a){if(this.GetEventInfo(a,dvt.PanZoomCanvasEventManager.EVENT_INFO_PANNED_KEY))return!0;var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&b.HandleClick&&b.HandleClick(a)};
dvt.AdfDiagramEventManager.prototype.HandleTouchDblClickInternal=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&b.isDoubleClickable&&b.isDoubleClickable()&&b.HandleDblClick&&b.HandleDblClick(a)};
dvt.AdfDiagramEventManager.prototype.HandleImmediateTouchStartInternal=function(a){this._findSwipeTarget(a.target)&&this.TouchManager.processAssociatedTouchAttempt(a,dvt.AdfDiagramEventManager.SWIPE_KEY,this.SwipeStartTouch,this);var b=this.GetEditor();if(b&&1==a.targetTouches.length){var c=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));a=a.targetTouches[0];var d=this._context.pageToStageCoords(a.pageX,a.pageY),b=b.processDragStart(c,d);this._touchId=null;b.dragStarted&&(this._touchId=a.identifier,
this._setPanningEnabled(!1))}};dvt.AdfDiagramEventManager.prototype.HandleImmediateTouchMoveInternal=function(a){this.TouchManager.processAssociatedTouchMove(a,dvt.AdfDiagramEventManager.SWIPE_KEY);var b=this.GetEditor();if(b&&null!==this._touchId&&"undefined"!==typeof this._touchId){var c=dvt.TouchManager.getTouchById(this._touchId,a.touches);a=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));c=this._context.pageToStageCoords(c.pageX,c.pageY);b.processDragMove(a,c)}};
dvt.AdfDiagramEventManager.prototype.HandleImmediateTouchEndInternal=function(a){this.TouchManager.processAssociatedTouchEnd(a,dvt.AdfDiagramEventManager.SWIPE_KEY);var b=this.GetEditor();if(b&&null!==this._touchId&&"undefined"!==typeof this._touchId){var c=dvt.TouchManager.getTouchById(this._touchId,a.changedTouches);a=null;var d=this._context.getDocumentUtils();d&&(a=this.GetLogicalObject(d.elementFromTouch(c)));c=this._context.pageToStageCoords(c.pageX,c.pageY);b=b.processDragEnd(a,c).events;for(a=
0;a<b.length;a++)this._diagram.dispatchEvent(b[a]);this._setPanningEnabled(!0);this._touchId=null}};dvt.AdfDiagramEventManager.prototype._findSwipeTarget=function(a){for(;a;){var b=this.GetLogicalObject(a);if(b){if(b.isSwipeTarget&&b.isSwipeTarget())return b;if(!this.IsPropagationEnabled(null,event,a))return null}a=a.getParent()}};
dvt.AdfDiagramEventManager.prototype.SwipeStartTouch=function(a,b){if(1>=this.TouchManager.getTouchIdsForObj(dvt.AdfDiagramEventManager.SWIPE_KEY).length){this.TouchManager.saveProcessedTouch(b.identifier,dvt.AdfDiagramEventManager.SWIPE_KEY,null,dvt.AdfDiagramEventManager.SWIPE_KEY,dvt.AdfDiagramEventManager.SWIPE_KEY,this.SwipeMoveTouch,this.SwipeEndTouch,this);this.TouchManager.setTooltipEnabled(b.identifier,!1);this._swipeStartPos=this._context.pageToStageCoords(b.pageX,b.pageY);for(var c=a.target;c;){var d=
this.GetLogicalObject(c);if(d){if(d.handleSwipe){this._setPanningEnabled(!1);break}if(!this.IsPropagationEnabled(null,a,c))break}c=c.getParent()}}a&&a.preventDefault()};dvt.AdfDiagramEventManager.prototype.SwipeMoveTouch=function(a,b){a&&a.preventDefault()};
dvt.AdfDiagramEventManager.prototype.SwipeEndTouch=function(a,b){var c=this._context.pageToStageCoords(b.pageX,b.pageY);a&&(this._handleSwipe(a.target,c.x-this._swipeStartPos.x,c.y-this._swipeStartPos.y),a.preventDefault());this._swipeStartPos=null;this._setPanningEnabled(!0)};dvt.AdfDiagramEventManager.prototype._handleSwipe=function(a,b,c){for(;a;){var d=this.GetLogicalObject(a);if(d){if(d.handleSwipe&&d.handleSwipe(b,c))break;if(!this.IsPropagationEnabled(null,event,a))break}a=a.getParent()}};
dvt.AdfDiagramEventManager.prototype.IsDragCandidate=function(a){return a instanceof dvt.AdfDiagramNode};dvt.AdfDiagramEventManager.prototype.getCurrentStageMousePosition=function(){return this._context.pageToStageCoords(this._currPageX,this._currPageY)};dvt.AdfDiagramEventManager.prototype.getCurrentMouseTarget=function(){return this._currTarget};dvt.AdfDiagramEventManager.prototype._setPanningEnabled=function(a){this._diagram.IsPanningEnabled()&&this._diagram.getPanZoomCanvas().setPanningEnabled(a)};
dvt.AdfDiagramEventManager.prototype.OnTouchStartBubble=function(a){dvt.AdfDiagramEventManager.superclass.OnTouchStartBubble.call(this,a);if(this.DragSource&&!a.dragSourceSet)for(var b=a.target;b;){var c=this.GetLogicalObject(b,!0);if(c&&this.IsDragCandidate(c)){this.DragSource.setDragCandidate(c);a.dragSourceSet=!0;break}b=b.getParent()}};
dvt.AdfDiagramEventManager.prototype.GetTouchResponse=function(){var a=this._diagram.getOptions();return"none"!==a.panning||"none"!==a.zooming?dvt.EventManager.TOUCH_RESPONSE_TOUCH_HOLD:a.touchResponse===dvt.EventManager.TOUCH_RESPONSE_TOUCH_START?dvt.EventManager.TOUCH_RESPONSE_TOUCH_START:dvt.EventManager.TOUCH_RESPONSE_AUTO};
dvt.AdfDiagramEventManager.prototype.StoreInfoByEventType=function(a){return a==dvt.PanZoomCanvasEventManager.EVENT_INFO_PANNED_KEY?!1:dvt.AdfDiagramEventManager.superclass.StoreInfoByEventType.call(this,a)};dvt.AdfDiagramEventManager.prototype.ProcessRolloverEvent=function(a,b,c){a instanceof dvt.KeyboardEvent&&(c&&b.showRollOverEffect?b.showRollOverEffect(a):!c&&b.hideRollOverEffect&&b.hideRollOverEffect(a))};
var DvtAdfDiagramKeyboardHandler=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(DvtAdfDiagramKeyboardHandler,dvt.BaseDiagramKeyboardHandler,"DvtAdfDiagramKeyboardHandler");DvtAdfDiagramKeyboardHandler.prototype.isSelectionEvent=function(a){return a.keyCode==dvt.KeyboardEvent.TAB?!1:this.isNavigationEvent(a)&&!a.ctrlKey};
DvtAdfDiagramKeyboardHandler.prototype.processKeyDown=function(a){var b=a.keyCode,c=this._eventManager.getFocus();if(b==dvt.KeyboardEvent.F&&a.ctrlKey)return c&&c.hideKeyboardFocusEffect&&c.hideKeyboardFocusEffect(),this.GetDiagram().FocusSearchField(),dvt.EventManager.consumeEvent(a),null;if(!(b>=dvt.KeyboardEvent.ONE&&b<=dvt.KeyboardEvent.FIVE||b>=dvt.KeyboardEvent.NUMPAD_ONE&&b<=dvt.KeyboardEvent.NUMPAD_FIVE)||a.ctrlKey||a.altKey)if((b>=dvt.KeyboardEvent.ONE&&b<=dvt.KeyboardEvent.FIVE||b>=dvt.KeyboardEvent.NUMPAD_ONE&&
b<=dvt.KeyboardEvent.NUMPAD_FIVE)&&a.ctrlKey&&a.altKey){if(this.GetDiagram().HandleKeyboardEvent)return this.GetDiagram().HandleKeyboardEvent(a),dvt.EventManager.consumeEvent(a),null}else if(b==dvt.KeyboardEvent.HOME&&a.ctrlKey){if(this.GetDiagram().HandleKeyboardEvent&&(c=this.GetDiagram().HandleKeyboardEvent(a)))return this._eventManager.ProcessSelectionEventHelper(c,a.shiftKey),c}else if(a.keyCode==dvt.KeyboardEvent.SIX&&a.shiftKey&&a.ctrlKey){if(c instanceof dvt.AdfDiagramNode&&(c=c.getNextNavigable(a)))return this._eventManager.getSelectionHandler().clearSelection(),
c}else if(b==dvt.KeyboardEvent.SINGLE_QUOTE)c instanceof dvt.AdfDiagramNode&&c&&this.GetDiagram().isNodeDetail()&&this.GetDiagram()._detailNode!=c&&(this.GetDiagram()._bKeyboardHoverDetails=!0,c.showHoverDetails(!0),this.GetDiagram()._bKeyboardHoverDetails=!1);else if(b==dvt.KeyboardEvent.ESCAPE)this.GetDiagram()._detailNode&&this.GetDiagram()._detailNode.hideHoverDetails();else{if(b==dvt.KeyboardEvent.TAB){var d=null;dvt.EventManager.consumeEvent(a);return d=c?c:this.GetDiagram().GetInitialFocusNode()}if(this.isNavigationEvent(a)&&
c instanceof dvt.AdfDiagramNode&&(d=c.getCurrentTabStop())&&d!=c)return dvt.EventManager.consumeEvent(a),null}else{switch(b){case dvt.KeyboardEvent.ONE:case dvt.KeyboardEvent.NUMPAD_ONE:d=.1;break;case dvt.KeyboardEvent.TWO:case dvt.KeyboardEvent.NUMPAD_TWO:d=.25;break;case dvt.KeyboardEvent.THREE:case dvt.KeyboardEvent.NUMPAD_THREE:d=.5;break;case dvt.KeyboardEvent.FOUR:case dvt.KeyboardEvent.NUMPAD_FOUR:d=.75;break;case dvt.KeyboardEvent.FIVE:case dvt.KeyboardEvent.NUMPAD_FIVE:d=1}c=new dvt.Animator(this.GetDiagram().getCtx(),
this.GetDiagram().getAnimationDuration());this.GetDiagram().getPanZoomCanvas().zoomTo(d,null,null,c);c.play();dvt.EventManager.consumeEvent(a);return null}return DvtAdfDiagramKeyboardHandler.superclass.processKeyDown.call(this,a)};
DvtAdfDiagramKeyboardHandler.prototype.isNavigationEvent=function(a){var b=!1;switch(a.keyCode){case dvt.KeyboardEvent.OPEN_BRACKET:case dvt.KeyboardEvent.CLOSE_BRACKET:case dvt.KeyboardEvent.TAB:case dvt.KeyboardEvent.HOME:case dvt.KeyboardEvent.END:b=!0;break;case dvt.KeyboardEvent.OPEN_ANGLED_BRACKET:case dvt.KeyboardEvent.CLOSE_ANGLED_BRACKET:b=a.altKey?!0:!1;break;default:b=DvtAdfDiagramKeyboardHandler.superclass.isNavigationEvent.call(this,a)}return b};
DvtAdfDiagramKeyboardHandler.prototype.GetVisibleNode=function(a){var b;do{if(!a)break;b=this.GetDiagram().getNodeById(a);a=b.getData().getGroupId()}while(!b.getVisible());if(b&&!b.getVisible()){a=this.GetDiagram().GetStackNodeMap();var c;a&&(c=a[b.GetStackId()]);if(c&&0<c.length)for(a=0;a<c.length;a++){var d=this.GetDiagram().getNodeById(c[a]);if(d.getVisible()){b=d;break}}}return b};
var DvtAdfDiagramStackBadgeHandler=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(DvtAdfDiagramStackBadgeHandler,dvt.Obj,"DvtAdfDiagramStackBadgeHandler");DvtAdfDiagramStackBadgeHandler.prototype.Init=function(a,b){this._diagram=a;this._node=b;this._dialog;this._layoutContainer;this._buttonContainer;this._arNodes;this._isDialogVisible=!1};DvtAdfDiagramStackBadgeHandler.prototype.getTooltip=function(){var a=this._diagram.getResourcesMap().stackIndicatorTip;return dvt.Bundle.format(a,[this._node.getStackCount()])};
DvtAdfDiagramStackBadgeHandler.prototype.isUnrelatedToSelection=function(){return!0};
DvtAdfDiagramStackBadgeHandler.prototype.ShowDialog=function(a,b){var c=this._diagram.GetStackNodeMap(),d=this._diagram.GetNodeStackMap();if(c&&d&&(d=d[this._node.getData().getId()],(d=c[d])&&!(1>d.length))){this._diagram.SetStackPreviewNodeId(this._node.getData().getId());this._diagram.UpdateAriaAttributes();c=new DvtAdfDiagramLayoutContainer(this._diagram.getCtx(),this._diagram);c.setMouseEnabled(!1);this._diagram.getPanZoomCanvas().getContentPane().addChild(c);this._arNodes=d=this.CreateNodes(d);
var e;for(e=0;e<d.length;e++)c.addNode(d[e]);this.RenderNodes(d);for(e=0;e<d.length;e++)d[e].setForceZoom100Facet(!1);c.layout();d=new dvt.Rect(this._diagram.getCtx(),0,-.5*this._diagram.getHeight(),this._diagram.getWidth(),1.5*this._diagram.getHeight(),"stackPreviewBackground");e=this._diagram.getStackPreviewColor();var f=dvt.AdfDiagramNode._STACK_PREVIEW_COLOR,g=dvt.AdfDiagramNode._STACK_PREVIEW_ALPHA;e&&(f=dvt.ColorUtils.getRGB(e)?dvt.ColorUtils.getRGB(e):dvt.AdfDiagramNode._STACK_PREVIEW_COLOR,
g=dvt.ColorUtils.getAlpha(e)?dvt.ColorUtils.getAlpha(e):dvt.AdfDiagramNode._STACK_PREVIEW_ALPHA);e=new dvt.SolidFill(f,g);d.setFill(e);d.addChild(c);this._diagram.addChild(d);e=new dvt.ClipPath("stackPreviewClip");e.addRect(d.getX(),d.getY(),d.getWidth(),d.getHeight());c.setClipPath(e);if(dvt.Agent.isEnvironmentBrowser()){this._buttonContainer=new dvt.Container(this._diagram.getCtx());this._diagram.addChild(this._buttonContainer);e=this.CreatePinButton();this._buttonContainer.addChild(e);f=e.getDimensions();
g=this.CreateCloseButton();this._buttonContainer.addChild(g);var h=g.getDimensions(),h=.5*(this._diagram.getWidth()-(f.x+f.w+7+h.x+h.w));e.setTranslate(h,-this._diagram._buttonBorderRadius);g.setTranslate(e.getTranslateX()+f.x+f.w+7,-this._diagram._buttonBorderRadius)}this._dialog=d;this._layoutContainer=c;this._diagram.getPanZoomCanvas().addEvtListener(dvt.ZoomEvent.TYPE,this.HandleZoom,!1,this);this.SetupPanZoomCanvas();this._buttonContainer&&this._diagram.addChild(this._buttonContainer);this._diagram.getPanZoomCanvas().setContentPane(this._layoutContainer);
this._diagram.getPanZoomCanvas().zoomToFit();b?this.InAnimOnEnd():this.CreateDialogInAnim().play();this._isDialogVisible=!0;c=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.AdfDiagram.PREVIEW_ROW_KEY,this._node.getData().getId());this._diagram.dispatchEvent(c)}};DvtAdfDiagramStackBadgeHandler.prototype.ApplyLayoutPanZoom=function(a){if(this._layoutContainer&&a){var b=this._layoutContainer._diagram.getPanZoomCanvas();b.zoomTo(a.zoom,0,0);b.panTo(a.panX,a.panY)}};
DvtAdfDiagramStackBadgeHandler.prototype.SetupPanZoomCanvas=function(){var a=this._diagram.getPanZoomCanvas();this._panZoomCanvasTranslateY=a.getTranslateY();this._panZoomCanvasSize=a.getSize();this._contentPane=a.getContentPane();this._contentPaneParent=this._contentPane.getParent();this._contentPaneIndex=this._contentPaneParent.getChildIndex(this._contentPane);this._panZoomCanvasParent=a.getParent();this._panZoomCanvasIndex=this._panZoomCanvasParent.getChildIndex(a);this._panZoomCanvasParent.addChildAt(this._contentPane,
this._panZoomCanvasIndex);this._diagram.addChild(a);this._contentPaneParent.addChildAt(this._dialog,this._contentPaneIndex);a.setTranslateY(0);a.setSize(this._panZoomCanvasSize.w,this._panZoomCanvasSize.h+this._panZoomCanvasTranslateY)};
DvtAdfDiagramStackBadgeHandler.prototype.RestorePanZoomCanvas=function(){var a=this._diagram.getPanZoomCanvas();this._contentPaneParent.addChildAt(this._contentPane,this._contentPaneIndex);a.setContentPane(this._contentPane);this._panZoomCanvasParent.addChildAt(a,this._panZoomCanvasIndex);a.setTranslateY(this._panZoomCanvasTranslateY);a.setSize(this._panZoomCanvasSize.w,this._panZoomCanvasSize.h);this._panZoomCanvasSize=this._panZoomCanvasTranslateY=this._panZoomCanvasIndex=this._panZoomCanvasParent=
this._contentPaneIndex=this._contentPaneParent=this._contentPane=null};
DvtAdfDiagramStackBadgeHandler.prototype.CreateDialogInAnim=function(){this._dialog.setTranslateY(-this._diagram.getHeight()-1);var a;this._buttonContainer?(this._buttonContainer.setTranslateY(-this._diagram.getHeight()-1),a=new dvt.AnimMoveTo(this._diagram.getCtx(),[this._dialog,this._buttonContainer],new dvt.Point(0,0),this._diagram.getAnimationDuration())):a=new dvt.AnimMoveTo(this._diagram.getCtx(),[this._dialog],new dvt.Point(0,0),this._diagram.getAnimationDuration());a.setEasing(dvt.BaseAnimation.EASING_BOUNCE_OUT);
dvt.Playable.appendOnEnd(a,this.InAnimOnEnd,this);return a};DvtAdfDiagramStackBadgeHandler.prototype.InAnimOnEnd=function(){this._diagram.getPanZoomCanvas().addChildAt(this._layoutContainer,this._contentPaneIndex+1)};
DvtAdfDiagramStackBadgeHandler.prototype.CreateDialogCloseAnim=function(){var a;a=this._buttonContainer?new dvt.AnimMoveTo(this._diagram.getCtx(),[this._dialog,this._buttonContainer],new dvt.Point(0,-this._diagram.getHeight()-1),this._diagram.getAnimationDuration()):new dvt.AnimMoveTo(this._diagram.getCtx(),[this._dialog],new dvt.Point(0,-this._diagram.getHeight()-1),this._diagram.getAnimationDuration());a.setEasing(dvt.BaseAnimation.EASING_BOUNCE_IN);dvt.Playable.appendOnEnd(a,this.RestorePanZoomCanvas,
this);this._dialog.addChild(this._layoutContainer);return a};
DvtAdfDiagramStackBadgeHandler.prototype.CreateDialogOutAnimEndFunc=function(a){var b=this;return function(){b._diagram.SetStackPreviewNodeId(null);b._diagram.UpdateAriaAttributes();var c=b._diagram.getCtx().getTooltipManager();c&&c.hideTooltip();b._buttonContainer&&b._buttonContainer.getParent()&&b._buttonContainer.getParent().removeChild(b._buttonContainer);b._layoutContainer&&b._layoutContainer.getParent()&&b._layoutContainer.getParent().removeChild(b._layoutContainer);b._dialog&&b._dialog.getParent()&&
b._dialog.getParent().removeChild(b._dialog);b._dialog=null;b._layoutContainer=null;b._arNodes=null;a&&b.ExplodeStack()}};
DvtAdfDiagramStackBadgeHandler.prototype.CloseDialog=function(a,b){this._diagram.getPanZoomCanvas().removeEvtListener(dvt.ZoomEvent.TYPE,this.HandleZoom,!1,this);if(b)this._dialog.addChild(this._layoutContainer),this.RestorePanZoomCanvas(),this.CreateDialogOutAnimEndFunc(a).call();else{var c=this.CreateDialogCloseAnim(),d=this.CreateDialogOutAnimEndFunc(a);dvt.Playable.appendOnEnd(c,d);c.play()}this._isDialogVisible=!1};
DvtAdfDiagramStackBadgeHandler.prototype.ExplodeStack=function(){var a=this._node.GetStackId();if(a){var b=this._diagram.getExplodedStacks(),b=b?b.slice(0):[];b.push(a);this._diagram.setExplodedStacks(b)}};
DvtAdfDiagramStackBadgeHandler.prototype.CreateCloseButton=function(){var a=this._diagram.getResourcesMap().stackPreviewCloseEna,b=this._diagram.getResourcesMap().stackPreviewCloseOvr,c=this._diagram.getResourcesMap().stackPreviewCloseDwn,d=this._diagram.getResourcesMap().stackPreviewCloseTip,a=this._diagram.CreateButton(a,b,c,dvt.AdfDiagram._WIDE_BUTTON_SIZE,dvt.AdfDiagram._BUTTON_SIZE+this._diagram._buttonBorderRadius,this._diagram._buttonBorderRadius),b={getTooltip:function(){return d}},e=this;
b.HandleClick=function(a){dvt.EventManager.consumeEvent(a);e.CloseDialog();a=dvt.EventFactory.newAdfPropertyChangeEvent();a.properties[dvt.AdfDiagram.PREVIEW_ROW_KEY]="null";a.properties[dvt.AdfDiagram.PREVIEW_PAN_ZOOM_KEY]="null";e._diagram.dispatchEvent(a)};b.isUnrelatedToSelection=function(){return!0};this._diagram.getEventManager().associate(a,b);return a};
DvtAdfDiagramStackBadgeHandler.prototype.CreatePinButton=function(){var a=this._diagram.getResourcesMap().stackPreviewUnstackEna,b=this._diagram.getResourcesMap().stackPreviewUnstackOvr,c=this._diagram.getResourcesMap().stackPreviewUnstackDwn,d=this._diagram.getResourcesMap().unstackTip,a=this._diagram.CreateButton(a,b,c,dvt.AdfDiagram._BUTTON_SIZE,dvt.AdfDiagram._BUTTON_SIZE+this._diagram._buttonBorderRadius,this._diagram._buttonBorderRadius),b={getTooltip:function(){return d}},e=this;b.HandleClick=
function(a){dvt.EventManager.consumeEvent(a);e.CloseDialog(!0)};b.isUnrelatedToSelection=function(){return!0};this._diagram.getEventManager().associate(a,b);return a};DvtAdfDiagramStackBadgeHandler.prototype.CreateNodes=function(a){for(var b=a.length,c=[],d,e=0;e<b;e++)d=a[e],d=this.CloneNode(this._diagram.getNodeById(d)),c.push(d);return c};
DvtAdfDiagramStackBadgeHandler.prototype.RenderNodes=function(a){var b=this._diagram.createAfContext(),c,d=a.length,e;for(c=0;c<d;c++)e=a[c],e.createNodeContents(b);for(c=0;c<d;c++)e=a[c],e.renderNode(b)};DvtAdfDiagramStackBadgeHandler.prototype.CloneNode=function(a){var b=new dvt.AdfDiagramNode(this._diagram.getCtx(),a.getData(),this._diagram);b.setForceZoom100Facet(!0);b.setFlyOutEnabled(!1);b.setNodeDef(a.getNodeDef());b.SetMaxAlpha(a.GetMaxAlpha());b.setAlpha(a.GetMaxAlpha());return b};
DvtAdfDiagramStackBadgeHandler.prototype.HandleZoom=function(a){switch(a.getSubType()){case dvt.ZoomEvent.SUBTYPE_ZOOMED:if(a.getOldZoom()!==a.getNewZoom()){var b=Math.min(a.getOldZoom(),1);a=Math.min(a.getNewZoom(),1);b=Math.ceil(b/.25);a=Math.ceil(a/.25);b!==a&&this.RenderNodes(this._arNodes)}}};DvtAdfDiagramStackBadgeHandler.prototype.isDialogVisible=function(){return this._isDialogVisible};
dvt.AdfDiagramTransitionUtils={};dvt.Obj.createSubclass(dvt.AdfDiagramTransitionUtils,dvt.Obj,"dvt.AdfDiagramTransitionUtils");
dvt.AdfDiagramTransitionUtils.processFilter=function(a,b,c){c||dvt.AdfDiagramTransitionUtils.__prepForDataAnim(a,!0);var d=dvt.AdfDiagramTransitionUtils._buildListFromKeys(a._arNodeIds),e=dvt.AdfDiagramTransitionUtils._buildListFromKeys(a._arLinkIds),f=a.getHiddenAttributeGroups();c=d.slice(0);var g=[];if(f)for(var h=0;h<d.length;h++){var k=d[h],l=a.getNodeById(k).getData().getAttributeGroups();if(l)for(var m=0;m<l.length;m++)if(-1!=dvt.ArrayUtils.getIndex(f,l[m])){g.push(k);break}}dvt.AdfDiagramTransitionUtils._removeDescendants(c,
g,a);d=dvt.AdfDiagramTransitionUtils._filterLinks(e,c,a);a._nodesPostFilter=c;a._linksPostFilter=d;dvt.AdfDiagramTransitionUtils.processContainerCount(a,b,!0)};
dvt.AdfDiagramTransitionUtils.processContainerCount=function(a,b,c){c||dvt.AdfDiagramTransitionUtils.__prepForDataAnim(a,!0);c=a._nodesPostFilter;var d=a._linksPostFilter;if(c&&d){for(d=0;d<c.length;d++){var e=a.getNodeById(c[d]);if(0<e.getChildNodeCount()){for(var f=e.getChildNodeIds(),g=0,h=0;h<f.length;h++)-1!=dvt.ArrayUtils.getIndex(c,f[h])&&g++;g!=e.getVisibleChildNodeCount()&&e.setVisibleChildNodeCount(g)}}dvt.AdfDiagramTransitionUtils.processDrill(a,b,!0)}else dvt.AdfDiagramTransitionUtils.processFilter(a,
b,!0)};
dvt.AdfDiagramTransitionUtils.processDrill=function(a,b,c){c||dvt.AdfDiagramTransitionUtils.__prepForDataAnim(a,!0);var d=a._nodesPostFilter,e=a._linksPostFilter;if(d&&e){if(a._drilledNodePath){c=[];for(var f=a._drilledNodePath[a._drilledNodePath.length-1],g=0;g<d.length;g++)for(var h=d[g],k=a.getNodeById(h).getData().getGroupId();k;)k==f&&c.push(h),k=a.getNodeById(k).getData().getGroupId();for(d=0;d<a._drilledNodePath.length;d++)h=a._drilledNodePath[d],a.getNodeById(h),c.push(h);e=dvt.AdfDiagramTransitionUtils._filterLinks(e,c,
a)}else c=d;a._nodesPostDrill=c;a._linksPostDrill=e;dvt.AdfDiagramTransitionUtils.processIsolate(a,b,!0)}else dvt.AdfDiagramTransitionUtils.processFilter(a,b,!0)};
dvt.AdfDiagramTransitionUtils.processIsolate=function(a,b,c){c||dvt.AdfDiagramTransitionUtils.__prepForDataAnim(a,!0);var d=a._nodesPostDrill;c=a._linksPostDrill;if(d&&c){var e={},f={};if(a._isolatedNodes)for(var g=0;g<a._isolatedNodes.length;g++){var h=a._isolatedNodes[g];e[h]=h;var k=dvt.AdfDiagramTransitionUtils._getAncestors(a,h);f[h]=k;for(h=0;h<k.length;h++){var l=k[h];e[l]=l}}for(var l=[],m=null,g=0;g<d.length;g++)if(h=d[g],!a._isolatedNodes||e[h])if(l.push(h),f[h])if(k=f[h],m)for(h=0;h<m.length;h++){if(h>
k.length||m[h]!=k[h]){m.splice(h,m.length-h);break}}else m=k;d=[];c=dvt.AdfDiagramTransitionUtils._filterLinks(c,l,a,d);a._nodesPostIsolate=l;a._linksPostIsolate=c;a._linksRemovedByIsolate=d;a._hiddenAncestors=m?m:a._drilledNodePath;if(m&&a._drilledNodePath)for(g=0;g<a._drilledNodePath.length;g++)0>dvt.ArrayUtils.getIndex(a._hiddenAncestors,a._drilledNodePath[g])&&a._hiddenAncestors.push(a._drilledNodePath[g]);dvt.AdfDiagramTransitionUtils.processStack(a,b,!0)}else dvt.AdfDiagramTransitionUtils.processDrill(a,
b,!0)};dvt.AdfDiagramTransitionUtils._getAncestors=function(a,b){for(var c=[],d=b;d;)(d=(d=a.getNodeById(d))?d.getData().getGroupId():null)&&c.unshift(d);return c};
dvt.AdfDiagramTransitionUtils.processStack=function(a,b,c){c||dvt.AdfDiagramTransitionUtils.__prepForDataAnim(a,!0);var d=a._nodesPostIsolate;c=a._linksPostIsolate;if(d&&c){var e=dvt.AdfDiagramTransitionUtils._buildStackMaps(d,c,a._arAttrGrps,a._arExplodedStacks,a),f=e[0],g=e[1],h=e[2],k=dvt.AdfDiagramTransitionUtils._buildStackMaps(d,c,a._arOldAttrGrps,a._arOldExplodedStacks,a),e=k[0],k=k[1],l;if(f){var m=[];for(l in f)m.push(f[l][0]);if(h)for(var n=0;n<h.length;n++)m.push(h[n]);l=[];for(h=0;h<m.length;h++){for(var n=
m[h],p=!0;n;)if(n=a.getNodeById(n).getData().getGroupId())if(p=-1!=dvt.ArrayUtils.getIndex(m,n),!p)break;p&&l.push(m[h])}d=[];m={};n={};p=!1;for(h=0;h<c.length;h++){var q=c[h],r=a.getLinkById(q),t=r.getData().getStartId(),r=r.getData().getEndId();if(-1!=dvt.ArrayUtils.getIndex(l,t)&&-1!=dvt.ArrayUtils.getIndex(l,r))d.push(q);else{var t=dvt.AdfDiagramTransitionUtils._findFirstVisibleNode(t,l,f,g,a),u=dvt.AdfDiagramTransitionUtils._findFirstVisibleNode(r,l,f,g,a);t!=u&&(p=!0,r=[],r.push(t),r.push(u),
t+=u,m[q]=r,r=n[t],r||(r=[],n[t]=r,d.push(q)),r.push(q))}}}else l=d.slice(0),d=c.slice(0);a._nodesPostStack=l;a._linksPostStack=d;a._stackNodeMap=f;a._nodeStackMap=g;a._oldStackNodeMap=e;a._oldNodeStackMap=k;p||(n=m=null);a._oldStackLinkPromotionMap=a._stackLinkPromotionMap;a._oldStackPromotionLinkMap=a._stackPromotionLinkMap;a._stackLinkPromotionMap=m;a._stackPromotionLinkMap=n;dvt.AdfDiagramTransitionUtils.processContainerDisclosure(a,b,!0)}else dvt.AdfDiagramTransitionUtils.processIsolate(a,b,
!0)};
dvt.AdfDiagramTransitionUtils.processContainerDisclosure=function(a,b,c){c||dvt.AdfDiagramTransitionUtils.__prepForDataAnim(a,!0);var d=a._nodesPostStack;c=a._linksPostStack;if(d&&c){for(var e=[],f=[],g=[],h={},k={},l=a._nodeStackMap,m=0;m<d.length;m++){var n=d[m],p=a.getNodeById(n);!dvt.AdfDiagramTransitionUtils.IsNodeDisclosed(a,n)||l&&l[n]?p.setDisclosed(!1):(g.push(n),p.setDisclosed(!0))}for(m=0;m<d.length;m++){for(var n=d[m],p=a.getNodeById(n),p=p.getData().getGroupId(),q,r=!0;p;)if(q=a.getNodeById(p)){if(!q.isDisclosed()){r=!1;
break}p=q.getData().getGroupId()}r&&e.push(n)}d=dvt.AdfDiagramTransitionUtils._makeMap(e);for(m=0;m<c.length;m++){for(var n=c[m],t=a.getLinkById(n),p=t.getData().getGroupId(),r=!0;p;)if(q=a.getNodeById(p)){if(!q.isDisclosed()){r=!1;break}p=q.getData().getGroupId()}if(r)if(p=t.getData().getStartId(),r=t.getData().getEndId(),!d[p]||!d[r]||l&&(l[p]||l[r])){if(q=dvt.AdfDiagramTransitionUtils._findFirstVisibleNode(p,e,a._stackNodeMap,a._nodeStackMap,a),r=dvt.AdfDiagramTransitionUtils._findFirstVisibleNode(r,
e,a._stackNodeMap,a._nodeStackMap,a),q!==r){p=[];p.push(q);p.push(r);t=q+r;h[n]=p;q=k[t];q||(q=[],k[t]=q,f.push(n));r=!1;if(a._stackLinkPromotionMap&&a._stackPromotionLinkMap&&(p=a._stackLinkPromotionMap[n]))for(r=!0,t=p[0]+p[1],p=a._stackPromotionLinkMap[t],t=0;t<p.length;t++)q.push(p[t]);r||q.push(n)}}else f.push(n)}a._nodesPostContainerDisclosure=e;a._linksPostContainerDisclosure=f;a._oldContainerLinkPromotionMap=a._containerLinkPromotionMap;a._oldContainerPromotionLinkMap=a._containerPromotionLinkMap;
a._containerLinkPromotionMap=h;a._containerPromotionLinkMap=k;a._disclosedNodesPostContainerDisclosure=g;b?dvt.AdfDiagramTransitionUtils._setVisibility(a):dvt.AdfDiagramTransitionUtils.__animateTransition(a,!1)}else dvt.AdfDiagramTransitionUtils.processStack(a,b,!0)};dvt.AdfDiagramTransitionUtils.setVisibility=function(a){dvt.AdfDiagramTransitionUtils.processContainerDisclosure(a,!0,!0)};
dvt.AdfDiagramTransitionUtils._buildStackMaps=function(a,b,c,d,e){var f,g,h;if(c&&0<c.length){b={};h=[];for(var k=0;k<a.length;k++){f=a[k];var l=dvt.AdfDiagramTransitionUtils._getStackName(f,c,e);l?d&&0<d.length&&-1<dvt.ArrayUtils.getIndex(d,l)?h.push(f):b[l]?b[l].push(f):b[l]=[f]:h.push(f)}f={};g={};for(l in b)if(a=b[l],1==a.length)h.push(a[0]);else for(f[l]=a,k=0;k<a.length;k++)g[a[k]]=l}l=[];l.push(f);l.push(g);l.push(h);return l};
dvt.AdfDiagramTransitionUtils._getStackName=function(a,b,c){return c.CreateStackName(a,b)};dvt.AdfDiagramTransitionUtils.__animateTransition=function(a,b){dvt.AdfDiagramTransitionUtils._animateTransitionDataHandler(a,b)};dvt.AdfDiagramTransitionUtils.__prepForDataAnim=function(a,b){a._oldDataAnimState=a.CreateDataAnimationState();a.HideNodeTransientToolbar();a.ResetNodesAndLinks(b)};
dvt.AdfDiagramTransitionUtils._animateTransitionDataHandler=function(a,b){a.setInteractionEnabled(!1);a._processHighlighting();dvt.AdfDiagramTransitionUtils._setVisibility(a);a._refreshOverviewContent=!0;b||a.RenderComponentInternal();a.UpdateKeyboardFocus();if(a._selectionHandler){var c=a._selectionHandler.getSelectedIds();c&&0<c.length&&(a._selectedNodes=c,a._processInitialSelections())}dvt.AdfDiagramTransitionUtils._createZoomFunc(a,!0)();c=new DvtAdfDiagramDataAnimationHandler(a.getCtx());c.ConstructAnimation(a._oldDataAnimState,
a,a._oldNodes,a._nodes,a._oldLinks,a._links,a._oldArNodeIds,a._arNodeIds,a._oldArLinkIds,a._arLinkIds);a._oldDataAnimState=null;c=c.getAnimation();a._oldLinksPane.getParent().removeChild(a._oldLinksPane);a._oldNodesPane.getParent().removeChild(a._oldNodesPane);a._oldTopPane.getParent().removeChild(a._oldTopPane);var d=a.getEventManager().getTooltipsEnabled();a.getEventManager().setTooltipsEnabled(!1);var e=a.getCtx().getTooltipManager();e&&e.hideTooltip();c?(dvt.Playable.appendOnEnd(c,function(){a.getEventManager().setTooltipsEnabled(d)}),
dvt.Playable.appendOnEnd(c,function(){a.setInteractionEnabled(!0)}),dvt.Playable.appendOnEnd(c,function(){a.clearAutomationState()}),dvt.Playable.appendOnEnd(c,a.destroyOldContent,a),a.setAnimation(c),c.play()):(a.setInteractionEnabled(!0),a.clearAutomationState())};
dvt.AdfDiagramTransitionUtils._createZoomFunc=function(a,b){return function(c){var d=null,e=!1;if(a._disclosingNode){var f=a.GetViewBounds(c,[a._disclosingNode],[]),g=a.getPanZoomCanvas().getViewport(),h=a.getPanZoomCanvas().getZoomToFitPadding()/a.getPanZoomCanvas().getZoom();g.x+=h;g.y+=h;g.w-=2*h;g.h-=2*h;f.w<=g.w&&f.h<=g.h?(f=a.CalcOffsetToPanNodeIntoView(a._disclosingNode,c),!f||0==f.x&&0==f.y?e=!0:(d=g,d.x-=f.x,d.y-=f.y)):d=f;a._disclosingNode=null}else a._undisclosingNode&&(g=a.GetViewBounds(c),
a.getPanZoomCanvas().calcZoomToFitScale(g)<a.getPanZoomCanvas().getZoom()&&((g=a.CalcOffsetToPanNodeIntoView(a._undisclosingNode,c))||(g=new dvt.Point(0,0)),f=g,!f||0==f.x&&0==f.y?e=!0:(d=a.getPanZoomCanvas().getViewport(),h=a.getPanZoomCanvas().getZoomToFitPadding()/a.getPanZoomCanvas().getZoom(),d.x+=h,d.y+=h,d.w-=2*h,d.h-=2*h,d.x-=f.x,d.y-=f.y)),a._undisclosingNode=null);(g=a.AdjustMinZoom(c))&&!d&&(d=g);e||(d||(d=a.GetViewBounds(c)),a.SyncOverviewAndZoomToFit(c,d,b))}};
dvt.AdfDiagramTransitionUtils._filterLinks=function(a,b,c,d){b=dvt.AdfDiagramTransitionUtils._makeMap(b);for(var e=[],f=0;f<a.length;f++){var g=a[f],h=c.getLinkById(g),k=h.getData().getStartId(),h=h.getData().getEndId();b[k]&&b[h]?e.push(g):d&&d.push(g)}return e};
dvt.AdfDiagramTransitionUtils._calculateMatrix=function(a,b,c,d){var e=Math.sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)),f=Math.sqrt((c.x-d.x)*(c.x-d.x)+(c.y-d.y)*(c.y-d.y)),g;if(0==f)g=e=0;else{var h=(b.x-a.x)/e;b=(b.y-a.y)/e;var k=(d.x-c.x)/f;d=(d.y-c.y)/f;f/=e;e=f*(k*h+d*b);g=f*(d*h-k*b)}h=e;b=-g;k=g;f=e;d=-e*a.x+g*a.y+c.x;a=-g*a.x-e*a.y+c.y;c=new dvt.Matrix;c._a=h;c._b=b;c._c=k;c._d=f;c._tx=d;c._ty=a;return c};
dvt.AdfDiagramTransitionUtils._buildListFromKeys=function(a){var b=[],c;for(c in a)b.push(a[c]);return b};dvt.AdfDiagramTransitionUtils._makeMap=function(a){if(!a)return null;for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b};
dvt.AdfDiagramTransitionUtils._setVisibility=function(a){for(var b=a._nodesPostContainerDisclosure,c=dvt.AdfDiagramTransitionUtils._makeMap(b),d=a._linksPostContainerDisclosure,e=dvt.AdfDiagramTransitionUtils._makeMap(d),f=a._stackNodeMap,g=a._nodeStackMap,h=a._containerPromotionLinkMap,k=a._containerLinkPromotionMap,l=dvt.AdfDiagramTransitionUtils._makeMap(a._hiddenAncestors),m=0;m<b.length;m++){var n=b[m],p=a.getNodeById(n);if(f&&g){var q=g[n];if(q&&(q=f[q],n===q[0]&&1<q.length)){p.setStackCount(q.length);
p.setStack(!0);p.addAccessibilityAttributes();continue}}p.setStack(!1);p.setStackCount(0)}f={};for(m=0;m<a._linksRemovedByIsolate.length;m++){var r=a._linksRemovedByIsolate[m],p=a.getLinkById(r),q=p.getData().getStartId(),p=p.getData().getEndId();f[q]=q;f[p]=p}for(m=0;m<b.length;m++)if(n=b[m],p=a.getNodeById(n),p._bStack&&a._nodeStackMap){for(var q=a._nodeStackMap[n],q=a._stackNodeMap[q],g=!1,t=0;t<q.length;t++)if(f[q[t]]){g=!0;break}p.setPartiallyExpanded(g)}else f[n]?p.setPartiallyExpanded(!0):
p.setPartiallyExpanded(!1);for(n in a._nodes)p=a.getNodeById(n),!c[n]&&p.getVisible()?(p.setVisible(!1),p.setStack(!1),p.setStackCount(0)):c[n]&&!p.getVisible()&&p.setVisible(!0),l&&l[n]?p.isHiddenAncestor()||p.setHiddenAncestor(!0):p.isHiddenAncestor()&&p.setHiddenAncestor(!1);for(m=0;m<d.length;m++){r=d[m];p=a.getLinkById(r);if(h&&k&&(b=k[r])&&(b=h[b[0]+b[1]],r===b[0])){p.setPromotionCount(b.length);p.setPromoted(!0);continue}p.setPromoted(!1);p.setPromotionCount(0)}for(r in a._links)p=a.getLinkById(r),
p.setAlpha(Math.min(p.getAlpha(),p.GetMaxAlpha())),p._labelObj&&p._labelObj.setAlpha(Math.min(p._labelObj.getAlpha(),p.GetMaxAlpha())),!e[r]&&p.getVisible()?(p.setVisible(!1),p.setPromoted(!1),p.setPromotionCount(0)):e[r]&&!p.getVisible()&&p.setVisible(!0)};
dvt.AdfDiagramTransitionUtils.transformLinkPoints=function(a,b,c,d,e,f,g,h,k,l){l||(l=a);var m=!1;a&&0<a.length&&isNaN(a[0])&&(m=!0);var n=!1;l&&0<l.length&&isNaN(l[0])&&(n=!0);m=m?new dvt.Point(a[1],a[2]):new dvt.Point(a[0],a[1]);a=new dvt.Point(a[a.length-2],a[a.length-1]);b=new dvt.Point(f.x+g.x+(m.x-b.x-c.x)*g.w/c.w,f.y+g.y+(m.y-b.y-c.y)*g.h/c.h);d=new dvt.Point(h.x+k.x+(a.x-d.x-e.x)*k.w/e.w,h.y+k.y+(a.y-d.y-e.y)*k.h/e.h);d=dvt.AdfDiagramTransitionUtils._calculateMatrix(m,a,b,d);e=[];if(n)for(n=
0;n<l.length;n++)switch(k=l[n],k){case "M":h=d.transformPoint(new dvt.Point(l[++n],l[++n]));e.push(k,h.x,h.y);break;case "L":h=d.transformPoint(new dvt.Point(l[++n],l[++n]));e.push(k,h.x,h.y);break;case "Q":h=d.transformPoint(new dvt.Point(l[++n],l[++n]));e.push(k,h.x,h.y);h=d.transformPoint(new dvt.Point(l[++n],l[++n]));e.push(h.x,h.y);break;case "C":h=d.transformPoint(new dvt.Point(l[++n],l[++n])),e.push(k,h.x,h.y),h=d.transformPoint(new dvt.Point(l[++n],l[++n])),e.push(h.x,h.y),h=d.transformPoint(new dvt.Point(l[++n],
l[++n])),e.push(h.x,h.y)}else for(n=0;n<l.length;n+=2)h=d.transformPoint(new dvt.Point(l[n],l[n+1])),e.push(h.x),e.push(h.y);return e};dvt.AdfDiagramTransitionUtils._removeDescendants=function(a,b,c){for(var d=0;d<b.length;d++){var e=b[d],f=dvt.ArrayUtils.getIndex(a,e);-1!=f&&a.splice(f,1);e=c.getNodeById(e);0<e.getChildNodeCount()&&dvt.AdfDiagramTransitionUtils._removeDescendants(a,e.getChildNodeIds(),c)}};
dvt.AdfDiagramTransitionUtils._findFirstVisibleNode=function(a,b,c,d,e){if(-1!=dvt.ArrayUtils.getIndex(b,a))return a;if(c&&d){var f=d[a];if(f&&(f=c[f][0],a!=f))return dvt.AdfDiagramTransitionUtils._findFirstVisibleNode(f,b,c,d,e)}return(a=e.getNodeById(a).getData().getGroupId())?dvt.AdfDiagramTransitionUtils._findFirstVisibleNode(a,b,c,d,e):null};
dvt.AdfDiagramTransitionUtils.IsNodeDisclosed=function(a,b){return a._disclosedNodes&&-1<dvt.ArrayUtils.getIndex(a._disclosedNodes,b)||a._drilledNodePath&&-1<dvt.ArrayUtils.getIndex(a._drilledNodePath,b)};
var DvtAdfDiagramClientBehaviorHandler=function(a,b,c){this.Init(a,b,c);this._diagram=c;this._suspendAnimation=!1};dvt.Obj.createSubclass(DvtAdfDiagramClientBehaviorHandler,dvt.ClientBehaviorHandler,"DvtAdfDiagramClientBehaviorHandler");DvtAdfDiagramClientBehaviorHandler.prototype.Init=function(a,b,c){DvtAdfDiagramClientBehaviorHandler.superclass.Init.call(this,a,b,c)};
DvtAdfDiagramClientBehaviorHandler.prototype.processClick=function(a,b){var c=DvtAdfDiagramClientBehaviorHandler.superclass.processClick.call(this,a,b);c&&!this._suspendAnimation&&dvt.AdfDiagramTransitionUtils.processFilter(this._diagram);this._suspendAnimation=!1;return c};DvtAdfDiagramClientBehaviorHandler.prototype.CreateClientBehaviorEvent=function(a,b){var c=DvtAdfDiagramClientBehaviorHandler.superclass.CreateClientBehaviorEvent.call(this,a,b);c.addParam("suppressAnimation",!0);return c};
DvtAdfDiagramClientBehaviorHandler.prototype.suspendAnimation=function(){this._suspendAnimation=!0};
dvt.AdfDiagramControlPanelLAFUtils={};dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_TREE="viewtree";dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_TREE_HORIZONTAL="viewtreeHorizontal";dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_VERTICAL="viewtreeVertical";dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_RADIAL="viewtreeRadial";dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_CIRCLE="viewtreeCircle";dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_FORCE="viewtree_force";
dvt.AdfDiagramControlPanelLAFUtils.createLayoutButtonState=function(a,b,c,d,e){c=dvt.AdfDiagramControlPanelLAFUtils.ConvertLayoutToButtonIconName(c);return dvt.ButtonLAFUtils.createControlButtonState(a,c,b,d,e)};dvt.AdfDiagramControlPanelLAFUtils.createLayoutItemState=function(a,b,c,d,e){c=dvt.AdfDiagramControlPanelLAFUtils.ConvertLayoutToItemIconName(c,!0);return dvt.ButtonLAFUtils.createLayoutItemButtonState(a,dvt.ButtonLAFUtils.BUTTON_TYPE_CONTROLS,c,b,d,e)};
dvt.AdfDiagramControlPanelLAFUtils.ConvertLayoutToButtonIconName=function(a){(a=dvt.AdfDiagramControlPanelLAFUtils.ConvertLayoutToItemIconName(a))&&(a+="Sel");return a};
dvt.AdfDiagramControlPanelLAFUtils.ConvertLayoutToItemIconName=function(a){var b=null;switch(a){case dvt.HierarchyViewer.LAYOUT_HIER_VERT_TOP:b=dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_TREE;break;case dvt.HierarchyViewer.LAYOUT_HIER_HORZ_START:b=dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_TREE_HORIZONTAL;break;case dvt.HierarchyViewer.LAYOUT_TREE:b=dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_VERTICAL;break;case dvt.HierarchyViewer.LAYOUT_RADIAL:b=dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_RADIAL;
break;case dvt.HierarchyViewer.LAYOUT_CIRCLE:b=dvt.AdfDiagramControlPanelLAFUtils.BUTTON_NAME_VIEW_CIRCLE}return b};dvt.AdfDiagramControlPanelLAFUtils.createPanelCardSyncButtonState=function(a,b,c,d){return dvt.ButtonLAFUtils.createPanelCardButtonState(a,b,c,d)};dvt.AdfDiagramControlPanelLAFUtils.createPanelCardSyncItemState=function(a,b,c,d,e,f){return dvt.ButtonLAFUtils.createPanelCardSyncItemState(a,b,c,d,e,f)};
dvt.AdfDiagramControlPanel=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(dvt.AdfDiagramControlPanel,dvt.ControlPanel,"dvt.AdfDiagramControlPanel");dvt.AdfDiagramControlPanel.prototype.Init=function(a,b,c){dvt.AdfDiagramControlPanel.superclass.Init.call(this,a,b,c)};
dvt.AdfDiagramControlPanel.prototype.PopulateHorzContentBar=function(a){dvt.AdfDiagramControlPanel.superclass.PopulateHorzContentBar.call(this,a);var b;this._view.isSyncCardOff()||((b=this.updateCardSelectorList(a))&&1<b.getItemCount()&&(a.addChild(b),b.setTranslate(0,0)),this._panelCardSyncCombo=b)};
dvt.AdfDiagramControlPanel.prototype.HandlePanelCardSyncChange=function(a){a.subtype==dvt.ComboBoxEvent.SUBTYPE_ITEM_CHANGE&&(a=this._panelCardSyncCombo.getItem(a.getIndex()),this._view.syncPanelCards(a.getId(),a.getText(),a.getIcon()))};
dvt.AdfDiagramControlPanel.prototype.updateCardSelectorList=function(a){var b=this._view.getCardSelectorList(),c=this._panelCardSyncComboBox;a=void 0==a?null:a;null!=b&&0<b.length&&(c&&(a||(a=c.getParent()),this.destroyCardSelector()),c=this.createPanelCardSyncComboBox(b),a&&a.addChild(c));return c};
dvt.AdfDiagramControlPanel.prototype.createPanelCardSyncComboBox=function(a){if(null==a||1>a.length)return null;var b=this._view.getCtx(),c=this._view.getSubcomponentStyles(),d=new dvt.ComboBox(b,null,c),e=this.getButtonImages();d.setEventManager(this._eventManager);d.setStaticButtonStates(dvt.AdfDiagramControlPanelLAFUtils.createPanelCardSyncButtonState(b,dvt.Button.STATE_ENABLED,c,e),dvt.AdfDiagramControlPanelLAFUtils.createPanelCardSyncButtonState(b,dvt.Button.STATE_OVER,c,e),dvt.AdfDiagramControlPanelLAFUtils.createPanelCardSyncButtonState(b,
dvt.Button.STATE_DOWN,c,e));var e=-1,f=0,g,h=!1,k;for(k=0;k<a.length;k++){var l=a[k];g=l[0];l=l[1];null!=l&&0<l.length&&(h=!0);null!=g&&0<g.length&&(g=dvt.PanelCardComboBoxItem.createLabelText(b,g,null,c),g=g.measureDimensions(),g.w>f&&(f=g.w,e=k))}var m,f=-1;-1<e&&(c=a[e],m=this.createDvtPanelCardComboBoxItem(c[0],c[1],h,null),g=dvt.DisplayableUtils.getDimensionsForced(b,m),f=g.w);for(k=0;k<a.length;k++)c=a[k],k==e?d.addItem(m,c[0]):(b=this.createDvtPanelCardComboBoxItem(c[0],c[1],h,f),d.addItem(b,
c[0]));a=dvt.Bundle.getTranslatedString(dvt.Bundle.SUBCOMPONENT_PREFIX,"CONTROL_PANEL_SYNC");this._eventManager.associate(d,new dvt.SimpleObjPeer(a));d.addEvtListener(dvt.ComboBoxEvent.TYPE,this.HandlePanelCardSyncChange,!1,this);return d};dvt.AdfDiagramControlPanel.prototype.createDvtPanelCardComboBoxItem=function(a,b,c,d){d=void 0==d?-1:d;var e=this._view.getSubcomponentStyles(),f=this._view.getCtx();return new dvt.PanelCardComboBoxItem(f,null,c,a,b,d,e,this.getButtonImages())};
dvt.AdfDiagramControlPanel.prototype.destroyCardSelector=function(){var a=this._panelCardSyncComboBox;if(a){a.closeDropdown();a.destroy();a.removeEvtListener(dvt.ComboBoxEvent.TYPE,this.HandlePanelCardSyncChange);var b=a.getParent();null!=b&&b.removeChild(a)}};dvt.AdfDiagramControlPanel.prototype.isSingleHorzRow=function(){return!0};
dvt.AdfDiagramControlPanel.prototype.getActionDisplayable=function(a,b){var c=dvt.AdfDiagramControlPanel.superclass.getActionDisplayable.call(this,a,b);!c&&this._panelCardSyncCombo&&"viewMenu"==a&&(null!=b?this._panelCardSyncCombo.getButton().isMouseEnabled()||(c=this._view.convertPanelCardIdToIndex(b),c=this._panelCardSyncCombo.getItem(c)):c=this._panelCardSyncCombo.getButton());return c};dvt.PanelCardComboBoxItem=function(a,b,c,d,e,f,g,h){this.Init(a,b,c,d,e,f,g,h)};
dvt.Obj.createSubclass(dvt.PanelCardComboBoxItem,dvt.Container,"dvt.PanelCardComboBoxItem");dvt.PanelCardComboBoxItem.prototype.Init=function(a,b,c,d,e,f,g,h){dvt.PanelCardComboBoxItem.superclass.Init.call(this,a,null,b);this._sText=d;this._sIcon=e;this._images=h;this._styleMap=void 0==g?null:g;a=new dvt.Button(a,this.createItemState(a,dvt.Button.STATE_ENABLED,d,e,c,f),this.createItemState(a,dvt.Button.STATE_OVER,d,e,c,f),this.createItemState(a,dvt.Button.STATE_DOWN,d,e,c,f),null,d);this.addChild(a)};
dvt.PanelCardComboBoxItem.prototype.getText=function(){return this._sText};dvt.PanelCardComboBoxItem.prototype.getIcon=function(){return this._sIcon};dvt.PanelCardComboBoxItem.prototype.onIconLoaded=function(a){var b=dvt.ButtonLAFUtils.CONTROL_BUTTON_WIDTH,c=dvt.ButtonLAFUtils.CONTROL_BUTTON_HEIGHT;if(null!=a){if(a.width>b||a.height>c){var d=Math.max(a.width/b,a.height/c);a.scaleX=1/d;a.scaleY=1/d}a.x=(b-a.width)/2;a.y=(c-a.height)/2}};
dvt.PanelCardComboBoxItem.prototype.createItemState=function(a,b,c,d,e,f){var g=dvt.StyleUtils.getStyle(this._styleMap.comboBox,"itemHeight",0),h=dvt.StyleUtils.getStyle(this._styleMap.comboBox,"imagePadding",0),k=dvt.StyleUtils.getStyle(this._styleMap.comboBox,"itemPadding",0),l=dvt.ButtonLAFUtils.CONTROL_BUTTON_WIDTH,m=dvt.ButtonLAFUtils.CONTROL_BUTTON_HEIGHT,n=new dvt.Container(a),p=null,q=null,r=null;null!=d&&0<d.length&&(p=new dvt.Image(this.getCtx(),this.getIcon(),h,h,l-2*h,m-2*h));null!=c&&
(q=dvt.PanelCardComboBoxItem.createLabelText(a,c,b,this._styleMap),r=q.measureDimensions());0>f&&(f=r?r.w+2*k:0,f+=e?l+k:0);b=dvt.AdfDiagramControlPanelLAFUtils.createPanelCardSyncItemState(a,b,f,g,this._styleMap,this._images);n.addChild(b);b=0;p&&(b=dvt.Agent.isRightToLeft(a)?f-l-k:k,p.setTranslate(b,(g-m)/2),n.addChild(p),dvt.ImageLoader.loadImage(a,d,dvt.Obj.createCallback(this,this.onIconLoaded)));null!=q&&(b=dvt.Agent.isRightToLeft(a)?e?f-r.w-2*k-l:f-r.w-k:e?2*k+l:k,q.setTranslate(b,(g-r.h)/
2),n.addChild(q));return n};dvt.PanelCardComboBoxItem.createLabelText=function(a,b,c,d){a=new dvt.OutputText(a,b);b=new dvt.CSSStyle;b.setStyle(dvt.CSSStyle.FONT_SIZE,dvt.AfStyleUtils.getDefaultFontSize());b.setStyle(dvt.CSSStyle.FONT_FAMILY,dvt.AfStyleUtils.getDefaultFontFamily());a.setCSSStyle(b);return a};
dvt.AdfDiagramAutomationBase=function(a){this.Init(a)};dvt.Obj.createSubclass(dvt.AdfDiagramAutomationBase,dvt.Automation,"dvt.AdfDiagramAutomationBase");dvt.AdfDiagramAutomationBase.prototype.Init=function(a){this._diagram=a};dvt.AdfDiagramAutomationBase.prototype.getComponent=function(){return this._diagram};dvt.AdfDiagramAutomationBase.prototype.FindAfComponent=function(a,b){var c=null;a&&(c=dvt.AfComponentFactory.findAfComponent(a,b));return c};
dvt.AdfDiagramAutomationBase.prototype.CreateControlPanelSubId=function(a,b){var c="controlPanel";a&&(c+="#"+a);b&&(c+=":"+b);return c};dvt.AdfDiagramAutomationBase.prototype.GetControlPanelSubId=function(a,b){if(a){var c=a.getEventManager().GetLogicalObject(b);if(c&&c instanceof dvt.Button)for(var d=["disclosure","zoomIn","zoomOut","zoomToFit"],e=0;e<d.length;e++)if(a.getActionDisplayable(d[e])===c)return this.CreateControlPanelSubId(d[e])}return null};
var DvtAdfDiagramAutomation=function(a){this.Init(a)};dvt.Obj.createSubclass(DvtAdfDiagramAutomation,dvt.AdfDiagramAutomationBase,"DvtAdfDiagramAutomation");
DvtAdfDiagramAutomation.prototype.GetSubIdForDomElement=function(a){if(!a)return null;var b=this._getSubComponent(a);if(!b)return null;for(var c=dvt.AfComponentFactory.getAfComponent(a);a&&!(a instanceof dvt.AdfDiagram);){if(b instanceof dvt.AdfDiagramNode){if(a instanceof dvt.AdfDiagramNode)return this._createSubId("node",b.getData().getRowIndex());var d=a instanceof dvt.Button&&"disclosure"==a.getId()?"disclosure":null;if(c||d)return this._createSubId("node",b.getData().getRowIndex(),c?c.getId():
null,d)}else{if(b instanceof dvt.AdfDiagramLink)return this._createSubId("link",b.getData().getRowIndex(),c?c.getId():null);if(b instanceof dvt.AdfDiagram){if(a instanceof DvtAdfDiagramFlyOutButton){var e=this.getComponent().getNodeById(this.getComponent().GetTransientToolbarDataId());if(e)return a=a.getId(),d="unstacking"==a||"restacking"==a?"stacking":a,this._createSubId("node",e.getData().getRowIndex(),null,d)}if(a instanceof dvt.Button&&"restore"==a.getId())return this._createSubId("restore");
e=a.getParent();if(e instanceof dvt.Breadcrumbs)return this._createSubId("breadcrumbs",e.getCrumbIndex(a))}else if(b instanceof dvt.AdfDiagramControlPanel&&(e=this.GetControlPanelSubId(a)))return e}a=a.getParent()}return null};
DvtAdfDiagramAutomation.prototype.GetControlPanelSubId=function(a){var b=this.getComponent().getPanZoomCanvas().getControlPanel();if(!b||!a)return null;var c=DvtAdfDiagramAutomation.superclass.GetControlPanelSubId.call(this,b,a);if(!c&&(b=b.getActionDisplayable("viewMenu")))if(a===b)c=this.CreateControlPanelSubId("viewMenu");else if(a instanceof dvt.PanelCardComboBoxItem)for(var b=b.getParent().getItems(),d=0;d<b.length;d++)if(b[d]===a)return a=this.getComponent().convertIndexToPanelCardId(d),this.CreateControlPanelSubId("viewMenu",
a);return c};DvtAdfDiagramAutomation.prototype._getSubComponent=function(a){for(;a;){if(a instanceof dvt.AdfDiagram||a instanceof dvt.AdfDiagramNode||a instanceof dvt.AdfDiagramLink||a instanceof dvt.AdfDiagramControlPanel)return a;if(!a.getParent)break;a=a.getParent()}return null};
DvtAdfDiagramAutomation.prototype.getDomElementForSubId=function(a){var b=this._parseSubId(a),c=b.component,d=b.index;a=b.action;var b=b.stampId,e=null;"link"==c?e=this._findLinkDisplayable(d,b):"node"==c?e=this._findNodeDisplayable(d,b,a):"breadcrumbs"==c?e=this.getComponent().getBreadcrumbs().getCrumb(d):"restore"==c?e=this.getComponent().getRestoreButton().getChildAt(0):"controlPanel"==c&&(c=this.getComponent().getPanZoomCanvas().getControlPanel())&&a&&(e=c.getActionDisplayable(a,b));return e?
e.getElem():null};DvtAdfDiagramAutomation.prototype._findLinkDisplayable=function(a,b){var c=this.getComponent().GetLinkByRowIndex(a);if(c)if(b){var d,e=c.getEndConnector();if((d=dvt.AfComponentFactory.getAfComponent(e))&&d.getId()==b)return e;c=c.getStartConnector();if((d=dvt.AfComponentFactory.getAfComponent(c))&&d.getId()==b)return c}else return c;return null};
DvtAdfDiagramAutomation.prototype._findNodeDisplayable=function(a,b,c){if(a=this.getComponent().GetNodeByRowIndex(a))if(b){if(b=a.getAfComponent(b))return b.getDisplayObj()}else return c?"disclosure"==c?a.getContainerBadge():a.getFlyOutButtonById(c):a;return null};
DvtAdfDiagramAutomation.prototype._parseSubId=function(a){var b=a,c=-1,d=null,e=null,f=a.substring(0,a.indexOf("["));if(f){switch(f){case "node":case "link":case "breadcrumbs":b=f;break;default:b=null}c=parseInt(a.substring(a.indexOf("[")+1,a.indexOf("]")))}else 0==b.indexOf("controlPanel")&&(b="controlPanel");if("link"==b||"node"==b)if(f=a.indexOf(":"),-1!==f)d=a.substring(f+1);else{var g=a.indexOf("#");-1!==g&&(e=a.substring(g+1))}else"controlPanel"==b&&(g=a.indexOf("#"),-1!==g&&(f=a.indexOf(":"),
-1!==f&&(d=a.substring(f+1)),e=-1!=f?a.substring(g+1,f):a.substring(g+1)));return{component:b,index:c,stampId:d,action:e}};DvtAdfDiagramAutomation.prototype._createSubId=function(a,b,c,d){null!=b&&(a=a+"["+b+"]");c?a=a+":"+c:d&&(a=a+"#"+d);return a};
DvtAdfDiagramAutomation.prototype.getClientComponentProperties=function(a){if(!a||!a.getTypeName)return null;var b=a.getTypeName();return"dvt.AfButton"==b||"dvt.AfImage"==b||"dvt.AfLink"==b||"dvt.AfOutputFormatted"==b||"dvt.AfOutputText"==b||"dvt.AfPanelFormLayout"==b||"dvt.AfPanelGroupLayout"==b||"dvt.AfPanelLabelAndMessage"==b||"dvt.AfSeparator"==b||"dvt.AfSpacer"==b||"dvt.AfCommandButton"==b||"dvt.AfCommandImageLink"==b||"dvt.AfCommandLink"==b||"dvt.AfGoButton"==b||"dvt.AfGoLink"==b?[b,[a.getId(),
a._props]]:"dvt.AfMarker"==b||"dvt.AfPanelCard"==b?[b,[a]]:null};
dvt.AdfDiagramChangeLinkEvent=function(a,b,c,d){this.Init(dvt.AdfDiagramChangeLinkEvent.TYPE);this._link=a;this._oldEndpoint=b;this._newEndpoint=c;this._endpointType=d};dvt.Obj.createSubclass(dvt.AdfDiagramChangeLinkEvent,dvt.BaseComponentEvent,"dvt.AdfDiagramChangeLinkEvent");dvt.AdfDiagramChangeLinkEvent.TYPE="diagramChangeLinkEvent";dvt.AdfDiagramChangeLinkEvent.prototype.getLink=function(){return this._link};dvt.AdfDiagramChangeLinkEvent.prototype.getOldEndpoint=function(){return this._oldEndpoint};
dvt.AdfDiagramChangeLinkEvent.prototype.getNewEndpoint=function(){return this._newEndpoint};dvt.AdfDiagramChangeLinkEvent.prototype.getEndpointType=function(){return this._endpointType};
dvt.AdfDiagramCreateLinkEvent=function(a,b,c){this.Init(dvt.AdfDiagramCreateLinkEvent.TYPE);this._source=a;this._destination=b;this._paletteId=c};dvt.Obj.createSubclass(dvt.AdfDiagramCreateLinkEvent,dvt.BaseComponentEvent,"dvt.AdfDiagramCreateLinkEvent");dvt.AdfDiagramCreateLinkEvent.TYPE="diagramCreateLinkEvent";dvt.AdfDiagramCreateLinkEvent.prototype.getSource=function(){return this._source};dvt.AdfDiagramCreateLinkEvent.prototype.getDestination=function(){return this._destination};
dvt.AdfDiagramCreateLinkEvent.prototype.getPaletteId=function(){return this._paletteId};
dvt.AdfDiagramCreateNodeEvent=function(a,b,c){this.Init(dvt.AdfDiagramCreateNodeEvent.TYPE);this._paletteId=a;this._parentId=b;this._position=c};dvt.Obj.createSubclass(dvt.AdfDiagramCreateNodeEvent,dvt.BaseComponentEvent,"dvt.AdfDiagramCreateNodeEvent");dvt.AdfDiagramCreateNodeEvent.TYPE="nodeCreate";dvt.AdfDiagramCreateNodeEvent.prototype.getPaletteId=function(){return this._paletteId};dvt.AdfDiagramCreateNodeEvent.prototype.getParentId=function(){return this._parentId};
dvt.AdfDiagramCreateNodeEvent.prototype.getPosition=function(){return this._position};
dvt.AdfDiagramDeleteNodeEvent=function(a){this.Init(dvt.AdfDiagramDeleteNodeEvent.TYPE);this._nodes=a};dvt.Obj.createSubclass(dvt.AdfDiagramDeleteNodeEvent,dvt.BaseComponentEvent,"dvt.AdfDiagramDeleteNodeEvent");dvt.AdfDiagramDeleteNodeEvent.TYPE="diagramNodeDeleteEvent";dvt.AdfDiagramDeleteNodeEvent.prototype.getNodes=function(){return this._nodes};
dvt.AdfDiagramDeleteLinkEvent=function(a){this.Init(dvt.AdfDiagramDeleteLinkEvent.TYPE);this._links=a};dvt.Obj.createSubclass(dvt.AdfDiagramDeleteLinkEvent,dvt.BaseComponentEvent,"dvt.AdfDiagramDeleteLinkEvent");dvt.AdfDiagramDeleteLinkEvent.TYPE="diagramLinkDeleteEvent";dvt.AdfDiagramDeleteLinkEvent.prototype.getLinks=function(){return this._links};
var DvtAdfDiagramEndpointUtils={};dvt.Obj.createSubclass(DvtAdfDiagramEndpointUtils,dvt.Obj,"DvtAdfDiagramEndpointUtils");DvtAdfDiagramEndpointUtils.ENDPOINT_RADIUS=7.5;DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BORDER_STROKE=2;DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BORDER_COLOR_ATTR_ENA="endpointNodeBorderEna";DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BG_COLOR_ATTR_ENA="endpointNodeBgEna";DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BORDER_COLOR_ATTR_DWN="endpointNodeBorderDwn";
DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BG_COLOR_ATTR_DWN="endpointNodeBgDwn";DvtAdfDiagramEndpointUtils.ENDPOINT_LINK_BORDER_STROKE=1;DvtAdfDiagramEndpointUtils.ENDPOINT_LINK_BORDER_COLOR_ATTR="endpointLinkBorder";DvtAdfDiagramEndpointUtils.ENDPOINT_LINK_BG_COLOR_ATTR="endpointLinkBg";
DvtAdfDiagramEndpointUtils.createEndpointShape=function(a,b,c,d){var e=DvtAdfDiagramEndpointUtils.ENDPOINT_RADIUS,f=dvt.Agent.isTouchDevice()?2*DvtAdfDiagramEndpointUtils.ENDPOINT_RADIUS:DvtAdfDiagramEndpointUtils.ENDPOINT_RADIUS,g=f-e;c="linkhandle_"+b+"_"+c;var h=DvtAdfDiagramEndpointUtils.getStrokeWidth(b,d),k=DvtAdfDiagramEndpointUtils.getStrokeColor(b,dvt.Button.STATE_ENABLED,d),l=DvtAdfDiagramEndpointUtils.getStrokeColor(b,dvt.Button.STATE_DOWN,d),m=DvtAdfDiagramEndpointUtils.getFillColor(b,
dvt.Button.STATE_ENABLED,d);d=DvtAdfDiagramEndpointUtils.getFillColor(b,dvt.Button.STATE_DOWN,d);b=DvtAdfDiagramEndpointUtils._createShape(a,e,m,k,h,g);k=DvtAdfDiagramEndpointUtils._createShape(a,e,m,k,h,g);e=DvtAdfDiagramEndpointUtils._createShape(a,e,d,l,h,g);g=new dvt.Container(a);g.addChild(DvtAdfDiagramEndpointUtils._createUnderlay(a,f));g.addChild(b);h=new dvt.Container(a);h.addChild(DvtAdfDiagramEndpointUtils._createUnderlay(a,f));h.addChild(k);l=new dvt.Container(a);l.addChild(DvtAdfDiagramEndpointUtils._createUnderlay(a,
f));l.addChild(e);return new dvt.Button(a,g,h,l,null,c)};DvtAdfDiagramEndpointUtils.getEndpointOffset=function(a){return dvt.Agent.isTouchDevice()?2*DvtAdfDiagramEndpointUtils.ENDPOINT_RADIUS:DvtAdfDiagramEndpointUtils.ENDPOINT_RADIUS};DvtAdfDiagramEndpointUtils._createShape=function(a,b,c,d,e,f){a=new dvt.Circle(a,b,b,b);a.setSolidFill(c);a.setSolidStroke(d,1,e);a.setTranslate(f,f);return a};
DvtAdfDiagramEndpointUtils._createUnderlay=function(a,b){var c=new dvt.Circle(a,b,b,b);c.setInvisibleFill();return c};
DvtAdfDiagramEndpointUtils.getStrokeColor=function(a,b,c){var d=dvt.AdfDiagramNode._HOVER_SHADOW_COLOR;if(!c)return d;if(a==DvtAdfDiagramNodeEndpoint.NODE_TYPE)switch(b){case dvt.Button.STATE_ENABLED:d=c[DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BORDER_COLOR_ATTR_ENA];break;case dvt.Button.STATE_DOWN:d=c[DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BORDER_COLOR_ATTR_DWN];break;default:d=dvt.AdfDiagramNode._HOVER_SHADOW_COLOR}else d=c[DvtAdfDiagramEndpointUtils.ENDPOINT_LINK_BORDER_COLOR_ATTR];return d};
DvtAdfDiagramEndpointUtils.getFillColor=function(a,b,c){if(!c)return"#FFFFFF";if(a==DvtAdfDiagramNodeEndpoint.NODE_TYPE)switch(b){case dvt.Button.STATE_ENABLED:a=c[DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BG_COLOR_ATTR_ENA];break;case dvt.Button.STATE_DOWN:a=c[DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BG_COLOR_ATTR_DWN];break;default:a="#FFFFFF"}else a=c[DvtAdfDiagramEndpointUtils.ENDPOINT_LINK_BG_COLOR_ATTR];return a};
DvtAdfDiagramEndpointUtils.getStrokeWidth=function(a,b){return a==DvtAdfDiagramNodeEndpoint.NODE_TYPE?DvtAdfDiagramEndpointUtils.ENDPOINT_NODE_BORDER_STROKE:DvtAdfDiagramEndpointUtils.ENDPOINT_LINK_BORDER_STROKE};
var DvtAdfDiagramLinkEndpoint=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};dvt.Obj.createSubclass(DvtAdfDiagramLinkEndpoint,dvt.Container,"DvtAdfDiagramLinkEndpoint");DvtAdfDiagramLinkEndpoint.START_TYPE="start";DvtAdfDiagramLinkEndpoint.END_TYPE="end";
DvtAdfDiagramLinkEndpoint.prototype.Init=function(a,b,c,d,e,f){DvtAdfDiagramLinkEndpoint.superclass.Init.call(this,a,null,e+"_"+c+"Hdl");this._link=b;this._type=c;this._shape=DvtAdfDiagramEndpointUtils.createEndpointShape(this.getCtx(),this._type,e,f);this._endpointOffset=DvtAdfDiagramEndpointUtils.getEndpointOffset(f);this.addChild(this._shape);this.setPosition(d);a=this._link.GetDiagram().getEventManager();this._shape.addEvtListener(dvt.MouseEvent.MOUSEDOWN,a.OnMouseDown,!0,a);this._shape.addEvtListener(dvt.MouseEvent.MOUSEUP,
a.OnMouseUp,!0,a);a.associate(this._shape,this)};DvtAdfDiagramLinkEndpoint.prototype.isLinkEndpoint=function(){return!0};DvtAdfDiagramLinkEndpoint.prototype.HandleChangeStart=function(a){this._link.startLinkChange(this._type,a);this.RenderTempLink(a)};DvtAdfDiagramLinkEndpoint.prototype.setPosition=function(a){this._shape.setTranslate(a.x-this._endpointOffset,a.y-this._endpointOffset)};DvtAdfDiagramLinkEndpoint.prototype.RenderTempLink=function(a){this._link.updateLinkChange(this._type,a);this.setMouseEnabled(!1)};
DvtAdfDiagramLinkEndpoint.prototype.HandleChangeMove=function(a){this.RenderTempLink(a)};DvtAdfDiagramLinkEndpoint.prototype.HandleChangeEndNewNode=function(a){this._link.endLinkChangeNewNode(this._type,a);this.setMouseEnabled(!0)};DvtAdfDiagramLinkEndpoint.prototype.HandleChangeEndRestore=function(){this._link.endLinkChangeRestore(this._type);this.setMouseEnabled(!0)};DvtAdfDiagramLinkEndpoint.prototype.isUpdateEnabled=function(){return this._link.isUpdateEnabled()};
DvtAdfDiagramLinkEndpoint.prototype.isSelectable=function(){return this._link.isSelectable()};DvtAdfDiagramLinkEndpoint.prototype.isSelected=function(){return this._link.isSelected()};DvtAdfDiagramLinkEndpoint.prototype.setSelected=function(a){this._link.setSelected(a)};DvtAdfDiagramLinkEndpoint.prototype.getLink=function(){return this._link};
var DvtAdfDiagramNodeEndpoint=function(a,b,c,d){this.Init(a,b,c,d)};dvt.Obj.createSubclass(DvtAdfDiagramNodeEndpoint,dvt.Container,"DvtAdfDiagramNodeEndpoint");DvtAdfDiagramNodeEndpoint.NODE_TYPE="top";
DvtAdfDiagramNodeEndpoint.prototype.Init=function(a,b,c,d){DvtAdfDiagramNodeEndpoint.superclass.Init.call(this,a,null,c+"_"+DvtAdfDiagramNodeEndpoint.NODE_TYPE+"Hdl");this._type=DvtAdfDiagramNodeEndpoint.NODE_TYPE;this._shape=DvtAdfDiagramEndpointUtils.createEndpointShape(this.getCtx(),this._type,c,d);this._endpointOffset=DvtAdfDiagramEndpointUtils.getEndpointOffset(d);this._bHovered=this._bLocked=!1;this.addChild(this._shape);a=b.GetDiagram().getEventManager();this._shape.addEvtListener(dvt.MouseEvent.MOUSEDOWN,
a.OnMouseDown,!0,a);this._shape.addEvtListener(dvt.MouseEvent.MOUSEUP,a.OnMouseUp,!0,a);a.addRolloverType(DvtAdfDiagramNodeEndpoint);a.associate(this,this)};DvtAdfDiagramNodeEndpoint.prototype.setPosition=function(a){this.setTranslate(a.x-this._endpointOffset,a.y-this._endpointOffset)};DvtAdfDiagramNodeEndpoint.prototype.getLayoutBounds=function(){return this.getDimensions()};DvtAdfDiagramNodeEndpoint.prototype.setVisible=function(a){this.isHovered()&&!a||this.isLocked()||this._shape.setVisible(a)};
DvtAdfDiagramNodeEndpoint.prototype.isLocked=function(){return this._bLocked};DvtAdfDiagramNodeEndpoint.prototype.setLocked=function(a){this._bLocked=a};DvtAdfDiagramNodeEndpoint.prototype.isSelectable=function(){return this.getParent().isSelectable()};DvtAdfDiagramNodeEndpoint.prototype.setSelected=function(a){return this.getParent().setSelected(a)};DvtAdfDiagramNodeEndpoint.prototype.isSelected=function(){return this.getParent().isSelected()};
DvtAdfDiagramNodeEndpoint.prototype.hideHoverEffect=function(){this.getParent().hideHoverEffect()};DvtAdfDiagramNodeEndpoint.prototype.showRollOverEffect=function(a){this.setHovered(!0)};DvtAdfDiagramNodeEndpoint.prototype.hideRollOverEffect=function(a){this.setHovered(!1)};DvtAdfDiagramNodeEndpoint.prototype.isHovered=function(){return this._bHovered};DvtAdfDiagramNodeEndpoint.prototype.setHovered=function(a){this._bHovered=a};
dvt.AdfDiagram.prototype.isDragAvailable=function(a,b,c){this._dragAllowed=!1;return this._dragSource.isDragAvailable(c)};dvt.AdfDiagram.prototype.getDragTransferable=function(a,b){return this._dragSource.getDragTransferable(a,b)};dvt.AdfDiagram.prototype.getDragOverFeedback=function(a,b){return this._dragSource.getDragOverFeedback(a,b)};dvt.AdfDiagram.prototype.getDragContext=function(a,b){return this._dragSource.getDragContext(a,b)};
dvt.AdfDiagram.prototype.getDragOffset=function(a,b){return this._dragSource.getDragOffset(a,b)};dvt.AdfDiagram.prototype.getPointerOffset=function(a,b){return this._dragSource.getPointerOffset(a,b)};dvt.AdfDiagram.prototype.initiateDrag=function(){this._dragSource.initiateDrag();dvt.Agent.isPlatformIE()&&10>=dvt.Agent.getVersion()&&this.getPanZoomCanvas().panZoomEnd()};dvt.AdfDiagram.prototype.dragDropEnd=function(){this._dragSource.dragDropEnd()};dvt.AdfDiagram.prototype.recognizeDrag=function(){return this._dragAllowed};
dvt.AdfDiagram.prototype.prepDrag=function(){this._dragAllowed=!0};
dvt.AdfDiagram.prototype.acceptDrag=function(a,b,c,d){return this._dropTarget.acceptDrag(a,b,c,d)};dvt.AdfDiagram.prototype.dragEnter=function(){this._dropTarget.dragEnter()};dvt.AdfDiagram.prototype.dragAccepted=function(){this._dropTarget.dragAccepted()};dvt.AdfDiagram.prototype.dragExit=function(){this._dropTarget.dragExit()};dvt.AdfDiagram.prototype.getDropSite=function(a,b){return this._dropTarget.getDropSite(a,b)};
var DvtAdfDiagramDragSource=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(DvtAdfDiagramDragSource,dvt.DragSource,"DvtAdfDiagramDragSource");DvtAdfDiagramDragSource.prototype.Init=function(a,b){DvtAdfDiagramDragSource.superclass.Init.call(this,a);this._view=b};DvtAdfDiagramDragSource.prototype.isDragAvailable=function(a){(a=DvtAdfDiagramDragSource.superclass.isDragAvailable.call(this,a))&&this._view.setPreventNodeDetailWindow(!0);return a};
DvtAdfDiagramDragSource.prototype.dragDropEnd=function(){DvtAdfDiagramDragSource.superclass.dragDropEnd.call(this);this._view.setPreventNodeDetailWindow(!1);this._view.getPanZoomCanvas().resetTouchTargets();this._view.IsPanningEnabled()&&this._view.getPanZoomCanvas().setPanningEnabled(!0)};
var DvtAdfDiagramDropTarget=function(a){this.Init(a)};dvt.Obj.createSubclass(DvtAdfDiagramDropTarget,dvt.DropTarget,"DvtAdfDiagramDropTarget");DvtAdfDiagramDropTarget._AUTO_PAN_ZONE_SIZE=40;DvtAdfDiagramDropTarget._AUTO_PAN_TIMER_INTERVAL=50;DvtAdfDiagramDropTarget._CHECK_AUTO_PAN_TIMER_INTERVAL=300;
DvtAdfDiagramDropTarget.prototype.Init=function(a){this._view=a;this._autoPanTimer=this._mousePoint=this._centerPoint=null;this._checkAutoPanTimer=new dvt.Timer(this._view.getCtx(),DvtAdfDiagramDropTarget._CHECK_AUTO_PAN_TIMER_INTERVAL,this.CheckAutoPan,this);this._acceptDragMouseY=this._acceptDragMouseX=0};
DvtAdfDiagramDropTarget.prototype.acceptDrag=function(a,b,c,d){var e=this._view.__getNodeUnderPoint(a,b),f=null,f=e?e:null;if(d&&!d(e?e.DropFlavors:this._view.DropFlavors,!f))return null;f!=this._dropSite&&(this._dropSite=f);this._acceptDragMouseX=a;this._acceptDragMouseY=b;return dvt.ArrayUtils.isArray(c)?c[0]:e?c.nodes:c.diagram};DvtAdfDiagramDropTarget.prototype.dragAccepted=function(){this._view.__showDropSiteFeedback(this._dropSite);this._checkAutoPanTimer.isRunning()||this._checkAutoPanTimer.start()};
DvtAdfDiagramDropTarget.prototype.dragEnter=function(){this._view.setPreventNodeDetailWindow(!0)};DvtAdfDiagramDropTarget.prototype.dragExit=function(){this._checkAutoPanTimer.isRunning()&&this._checkAutoPanTimer.stop();this.StopAutoPan();this._view.__removeDropSiteFeedback();this._dropSite=null;this._view.setPreventNodeDetailWindow(!1)};
DvtAdfDiagramDropTarget.prototype.getDropSite=function(a,b){this.StopAutoPan();var c=this._view.__getNodeUnderPoint(a,b);return c?(c=c.getData().getId(),"N"==c.substring(0,1)&&(c=c.substring(1)),{clientRowKey:c}):{}};DvtAdfDiagramDropTarget.prototype.CheckAutoPan=function(){var a=this._view.getWidth(),b=this._view.getHeight(),c=this._acceptDragMouseX,d=this._acceptDragMouseY,e=DvtAdfDiagramDropTarget._AUTO_PAN_ZONE_SIZE;c<e||d<e||c>a-e||d>b-e?this.StartAutoPan(c,d):this.StopAutoPan()};
DvtAdfDiagramDropTarget.prototype.StartAutoPan=function(a,b){this._mousePoint=new dvt.Point(a,b);if(!this._autoPanTimer){var c=this._view.getWidth(),d=this._view.getHeight();this._centerPoint=new dvt.Point(.5*c,.5*d);this._autoPanTimer=new dvt.Timer(this._view.getCtx(),DvtAdfDiagramDropTarget._AUTO_PAN_TIMER_INTERVAL,this.HandleAutoPanTimer,this);this._autoPanTimer.start()}};
DvtAdfDiagramDropTarget.prototype.StopAutoPan=function(){this._centerPoint=this._mousePoint=null;this._autoPanTimer&&(this._autoPanTimer.stop(),this._autoPanTimer=null)};DvtAdfDiagramDropTarget.prototype.HandleAutoPanTimer=function(a){var b=Math.atan2(this._centerPoint.y-this._mousePoint.y,this._centerPoint.x-this._mousePoint.x);a=Math.cos(b);b=Math.sin(b);this._view.getPanZoomCanvas().panBy(15*a,15*b)};
var DvtAdfDiagramEditorManager=function(a,b){this._context=a;this._diagram=b;this._tempLinks=[];this._fakeLinks=[];this._fakeNodes=[];this._dragItems=[]};dvt.Obj.createSubclass(DvtAdfDiagramEditorManager,dvt.Obj,"DvtAdfDiagramEditorManager");
DvtAdfDiagramEditorManager.prototype.processDragStart=function(a,b){var c={},d=!1;a instanceof dvt.AdfDiagramNode&&(d=!0);var e=this.processLinkUpdateStart(a,b),d=d||e;this._diagram.isLinkToolEnabled()&&(e=this.processLinkCreateStart(a,b),d=d||e);this._diagram.isStickyNodeEnabled()&&this.processStickyNodeCreateStart(a,b);c.dragStarted=d;return c};
DvtAdfDiagramEditorManager.prototype.processDragMove=function(a,b){this.processLinkUpdateMove(a,b);this._diagram.isLinkToolEnabled()&&this.processLinkCreateMove(a,b);this._diagram.isStickyNodeEnabled()&&this.processStickyNodeCreateMove(a,b)};DvtAdfDiagramEditorManager.prototype.processDragEnd=function(a,b){var c=[];this.processLinkUpdateEnd(a,b,c);this._diagram.isLinkToolEnabled()&&this.processLinkCreateEnd(a,b,c);var d={};d.events=c;return d};
DvtAdfDiagramEditorManager.prototype.processDragCancel=function(a,b){var c=[];this.processLinkUpdateCancel(a,b,c);this._diagram.isLinkToolEnabled()&&this.processLinkCreateCancel(a,b,c);var d={};d.events=c;return d};DvtAdfDiagramEditorManager.prototype.processNodeCreate=function(a,b){var c=[];this._diagram.isStickyNodeEnabled()&&this.processStickyNodeCreateEnd(a,b,c);var d={};d.events=c;return d};
DvtAdfDiagramEditorManager.prototype.processLinkUpdateStart=function(a,b){if(a&&a.isLinkEndpoint&&a.isLinkEndpoint()&&a.HandleChangeStart&&a.isUpdateEnabled()){var c=a.stageToLocal(b);a.HandleChangeStart(c);this._dragItems.push(a);return!0}return!1};DvtAdfDiagramEditorManager.prototype.processLinkUpdateMove=function(a,b){for(var c=0;c<this._dragItems.length;c++){var d=this._dragItems[c],e=d.stageToLocal(b);d.HandleChangeMove(e)}};
DvtAdfDiagramEditorManager.prototype.processLinkUpdateEnd=function(a,b,c){for(b=0;b<this._dragItems.length;b++){var d=this._dragItems[b];if(a){var e=a;a instanceof DvtAdfDiagramNodeEndpoint&&(e=a.getParent());var f=d.getLink(),g=f.getData(),h=this._diagram.getNodeById(g.getStartId()),k=this._diagram.getNodeById(g.getEndId()),l=null,m=null,n=null;d._type==DvtAdfDiagramLinkEndpoint.START_TYPE?(l=g.getStartId(),g.setStartId(e.getId()),h.removeOutLinkId(g.getId()),e.addOutLinkId(g.getId()),m=g.getStartId(),
n="source"):(l=g.getEndId(),g.setEndId(e.getId()),k.removeInLinkId(g.getId()),e.addInLinkId(g.getId()),m=g.getEndId(),n="destination");e=dvt.AdfDiagramEventManager.GetTempLinkPositionOnNode(a,d);d.HandleChangeEndNewNode(e);c.push(new dvt.AdfDiagramChangeLinkEvent(f.getId(),l,m,n))}else d.HandleChangeEndRestore()}this._dragItems=[]};
DvtAdfDiagramEditorManager.prototype.processLinkUpdateCancel=function(a,b,c){for(a=0;a<this._dragItems.length;a++)this._dragItems[a].HandleChangeEndRestore();this._dragItems=[]};DvtAdfDiagramEditorManager.prototype.processLinkCreateStart=function(a,b){this._linkEndpoint=null;return a instanceof DvtAdfDiagramNodeEndpoint?(a.setLocked&&a.setLocked(!0),this._linkEndpoint=a,!0):!1};
DvtAdfDiagramEditorManager.prototype.showLinkCreateStart=function(a){var b=this._linkEndpoint,c=b.getParent().getId(),d=new DvtAdfDiagramLinkData;d.setId("tempLink"+this._tempLinks.length);d.setStartId(c);c=this._diagram.getCreateLinkData();d.setTemplateId(c.linkDef.getId());var e=new dvt.AdfDiagramLink(this._context,d,this._diagram);e.setLinkDef(this._diagram.GetLinkDef(d.getTemplateId()));e.setMouseEnabled(!1);e.paletteId=this._diagram.moveToDiagramFront(e);b=dvt.AdfDiagramEventManager.GetTempLinkPositionOnNode(b,
e);a?(a=e.stageToLocal(a),e.setPoints([b.x,b.y,a.x,a.y]),e.renderLink()):e.setPoints([b.x,b.y,b.x,b.y]);e.paletteId=c.paletteId;this._tempLinks.push(e)};DvtAdfDiagramEditorManager.prototype.processLinkCreateMove=function(a,b){if(this._linkEndpoint){this.showLinkCreateStart(b);for(var c=0;c<this._tempLinks.length;c++){var d=this._tempLinks[c],e=d.stageToLocal(b),f=d.getPoints();d.setPoints([f[0],f[1],e.x,e.y])}}};
DvtAdfDiagramEditorManager.prototype.processLinkCreateEnd=function(a,b,c){this._linkEndpoint&&this._linkEndpoint.setLocked&&(this._linkEndpoint.setLocked(!1),this._linkEndpoint.hideHoverEffect());this._linkEndpoint=null;this.setLinkCreateWithKeyboard(!1);b=null;a instanceof dvt.AdfDiagramNode?b=a.getId():a instanceof DvtAdfDiagramNodeEndpoint&&(b=a.getParent().getId());for(var d=0;d<this._tempLinks.length;d++){var e=this._tempLinks[d];if(a&&b){var f=e.getData();if(b!=f.getStartId()){var g="fakeLink"+
this._fakeLinks.length;f.setId(g);f.setEndId(b);this._diagram.addLinkData(f);g=this._diagram.getLinkById(g);g.setSelectable(!1);var h=dvt.AdfDiagramEventManager.GetTempLinkPositionOnNode(a,g),k=e.getPoints(),k=new dvt.Point(k[0],k[1]),k=e.localToStage(k),k=g.stageToLocal(k);g.setPoints([k.x,k.y,h.x,h.y]);g.renderLink();this._fakeLinks.push(g);c.push(new dvt.AdfDiagramCreateLinkEvent(f.getStartId(),f.getEndId(),e.paletteId))}}e.getParent().removeChild(e)}this._tempLinks=[]};
DvtAdfDiagramEditorManager.prototype.processLinkCreateCancel=function(a,b,c){this._linkEndpoint&&this._linkEndpoint.setLocked&&(this._linkEndpoint.setLocked(!1),this._linkEndpoint.hideHoverEffect());this._linkEndpoint=null;this.setLinkCreateWithKeyboard(!1);for(a=0;a<this._tempLinks.length;a++)b=this._tempLinks[a],b.getParent().removeChild(b);this._tempLinks=[]};DvtAdfDiagramEditorManager.prototype.processStickyNodeCreateStart=function(a,b,c){this._stickyNodeStarted=!0};
DvtAdfDiagramEditorManager.prototype.processStickyNodeCreateMove=function(a,b,c){this._stickyNodeStarted=!1};
DvtAdfDiagramEditorManager.prototype.createNewNode=function(a,b,c,d){if(b){var e=new dvt.AdfDiagramNodeData,f="fakeNode"+this._fakeNodes.length;e.setTemplateId(b.getId());e.setId(f);e.setHasAnchorListener(!1);this._diagram.addNodeData(e);b=this._diagram.getNodeById(f);b.setSelectable(!1);e=b.stageToLocal(a);f=this._diagram.createAfContext();b.createNodeContents(f);b.renderNode(f);f=b.getLayoutBounds();b.setTranslate(e.x-f.w/2,e.y-f.h/2);this._fakeNodes.push(b)}return dvt.AdfDiagramEventManager.GetCreateNodeEvent(c,
a,d)};DvtAdfDiagramEditorManager.prototype.processStickyNodeCreateEnd=function(a,b,c){if(this._stickyNodeStarted){var d=null;a&&(d=a.getId());a=this._diagram.getCreateNodeData();b=this.createNewNode(b,a.nodeDef,d,a.paletteId);c.push(b);this._stickyNodeStarted=!1}};DvtAdfDiagramEditorManager.prototype.setLinkCreateWithKeyboard=function(a){this._linkCreateWithKeyboard=a};DvtAdfDiagramEditorManager.prototype.getLinkCreateWithKeyboard=function(){return this._linkCreateWithKeyboard};
DvtAdfDiagramEditorManager.prototype.processLinkCreateWithKeyboard=function(a){if(a&&a.getLinkHandle()){a=a.getLinkHandle();var b=a.getLayoutBounds();a=a.localToStage(new dvt.Point(.5*b.w,.5*b.h));this.processLinkCreateMove(null,a)}else this.showLinkCreateStart(null)};
DvtAdfDiagramEditorManager.prototype.processNodeCreateWithKeyboard=function(a){var b=a?a.localToStage(new dvt.Point(0,0)):this._diagram.localToStage(new dvt.Point(0,0));this.processStickyNodeCreateStart(a,b);a=this.processNodeCreate(a,b).events;if(0<a.length)for(b=0;b<a.length;b++)this._diagram.dispatchEvent(a[b])};
dvt.AdfDiagramFetchEvent=function(a,b){this.Init(dvt.AdfDiagramFetchEvent.TYPE);this._subtype=a;this._node=b};dvt.Obj.createSubclass(dvt.AdfDiagramFetchEvent,dvt.BaseComponentEvent,"dvt.AdfDiagramFetchEvent");dvt.AdfDiagramFetchEvent.TYPE="diagramFetchEvent";dvt.AdfDiagramFetchEvent.DISCLOSE="disclose";dvt.AdfDiagramFetchEvent.DRILL="drill";dvt.AdfDiagramFetchEvent.prototype.getNode=function(){return this._node};dvt.AdfDiagramFetchEvent.prototype.getSubtype=function(){return this._subtype};
var DvtAdfDiagramJsonUtils=function(){};dvt.Obj.createSubclass(DvtAdfDiagramJsonUtils,dvt.Obj,"DvtAdfDiagramJsonUtils");DvtAdfDiagramJsonUtils.ELEM_NODE_TEMPLATES="nodeTemplates";DvtAdfDiagramJsonUtils.ELEM_NODE_TEMPLATE_ID="templateId";DvtAdfDiagramJsonUtils.ELEM_NODE_DATA="nodes";DvtAdfDiagramJsonUtils.ELEM_LINK_TEMPLATES="linkTemplates";DvtAdfDiagramJsonUtils.ELEM_LINK_TEMPLATE_ID="linkTemplateId";DvtAdfDiagramJsonUtils.ELEM_LINK_DATA="links";DvtAdfDiagramJsonUtils.ELEM_CUSTOM_ATTRIBUTES="attributes";
DvtAdfDiagramJsonUtils.ATTR_NODE_ID="id";DvtAdfDiagramJsonUtils.ATTR_COMPONENT="component";DvtAdfDiagramJsonUtils.ATTR_CHILDREN="children";DvtAdfDiagramJsonUtils._maps=null;DvtAdfDiagramJsonUtils.prototype.toXml=function(a,b){var c="";a&&b&&(c+=this.StartElement("r"),c+=this.WriteComponent(a,b),c+=this.EndElement("r"));return c};
DvtAdfDiagramJsonUtils.prototype.WriteComponent=function(a,b){var c="";a&&b&&(c="\x3c"+a+this.WriteAttributes(b),c+="\x3e",c+=this.WriteTemplates(b),c+=this.WriteData(a,b),c+=this._writeInternalData(b),c+=this.EndElement(a));return c};
DvtAdfDiagramJsonUtils.prototype.WriteTemplates=function(a){var b,c=dvt.AdfDiagramParser._ELEM_TEMPLATES;b=""+this.StartElement(c);var d=DvtAdfDiagramJsonUtils.ELEM_NODE_TEMPLATES;a[d]&&(b+=this.WriteNodeTemplates(dvt.AdfDiagramParser._ELEM_NODE,a[d]));d=DvtAdfDiagramJsonUtils.ELEM_LINK_TEMPLATES;a[d]&&(b+=this.WriteLinkTemplates(dvt.AdfDiagramParser._ELEM_LINK,a[d]));return b+=this.EndElement(c)};
DvtAdfDiagramJsonUtils.prototype.WriteLinkTemplates=function(a,b){var c="";if(b instanceof Array)for(var d=0;d<b.length;d++)c+=this.StartElement(a,b[d]),c+=this.EndElement(a);return c};DvtAdfDiagramJsonUtils.prototype.WriteNodeTemplates=function(a,b){var c="";if(b instanceof Array)for(var d=0;d<b.length;d++)c+=this.StartElement(a,b[d]),c+=this.WriteFacets(b[d]),c+=this.EndElement(a);return c};
DvtAdfDiagramJsonUtils.prototype.WriteFacets=function(a){for(var b="",c=dvt.AdfDiagramParser._ELEM_F,d="zoom100 zoom75 zoom50 zoom25 background containerBottom containerEnd containerLeft containerRight containerStart containerTop label overlay".split(" "),e=0;e<d.length;e++){var f=d[e],g=a[f];g&&(b+="\x3c"+c,b+=this.WriteAttr("name",f),b+="\x3e",b+=this.WriteFacet(g),b+=this.EndElement(c))}return b};
DvtAdfDiagramJsonUtils.prototype.WriteFacet=function(a){var b="";if(a instanceof Array)for(var c=0;c<a.length;c++)b+=this.WriteAfComponent(a[c]);return b};
DvtAdfDiagramJsonUtils.prototype.WriteAfComponent=function(a){var b="",c=a[DvtAdfDiagramJsonUtils.ATTR_COMPONENT];if(c){c=DvtAdfDiagramJsonUtils._toXMLName(c);b="\x3c"+c+this.WriteAttributes(a,DvtAdfDiagramJsonUtils.ATTR_COMPONENT);b+="\x3e";a=a[DvtAdfDiagramJsonUtils.ATTR_CHILDREN];if(a instanceof Array)for(var d=0;d<a.length;d++)b+=this.WriteAfComponent(a[d]);b+=this.EndElement(c)}return b};
DvtAdfDiagramJsonUtils.prototype.StartElement=function(a,b){var c="";a&&(c="\x3c"+a,b&&(c+=this.WriteAttributes(b)),c+="\x3e");return c};DvtAdfDiagramJsonUtils.prototype.EndElement=function(a){var b="";a&&(b="\x3c/"+a+"\x3e");return b};DvtAdfDiagramJsonUtils.prototype.WriteAttributes=function(a,b){var c="",d;for(d in a){var e=a[d];e instanceof Array||e instanceof Object||d!=b&&(c+=this.WriteAttr(d,e))}return c};
DvtAdfDiagramJsonUtils.prototype.WriteAttr=function(a,b){b=b.replace(/&/g,"\x26amp;");b=b.replace(/</g,"\x26lt;");return(b=b.replace(/>/g,"\x26gt;"))?" "+a+'\x3d"'+b+'"':""};
DvtAdfDiagramJsonUtils.prototype.WriteData=function(a,b){var c,d=dvt.AdfDiagramParser._ELEM_DATA;c=""+this.StartElement(d);c+=this.WriteNodes(a,b,!0);var e=b[DvtAdfDiagramJsonUtils.ELEM_LINK_DATA];e?c+=this.WriteLinks(dvt.AdfDiagramParser._ELEM_LINK_DATA,e):DvtAdfDiagramJsonUtils._isHV(a)&&(c+=this.WriteHvLinks(b,""));return c+=this.EndElement(d)};
DvtAdfDiagramJsonUtils.prototype.WriteNodes=function(a,b,c){var d="";if(b&&(b=b[DvtAdfDiagramJsonUtils.ELEM_NODE_DATA],b instanceof Array))for(var e=0;e<b.length;e++)d+=this.WriteNodeData(a,dvt.AdfDiagramParser._ELEM_NODE_DATA,b[e],e,0==e?b.length.toString():"",c);return d};
DvtAdfDiagramJsonUtils.prototype.WriteNodeData=function(a,b,c,d,e,f){var g="",h=DvtAdfDiagramJsonUtils.ATTR_NODE_ID,g="\x3c"+b+this.WriteAttr(dvt.AdfDiagramParser._ATTR_ID,c[h]),h=DvtAdfDiagramJsonUtils.ELEM_NODE_TEMPLATE_ID;c[h]&&(g+=this.WriteAttr(dvt.AdfDiagramParser._ATTR_TEMPLATE_ID,c[h]));DvtAdfDiagramJsonUtils._isHV(a)?(g+=this.WriteAttr(DvtHvParser._ATTR_ROW_INDEX_IN_PARENT,d.toString()),e&&(g+=this.WriteAttr(DvtHvParser._ATTR_PARENT_CHILD_COUNT,e)),f&&(g+=this.WriteAttr(DvtHvParser._ATTR_ROOT,
DvtHvParser._BOOLEAN_VALUE_TRUE),0==d&&(g+=this.WriteAttr("ni","realRoot")),g+=this.WriteAttr(DvtHvParser._ATTR_SHOW_NAVIGATE_UP,DvtHvParser._BOOLEAN_VALUE_FALSE)),g+=this.WriteAttr(DvtHvParser._ATTR_SHOW_SET_ANCHOR,DvtHvParser._BOOLEAN_VALUE_FALSE)):g+=this.WriteAttr(dvt.AdfDiagramParser._ATTR_ROW_INDEX,d.toString());g+="\x3e";g+=this.WriteELBindings(c);g+=this.EndElement(b);return g+=this.WriteNodes(a,c,!1)};
DvtAdfDiagramJsonUtils.prototype.WriteELBindings=function(a){var b="",c=dvt.AdfDiagramParser._ELEM_EL;if(a=a[DvtAdfDiagramJsonUtils.ELEM_CUSTOM_ATTRIBUTES])b+=this.StartElement(c,a),b+=this.EndElement(c);return b};DvtAdfDiagramJsonUtils.prototype.WriteHvLinks=function(a,b){var c="";if(a){var d=a[DvtAdfDiagramJsonUtils.ELEM_NODE_DATA];if(d instanceof Array)for(var e=0;e<d.length;e++)c+=this.WriteHvLinkData(dvt.AdfDiagramParser._ELEM_LINK_DATA,d[e],b)}return c};
DvtAdfDiagramJsonUtils.prototype.WriteHvLinkData=function(a,b,c){var d="",e=b[DvtAdfDiagramJsonUtils.ATTR_NODE_ID];if(c){var d="\x3c"+a,f=DvtAdfDiagramJsonUtils.ELEM_LINK_TEMPLATE_ID;b[f]&&(d+=this.WriteAttr(dvt.AdfDiagramParser._ATTR_TEMPLATE_ID,b[f]));d+=this.WriteAttr(dvt.AdfDiagramParser._ATTR_CHILD_ID,e);d+=this.WriteAttr(dvt.AdfDiagramParser._ATTR_PARENT_ID,c);d=d+"\x3e"+this.EndElement(a)}return d+=this.WriteHvLinks(b,e)};
DvtAdfDiagramJsonUtils.prototype._writeInternalData=function(a){for(var b="",c=[dvt.AdfDiagramParser._ELEM_RESOURCES,dvt.AdfDiagramParser._ELEM_SELECTORS,dvt.AdfDiagramParser._ELEM_AF_STYLES],d=0;d<c.length;d++){var e=c[d],f=a[e];f&&(b+=this.WriteObject(e,f))}return b};DvtAdfDiagramJsonUtils.prototype.WriteLinks=function(a,b){var c="";if(b instanceof Array)for(var d=0;d<b.length;d++)c+=this.StartElement(a,b[d]),c+=this.WriteELBindings(b[d]),c+=this.EndElement(a);return c};
DvtAdfDiagramJsonUtils.prototype.WriteObject=function(a,b){var c="";a&&b&&(c=c+("\x3c"+a)+this.WriteAttributes(b),c+="\x3e",c+=this.WriteChildObjects(b));return c+=this.EndElement(a)};DvtAdfDiagramJsonUtils.prototype.WriteChildObjects=function(a){var b="",c;for(c in a){var d=a[c];d instanceof Object&&(b+=this.WriteObject(c,d))}return b};DvtAdfDiagramJsonUtils._isHV=function(a){return"hv"==a};
DvtAdfDiagramJsonUtils._toXMLName=function(a){DvtAdfDiagramJsonUtils._maps||(DvtAdfDiagramJsonUtils._maps={button:dvt.AfButton.TAG_NAME,clientBehavior:dvt.AfClientBehavior.TAG_NAME,commandButton:dvt.AfCommandButton.TAG_NAME,commandImageLink:dvt.AfCommandImageLink.TAG_NAME,commandLink:dvt.AfCommandLink.TAG_NAME,commandMenuItem:dvt.AfCommandMenuItem.TAG_NAME,goButton:dvt.AfGoButton.TAG_NAME,goLink:dvt.AfGoLink.TAG_NAME,group:dvt.AfGroup.TAG_NAME,image:dvt.AfImage.TAG_NAME,link:dvt.AfLink.TAG_NAME,marker:dvt.AfMarker.TAG_NAME,
menu:dvt.AfMenu.TAG_NAME,outputFormatted:dvt.AfOutputFormatted.TAG_NAME,outputText:dvt.AfOutputText.TAG_NAME,panelCard:dvt.AfPanelCard.TAG_NAME,panelFormLayout:dvt.AfPanelFormLayout.TAG_NAME,panelGroupLayout:dvt.AfPanelGroupLayout.TAG_NAME,panelLabelAndMessage:dvt.AfPanelLabelAndMessage.TAG_NAME,pointLocation:dvt.AfPointLocation.TAG_NAME,separator:dvt.AfSeparator.TAG_NAME,showDetailItem:dvt.AfShowDetailItem.TAG_NAME,showPopupBehavior:dvt.AfShowPopupBehavior.TAG_NAME,spacer:dvt.AfSpacer.TAG_NAME});
return DvtAdfDiagramJsonUtils._maps[a]};DvtAdfDiagramJsonUtils.isXmlStartChar=function(a){return a.charAt&&a.replace&&"\x3c"==dvt.StringUtils.trim(a).charAt(0)?!0:!1};
window.DvtDiagramPoint=dvt.DiagramPoint;window.DvtDiagramRectangle=dvt.DiagramRectangle;
dvt.exportProperty(dvt,"AdfDiagram",dvt.AdfDiagram);
dvt.Palette=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};dvt.Obj.createSubclass(dvt.Palette,dvt.Container,"dvt.Palette");dvt.Palette.PALETTE_DISCLOSED_KEY="isPaletteDisclosed";dvt.Palette.PALETTE_ACTIVE_LINK_KEY="paletteActiveLinkInfo";dvt.Palette.PALETTE_ACTIVE_SECTIONS_KEY="paletteActiveSectionsInfo";
dvt.Palette.prototype.Init=function(a,b,c,d,e,f,g,h,k){dvt.Palette.superclass.Init.call(this,a);this._paletteHandler=e;this._diagram=f;this._dragSource=g;this._parent=null;this._sectionContent=[];this._bDisclosed=!0;this._activeSections=[];this._styleMap=(new DvtPaletteDefaults).calcOptions(k);this._eventManager=new DvtPaletteEventManager(a,this._paletteHandler,this._diagram,this);dvt.Agent.isTouchDevice()||this._eventManager.setKeyboardHandler(this.CreateKeyboardHandler(this._eventManager));this._eventManager.addListeners(this);
this._eventManager.associate(this,this);this._accordion=new dvt.Accordion(a,b,c,d,this._eventManager,h,this._styleMap);this._accordion.setCollapseAll(!0);this._accordion.setExpandMany(!0);this._accordion.addEvtListener(dvt.ResizeEvent.RESIZE_EVENT,this._handleResize,!1,this)};dvt.Palette.prototype.getDiagram=function(){return this._diagram};dvt.Palette.prototype.getEventManager=function(){return this._eventManager};
dvt.Palette.prototype.setJSON=function(a){if(a&&(this._stickyPaletteData=[],a)){this._bDisclosed="false"==a.disclosed?!1:!0;this.setNoWrap(a.noWrap);var b=this._getMaxWidthValue(a.maxWidth);this._accordion.setMaxWidth(Math.min(b?b:this._styleMap.maxWidth,this._accordion.getMaxWidth()));this._accordion.setMinWidth(Math.min(this._styleMap.minWidth,this._accordion.getMaxWidth()));this._parsePaletteSectionJSON(a.paletteSection);this._parseLinkSectionJSON(a.paletteLinkSection)}};
dvt.Palette.prototype._parsePaletteItemJSON=function(a,b,c){for(var d=0;d<a.length;d++){var e=a[d],f=e.id,g=e.children;c?(e=new DvtPaletteLinkItem(this._context,this,e.typeHint,f,e.label,null,this._styleMap),g=this.getDiagram().GetJsonParser().parseLinkTemplate(g?g[0]:null)):(e=new DvtPaletteStickyItem(this._context,this,e.typeHint,f,e.label,e.dragFlavor,this._styleMap),g=dvt.AfComponentFactory.parseJson(g));this._stampDefs||(this._stampDefs={});this._stampDefs[f]=g;b.addItem(e);this._stickyPaletteData.push(e)}};
dvt.Palette.prototype._parseLinkSectionJSON=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b],d=new DvtPaletteSection(this,c.id,c.label,this._styleMap);d.setDisclosed(c.disclosed);d.setSelectedItemId(c.selected);this._linkSection=d;this._parsePaletteItemJSON(c.paletteItem,d,!0)}};
dvt.Palette.prototype._parsePaletteSectionJSON=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b],d=new DvtPaletteSection(this,c.id,c.label,this._styleMap);d.setDisclosed(c.disclosed);this.addSectionContent(d);this._parsePaletteItemJSON(c.paletteItem,d,!1)}};
dvt.Palette.prototype._handleResize=function(a){this._scrollingContainer&&(this.removeChild(this._scrollingContainer),this._scrollingContainer=new dvt.SimpleScrollableContainer(this.getCtx(),Math.min(this._accordion.getMaxWidth(),a.getWidth()),Math.min(this._accordion.getMaxHeight(),a.getHeight())),this.addChild(this._scrollingContainer),this._scrollingContainer.getScrollingPane().addChild(this._accordion),this._scrollingContainer.prepareContentPane(),this.FireListener(a))};
dvt.Palette.prototype.addSectionContent=function(a){this._sectionContent.push(a)};
dvt.Palette.prototype.render=function(){if(this.getDiagram().isNodeCreateEnabled())for(var a=0;a<this._sectionContent.length;a++){var b=new dvt.Container(this.getCtx()),c=this._sectionContent[a],d=c.getLabel(),e=c.getId(),f=c.isDisclosed();this.addChild(b);c.render(b,this._accordion.getMaxWidth(),this._accordion.getMaxHeight());this.removeChild(b);this._accordion.addSection(d,b,f,!0,e);f&&this._activeSections.push(e)}this._linkSection&&this.getDiagram().isLinkCreateEnabled()&&(b=new dvt.Container(this.getCtx()),
d=this._linkSection.getLabel(),e=this._linkSection.getId(),f=this._linkSection.isDisclosed(),this.addChild(b),this._linkSection.render(b,this._accordion.getMaxWidth(),this._accordion.getMaxHeight()),this.removeChild(b),this._accordion.addSection(d,b,f,!0,e),f&&this._activeSections.push(e));this.addChild(this._accordion);this._accordion.render();a=this._accordion.getDimensionsWithStroke();this._scrollingContainer=new dvt.SimpleScrollableContainer(this.getCtx(),Math.min(this._accordion.getMaxWidth(),
a.w),Math.min(this._accordion.getMaxHeight(),a.h));this.addChild(this._scrollingContainer);this._scrollingContainer.getScrollingPane().addChild(this._accordion);this._scrollingContainer.prepareContentPane();this.getEventManager().setDragSource(this._dragSource);for(a=0;a<this._stickyPaletteData.length;a++)b=this._stickyPaletteData[a],b.AdjustItemDimensions(this._accordion.getMaxSectionWidth()),this.getEventManager().associate(b.getDisplayableContainer(),b);this._linkSection&&(a=this._linkSection.getItems())&&
0<a.length&&(a=this._linkSection.getSelectedItem())&&this.getEventManager().ProcessSelectionEventHelper(a,!1)};dvt.Palette.prototype.isDisclosed=function(){return this._bDisclosed};dvt.Palette.prototype.setNoWrap=function(a){this._noWrap=a};dvt.Palette.prototype.isNoWrap=function(){return"true"==this._noWrap?this._noWrap:"false"};
dvt.Palette.prototype.update=function(a){this._accordion.update(a);var b=this._accordion.getSectionById(a).isActive(),c=-1;this._activeSections&&(c=dvt.ArrayUtils.getIndex(this._activeSections,a));!b&&-1<c?this._activeSections.splice(c,1):b&&0>c&&this._activeSections.push(a);a=dvt.EventFactory.newAdfPropertyChangeEvent(dvt.Palette.PALETTE_ACTIVE_SECTIONS_KEY,this._activeSections.join(dvt.AdfDiagram.ROWKEY_DELIMITER));this._diagram.dispatchEvent(a)};
dvt.Palette.prototype._getMaxWidthValue=function(a){if(!a)return null;a=dvt.StringUtils.trim(a);return dvt.StringUtils.endsWith(a,"%")?(a=dvt.StringUtils.trim(a.replace(/\%$/,"")),isNaN(parseFloat(a))?null:parseFloat(a)/100*this._diagram.getWidth()):dvt.StringUtils.endsWith(a,"px")?this._getMaxWidthValue(a.replace(/px$/,"")):isNaN(parseFloat(a))?null:parseFloat(a)};dvt.Palette.prototype.CreateKeyboardHandler=function(a){return new DvtPaletteKeyboardHandler(a,this)};
dvt.Palette.prototype.getSectionContentById=function(a){var b=null;if(this._linkSection&&this._linkSection.getId()==a)b=this._linkSection;else for(var c=0;c<this._sectionContent.length;c++){var d=this._sectionContent[c];if(d.getId()==a){b=d;break}}return b};dvt.Palette.prototype.getExpandedHeight=function(){return this._accordion.getExpandedHeight()};dvt.Palette.prototype.getSections=function(){return this._accordion.getSections()};
dvt.Palette.prototype.getDimensions=function(a){var b=new dvt.Rectangle(0,0,this._scrollingContainer.getWidth(),this._scrollingContainer.getHeight());return a&&a!==this?this.ConvertCoordSpaceRect(b,a):b};dvt.Palette.prototype.getDimensionsWithStroke=function(a){return this.getDimensions(a)};dvt.Palette.prototype.setInteractionEnabled=function(a){a?this._eventManager.addListeners(this):this._eventManager.removeListeners(this)};
dvt.Palette.prototype.hasLinkSection=function(){return this._linkSection?!0:!1};
var DvtPaletteEventManager=function(a,b,c,d){this.Init(a,b,c);this.setSelectionHandler(new DvtPaletteSelectionHandler);this._palette=d};dvt.Obj.createSubclass(DvtPaletteEventManager,dvt.EventManager,"DvtPaletteEventManager");DvtPaletteEventManager.prototype.OnClick=function(a){a.stopPropagation();var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));DvtPaletteEventManager.superclass.OnClick.call(this,a);b instanceof dvt.AccordionSection&&this._palette.update(b.getId())};
DvtPaletteEventManager.prototype.HandleTouchClickInternal=function(a){a=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));a instanceof dvt.AccordionSection&&this._palette.update(a.getId())};
var DvtPaletteKeyboardHandler=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(DvtPaletteKeyboardHandler,dvt.KeyboardHandler,"DvtPaletteKeyboardHandler");DvtPaletteKeyboardHandler.prototype.Init=function(a,b){DvtPaletteKeyboardHandler.superclass.Init.call(this,a);this._palette=b};
DvtPaletteKeyboardHandler.prototype.processKeyDown=function(a){var b=a.keyCode,c=this._eventManager.getFocus();return b==dvt.KeyboardEvent.TAB?(b=null,dvt.EventManager.consumeEvent(a),c?b=c:(a=this._palette.getSections(),0<a.length&&(b=a[0])),b):b==dvt.KeyboardEvent.ENTER||b==dvt.KeyboardEvent.LEFT_ARROW||b==dvt.KeyboardEvent.RIGHT_ARROW||b==dvt.KeyboardEvent.SPACE?(c&&c instanceof dvt.AccordionSection?(c.isActive()&&b==dvt.KeyboardEvent.LEFT_ARROW||!c.isActive()&&b==dvt.KeyboardEvent.RIGHT_ARROW||
b==dvt.KeyboardEvent.ENTER||b==dvt.KeyboardEvent.SPACE)&&this._palette.update(c.getId()):c&&c instanceof DvtPaletteItem&&c.HandleKeyboardEvent(a),null):b==dvt.KeyboardEvent.N&&a.ctrlKey&&a.altKey?(c&&c instanceof DvtPaletteItem&&(a=this._palette.getDiagram().getEditor())&&this._palette.getDiagram().isStickyNodeEnabled()&&a.processNodeCreateWithKeyboard(null),null):DvtPaletteKeyboardHandler.superclass.processKeyDown.call(this,a)};
DvtPaletteKeyboardHandler.prototype.getNextNavigable=function(a,b){if(b.keyCode!=dvt.KeyboardEvent.DOWN_ARROW&&b.keyCode!=dvt.KeyboardEvent.UP_ARROW)return a;for(var c=null,d=b.keyCode==dvt.KeyboardEvent.DOWN_ARROW?!0:!1,e=-1,f=this._getNavigables(),g=0;g<f.length;g++)if(a==f[g]){e=d?g==f.length-1?-1:g+1:0==g?-1:g-1;break}0<=e&&(c=f[e]);return c};
DvtPaletteKeyboardHandler.prototype._getNavigables=function(){for(var a=[],b=this._palette.getSections(),c=0;c<b.length;c++){var d=b[c];a.push(d);if(d.isActive())for(var d=this._palette.getSectionContentById(d.getId()).getItems()||[],e=0;e<d.length;e++)a.push(d[e])}return a};
var DvtPaletteItem=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};dvt.Obj.createSubclass(DvtPaletteItem,dvt.Obj,"DvtPaletteItem");
DvtPaletteItem.prototype.Init=function(a,b,c,d,e,f,g){this._context=a;this._paletteId=c;this._id=d;this._palette=b;this._paletteStamp=null;this._labelText=e;this._focusRect=this._label=null;this._itemContainer=new dvt.Container(this._context);this.DragFlavor=f&&this._palette.getDiagram().ConvertDataFlavorFunc?this._palette.getDiagram().ConvertDataFlavorFunc("javax.faces.component.UIComponent/"+f):null;this._styleMap=g};
DvtPaletteItem.prototype.layout=function(a){var b=this.getPaletteVisualComponent().getDisplayObj();b.setMouseEnabled(!1);var c=this._styleMap.sectionItem.itemPaddingX,d=this._styleMap.sectionItem.itemPaddingY,e=this._styleMap.sectionItem.labelPaddingX,f=this.getLabelDimensions(),g=this.getShapeDimensions(),h=Math.max(this._styleMap.sectionItem.minHeight,g?g.h:0);dvt.Agent.isRightToLeft(this._context)&&a?(b&&g&&b.setTranslate(a-g.w-c,d),this._label&&f&&this._label.setTranslate(a-(this.GetLabelOffsetX()?
c+this.GetLabelOffsetX()+e+f.w:c+f.w),(h-f.h)/2+d)):(b&&b.setTranslate(c,d),this._label&&f&&this._label.setTranslate(this.GetLabelOffsetX()?c+this.GetLabelOffsetX()+e:c,(h-f.h)/2+d));this._focusRect||(a=this.GetLabelOffsetX()+c+(f?f.w+2*e:c),this._addFocusRect(a,h+2*d));this.addAccessibilityAttributes()};
DvtPaletteItem.prototype.RenderLabel=function(a,b){if(this._labelText){this._label=new dvt.OutputText(this._context,this._labelText);this._label.setCSSStyle(this._styleMap.sectionItem.labelStyle);dvt.TextUtils.fitText(this._label,a-2*this._styleMap.sectionItem.labelPaddingX,b,this._itemContainer);var c=this._label.measureDimensions();this.setLabelDimensions(c)}};
DvtPaletteItem.prototype._addFocusRect=function(a,b){this._focusRect=new dvt.Rect(this._context,0,0,a,b);this._focusRect.setInvisibleFill();this._focusRect.setRx(this._styleMap.sectionItem.borderRadius);this._itemContainer.addChildAt(this._focusRect,0)};
DvtPaletteItem.prototype.RenderShape=function(a,b){var c=this.getPaletteVisualComponent();if(c){var d=new dvt.AfContext(this._context,this._palette.getEventManager());d.setSkinName(this._palette.getDiagram().getSkinName());d.setAvailableWidth(a);d.setAvailableHeight(b);dvt.AfComponentFactory.doLayout(d,c,this._itemContainer);this.setShapeDimensions(c.getBounds())}};DvtPaletteItem.prototype.SetLabelOffsetX=function(a){this._labelOffsetX=a};DvtPaletteItem.prototype.GetLabelOffsetX=function(){return this._labelOffsetX};
DvtPaletteItem.prototype.getDimensions=function(){return dvt.DisplayableUtils.getDimForced(this._context,this._itemContainer)};DvtPaletteItem.prototype.getShapeDimensions=function(){return this._shapeDims};DvtPaletteItem.prototype.setShapeDimensions=function(a){this._shapeDims=a};DvtPaletteItem.prototype.setLabelDimensions=function(a){this._labelDims=a};DvtPaletteItem.prototype.getLabelDimensions=function(){return this._labelDims};DvtPaletteItem.prototype.getDisplayableContainer=function(){return this._itemContainer};
DvtPaletteItem.prototype.getPaletteVisualComponent=function(){};DvtPaletteItem.prototype.getTemplateDef=function(){var a=null;return a=this._palette._stampDefs[this._id]};DvtPaletteItem.prototype.isSelectable=function(){return!0};DvtPaletteItem.prototype.isSelected=function(){return this._selected};DvtPaletteItem.prototype.setSelected=function(a){(this._selected=a)?this._focusRect.setFill(new dvt.SolidFill(this._styleMap.sectionItem.fillColorSelected)):this._focusRect.setInvisibleFill();this.updateAccessibilityAttributes()};
DvtPaletteItem.prototype.AdjustItemDimensions=function(a){dvt.Agent.isRightToLeft(this._context)&&this.layout(a);this._focusRect.setWidth(a)};DvtPaletteItem.prototype.showHoverEffect=function(){this._focusRect&&(this._selected||this._focusRect.setFill(new dvt.SolidFill(this._styleMap.sectionItem.fillColorHover)))};DvtPaletteItem.prototype.hideHoverEffect=function(){this._selected||this._focusRect.setInvisibleFill()};
DvtPaletteItem.prototype.getKeyboardBoundingBox=function(a){var b=this._focusRect.getDimensions();a=this.getDisplayableContainer().localToStage(new dvt.Point(b.x,b.y));b=this.getDisplayableContainer().localToStage(new dvt.Point(b.x+b.w,b.y+b.h));return new dvt.Rectangle(a.x,a.y,b.x-a.x,b.y-a.y)};DvtPaletteItem.prototype.getTargetElem=function(){return this.getDisplayableContainer().getElem()};
DvtPaletteItem.prototype.showKeyboardFocusEffect=function(){this._isShowingKeyboardFocusEffect=!0;this.showHoverEffect();this._context.setActiveElement(this.getDisplayableContainer())};DvtPaletteItem.prototype.hideKeyboardFocusEffect=function(){this._isShowingKeyboardFocusEffect=!1;this.hideHoverEffect()};DvtPaletteItem.prototype.isShowingKeyboardFocusEffect=function(){return this._isShowingKeyboardFocusEffect};
DvtPaletteItem.prototype.getNextNavigable=function(a){return this._palette.getEventManager().getKeyboardHandler().getNextNavigable(this,a)};
DvtPaletteItem.prototype.HandleKeyboardEvent=function(a){var b=a.keyCode;if(b==dvt.KeyboardEvent.ENTER||b==dvt.KeyboardEvent.SPACE){var b=this._palette.getEventManager(),c=this.getDisplayableContainer(),d=c.localToStage(new dvt.Point(0,0));a=dvt.DomEventFactory.generateMouseEventFromKeyboardEvent(a,this._context,dvt.MouseEvent.CLICK,this._context.getStage(),d.x,d.y);a.target=c;b.PreOnClick(a)}};
DvtPaletteItem.prototype.addAccessibilityAttributes=function(){var a=this.getAriaLabel();this.getDisplayableContainer().setAriaRole("group");dvt.Agent.deferAriaCreation()||this.getDisplayableContainer().setAriaProperty("label",a)};DvtPaletteItem.prototype.updateAccessibilityAttributes=function(){if(!dvt.Agent.deferAriaCreation()){var a=this.getAriaLabel();a&&this.getDisplayableContainer().setAriaProperty("label",a)}};
DvtPaletteItem.prototype.getAriaLabel=function(){var a=[];a.push(this._selected?dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"STATE_SELECTED"):dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"STATE_UNSELECTED"));return dvt.Displayable.generateAriaLabel(this._labelText,a)};var DvtPaletteStickyItem=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};dvt.Obj.createSubclass(DvtPaletteStickyItem,DvtPaletteItem,"DvtPaletteStickyItem");
DvtPaletteStickyItem.prototype.getId=function(){var a={};a.paletteId=this._paletteId;a.def=this.getTemplateDef();a.type=DvtPaletteLinkItem.NODE_TYPE;a.id=this._id;return a};DvtPaletteStickyItem.prototype.getPaletteVisualComponent=function(){if(this._paletteStamp)return this._paletteStamp;var a=this.getTemplateDef(),b=new dvt.AfPanelGroupLayout;b.setLayout(dvt.AfPanelGroupLayout.LAYOUT_VERTICAL);b.addChild(a);return this._paletteStamp=b};DvtPaletteStickyItem.prototype.isDragAvailable=function(a){return a[0]};
DvtPaletteStickyItem.prototype.getDragContext=function(a,b){return{id:this._paletteId,template:this.getTemplateDef(),dragFlavor:this.DragFlavor,typeName:this.getTypeName()}};DvtPaletteStickyItem.prototype.getDragTransferable=function(a,b){return[]};DvtPaletteStickyItem.prototype.getDragFeedback=function(a,b){var c=[];this.setSelected(!1);c.push(this.getPaletteVisualComponent().getContentShape());return c};var DvtPaletteLinkItem=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};
dvt.Obj.createSubclass(DvtPaletteLinkItem,DvtPaletteItem,"DvtPaletteLinkItem");DvtPaletteLinkItem.LINK_TYPE="link";DvtPaletteLinkItem.NODE_TYPE="node";DvtPaletteLinkItem.prototype.getId=function(){var a={};a.paletteId=this._paletteId;a.def=this.getTemplateDef();a.type=DvtPaletteLinkItem.LINK_TYPE;a.id=this._id;return a};
DvtPaletteLinkItem.prototype.getPaletteVisualComponent=function(){if(this._paletteStamp)return this._paletteStamp;var a=new DvtAdfDiagramLinkData,b=this.getTemplateDef(),a=new dvt.AdfDiagramLink(this._context,a,this._palette.getDiagram());a.setLinkDef(b);a.setSelectable(!1);a.setPoints([0,0,a.getLinkLength(),0]);b=new DvtAfPaletteLink(a,this._styleMap);a=new dvt.AfPanelGroupLayout;a.setLayout(dvt.AfPanelGroupLayout.LAYOUT_VERTICAL);a.addChild(b);return this._paletteStamp=a};
var DvtAfPaletteLink=function(a,b){this._drawableContent=a;this._styleMap=b;this.Init()};dvt.Obj.createSubclass(DvtAfPaletteLink,dvt.AfComponent,"DvtAfPaletteLink");DvtAfPaletteLink.TAG_NAME="paletteLink";dvt.AfComponentFactory.registerComponent(DvtAfPaletteLink.TAG_NAME,DvtAfPaletteLink);DvtAfPaletteLink.prototype.GetDefaultStyles=function(){return DvtAfPaletteLink._afStyles};DvtAfPaletteLink.prototype.SetDefaultStyles=function(a){DvtAfPaletteLink._afStyles=a};
DvtAfPaletteLink.prototype.createContentShape=function(a){var b=this.getId();b||(b="_PaletteLinkItem"+dvt.AfComponent.genUniqueId());b=new dvt.Container(a,b);this._dvtContext=a;b.addChild(this._drawableContent);return b};
DvtAfPaletteLink.prototype.renderSelfBeforeChildren=function(){this._drawableContent.renderLink();var a=this._drawableContent.getDimensions(),b=new dvt.Rect(this._dvtContext,0,0,a.w+2*this._styleMap.linkItem.paddingX,a.h+2*this._styleMap.linkItem.paddingY);b.setInvisibleFill();this._drawableContent.setTranslate(-a.x+this._styleMap.linkItem.paddingX,-a.y+this._styleMap.linkItem.paddingY);this._drawableContent.getParent().addChildAt(b,0);this._drawableContent._shape._logicalObject=null};
DvtAfPaletteLink.prototype.getBounds=function(){var a=this._drawableContent.getParent().getDimensions();return new dvt.Rectangle(0,0,a.w,a.h)};DvtAfPaletteLink.prototype.getTagName=function(){return DvtAfPaletteLink.TAG_NAME};DvtAfPaletteLink.prototype._hasBgShape=function(){return!1};
var DvtPaletteSection=function(a,b,c,d){this.Init(a,b,c,d)};dvt.Obj.createSubclass(DvtPaletteSection,dvt.Obj,"DvtPaletteSection");DvtPaletteSection.prototype.Init=function(a,b,c,d){this._id=b;this._label=c;this._items=[];this._palette=a;this._bDisclosed=!1;this._context=a.getCtx();this._styleMap=d};DvtPaletteSection.prototype.getId=function(){return this._id};DvtPaletteSection.prototype.getLabel=function(){return this._label};DvtPaletteSection.prototype.addItem=function(a){return this._items.push(a)};
DvtPaletteSection.prototype.getItems=function(){return this._items};DvtPaletteSection.prototype.setDisclosed=function(a){var b=!1;"boolean"===typeof a?b=a:"string"===typeof a&&(b="true"===a.toLowerCase());this._bDisclosed=b};DvtPaletteSection.prototype.isDisclosed=function(){return this._bDisclosed};DvtPaletteSection.prototype.setSelectedItemId=function(a){this._selectedItemId=a};DvtPaletteSection.prototype.getSelectedItemId=function(){return this._selectedItemId};
DvtPaletteSection.prototype.getSelectedItem=function(){var a=this.getItems(),b=this.getSelectedItemId();if(!b&&0<a.length)return a[0];for(var c=0;c<a.length;c++)if(a[c].getId().id===b)return a[c];return null};
DvtPaletteSection.prototype.render=function(a,b,c){var d=0,e=2*this._styleMap.sectionItem.itemPaddingY,f=0;if(0<this._items.length){for(var g=0;g<this._items.length;g++){var h=this._items[g];a.addChild(h.getDisplayableContainer());h.RenderShape(b,c);(h=h.getShapeDimensions())&&d<h.w&&(d=h.w)}for(g=0;g<this._items.length;g++)h=this._items[g],a=Math.max(this._styleMap.sectionItem.minHeight,h.getShapeDimensions()?h.getShapeDimensions().h:0),h.SetLabelOffsetX(d),h.RenderLabel(b-d,a),h.layout(),h.getDisplayableContainer().setTranslate(0,
f),f+=a+e}};
var DvtPaletteSelectionHandler=function(){this.Init()};dvt.Obj.createSubclass(DvtPaletteSelectionHandler,dvt.SelectionHandler,"DvtPaletteSelectionHandler");DvtPaletteSelectionHandler.prototype.Init=function(){this._type=dvt.SelectionHandler.TYPE_SINGLE;DvtPaletteSelectionHandler.superclass.Init.call(this,this._type)};
DvtPaletteSelectionHandler.prototype.processClick=function(a,b){var c=!1;a&&a.isSelectable&&a.isSelectable()?a.isSelected()?a instanceof DvtPaletteStickyItem&&(c=this._clearSelectionExceptLink()):c=this._addToSelectionExceptLink(a,!1):c=this._clearSelectionExceptLink();return c};
DvtPaletteSelectionHandler.prototype._addToSelectionExceptLink=function(a,b){if(a.isSelected())return!1;b||(a instanceof DvtPaletteStickyItem?this._clearSelectionExceptLink():a instanceof DvtPaletteLinkItem&&this._clearSelectionExceptNode());a.setSelected(!0);this._selection.push(a);return!0};
DvtPaletteSelectionHandler.prototype._clearSelectionExceptLink=function(){if(0>=this._selection.length)return!1;for(var a=null,b=0;b<this._selection.length;b++){var c=this._selection[b];c instanceof DvtPaletteLinkItem?a=c:c.setSelected(!1)}this._selection=[];a&&this._selection.push(a);return!0};
DvtPaletteSelectionHandler.prototype._clearSelectionExceptNode=function(){if(0>=this._selection.length)return!1;for(var a=null,b=0;b<this._selection.length;b++){var c=this._selection[b];c instanceof DvtPaletteStickyItem?a=c:c.setSelected(!1)}this._selection=[];a&&this._selection.push(a);return!0};
var DvtPaletteDefaults=function(){this.Init({skyros:DvtPaletteDefaults.VERSION_1,alta:DvtPaletteDefaults.SKIN_ALTA})};dvt.Obj.createSubclass(DvtPaletteDefaults,dvt.BaseComponentDefaults,"DvtPaletteDefaults");
DvtPaletteDefaults.VERSION_1={skin:dvt.CSSStyle.SKIN_ALTA,paddingX:0,paddingY:5,minWidth:150,maxWidth:300,sectionItem:{labelStyle:new dvt.CSSStyle(dvt.BaseComponentDefaults.FONT_FAMILY_ALTA_12+"color:#333333;"),labelPaddingX:10,fillColorSelected:"#CFE8FC",fillColorHover:"#ebeced",borderRadius:2,minHeight:24,itemPaddingX:5,itemPaddingY:5},linkItem:{paddingX:10,paddingY:10}};DvtPaletteDefaults.SKIN_ALTA={};
var DvtScrollbarEvent=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};dvt.Obj.createSubclass(DvtScrollbarEvent,dvt.BaseComponentEvent,"DvtScrollbarEvent");DvtScrollbarEvent.SB_MOVE="scrollbarMove";DvtScrollbarEvent.SB_MOVE_COMPLETE="scrollbarMoveComplete";DvtScrollbarEvent.SB_RESIZE="scrollbarResize";DvtScrollbarEvent.SB_RESIZE_COMPLETE="scrollbarResizeComplete";
DvtScrollbarEvent.prototype.Init=function(a,b,c,d,e,f){DvtScrollbarEvent.superclass.Init.call(this,a);this.type=a;this._sb=b;this._startCoord=c;this._endCoord=d;this._delta=e;this._scaledDelta=f};DvtScrollbarEvent.prototype.getScrollbarId=function(){return this._sb.getUIId()};DvtScrollbarEvent.prototype.getStartCoord=function(){return this._startCoord};DvtScrollbarEvent.prototype.getEndCoord=function(){return this._endCoord};DvtScrollbarEvent.prototype.getMovedDelta=function(){return this._delta};
DvtScrollbarEvent.prototype.getScaledDelta=function(){return this._scaledDelta};DvtScrollbarEvent.prototype.getScrollbar=function(){return this._sb};
var DvtScrollbar=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};dvt.Obj.createSubclass(DvtScrollbar,dvt.Container,"DvtScrollbar");DvtScrollbar.SMALL_SCROLL_AMOUNT=.2;DvtScrollbar.LARGE_SCROLL_AMOUNT=1;DvtScrollbar.MIN_THUMB_SIZE=30;DvtScrollbar.SCROLL_TIMER_DELAY=50;DvtScrollbar.SCROLL_TIMER_INITIAL_DELAY=400;DvtScrollbar.THUMB_TYPE="thumb";DvtScrollbar._TEST_ID_THIS=0;DvtScrollbar._TEST_ID_SCROLL_THUMB=1;DvtScrollbar._TEST_ID_SCROLL_BUTTON_DOWN=2;
DvtScrollbar._TEST_ID_SCROLL_BUTTON_UP=3;DvtScrollbar.BACKGROUND="scrollbarBackground";DvtScrollbar.BORDER_COLOR="scrollbarBorderColor";DvtScrollbar.HANDLE_COLOR="scrollbarHandleColor";DvtScrollbar.HANDLE_ACTIVE_COLOR="scrollbarHandleActiveColor";DvtScrollbar.HANDLE_HOVER_COLOR="scrollbarHandleHoverColor";
DvtScrollbar.prototype.Init=function(a,b,c,d,e,f,g,h,k){DvtScrollbar.superclass.Init.call(this,a);this._isHoriz=f;this._styleMap=h;this._skinName=g;this._clickDiff={};this._clickStartPos={};this._clickEndPos={};this._lastMovePos=-1;this._container=new dvt.Rect(a,b,c,d,e,k);this._container.setPixelHinting(!0);this.addChild(this._container);this._background=new DvtScrollbarBackground(this);this._container.addChild(this._background);this.IsSkinAlta()?this._arrowWidth=0:(this._arrowWidth=DvtScrollbarArrow.WIDTH,
this._isHoriz?(this._arrowDown=new DvtScrollbarArrow(this,DvtScrollbarArrow.ORIENT_LEFT),this._arrowUp=new DvtScrollbarArrow(this,DvtScrollbarArrow.ORIENT_RIGHT)):(this._arrowDown=new DvtScrollbarArrow(this,DvtScrollbarArrow.ORIENT_DOWN),this._arrowUp=new DvtScrollbarArrow(this,DvtScrollbarArrow.ORIENT_UP)),this._container.addChild(this._arrowDown),this._container.addChild(this._arrowUp),this._container.setSolidStroke("black"));this._thumbStartPos=this._thumbStartMin=this._arrowWidth;this._thumbLength=
this._thumbLengthMax=this._isHoriz?d-2*this._arrowWidth:e-2*this._arrowWidth;this._thumb=new DvtScrollbarThumb(this,this.getSkinName());this._container.addChild(this._thumb);this._scrollTimer=new dvt.Timer(a,DvtScrollbar.SCROLL_TIMER_DELAY,this.repeatScroll,this);this._initScrollTimer=new dvt.Timer(a,DvtScrollbar.SCROLL_TIMER_INITIAL_DELAY,this.initRepeatScroll,this);this._bScrolled=!1;this._isLiveScroll=!0};DvtScrollbar.prototype.getStyleMap=function(){return this._styleMap};
DvtScrollbar.prototype.getSkinName=function(){return this._skinName};DvtScrollbar.prototype.IsSkinAlta=function(){return"alta"==this._skinName};DvtScrollbar.prototype.isHorizontal=function(){return this._isHoriz};DvtScrollbar.prototype.getThumbStart=function(){return this._thumbStartPos};DvtScrollbar.prototype.getThumbLength=function(){return this._thumbLength};
DvtScrollbar.prototype.setThumbStartAndLength=function(a,b){var c=0,c=this._isHoriz?(this.getWidth()-2*this._arrowWidth)/this.getWidth():(this.getHeight()-2*this._arrowWidth)/this.getHeight();this._thumbStartPos=this._arrowWidth+Math.round(a*c);this._thumbLength=Math.round(b*c);this._thumb.updateSize()};DvtScrollbar.prototype.getScrollAreaStart=function(){return this._thumbStartMin};DvtScrollbar.prototype.getScrollAreaLength=function(){return this._thumbLengthMax};
DvtScrollbar.prototype.initRepeatScroll=function(){this._initScrollTimer.stop();this._scrollTimer.stop();this._scrollTimer.start()};DvtScrollbar.prototype.repeatScroll=function(){this._arrow&&!this._arrow.isDisabled()&&this.arrowScroll()};
DvtScrollbar.prototype.arrowScroll=function(){var a=DvtScrollbar.SMALL_SCROLL_AMOUNT;this._lastMovePos=this._thumbStartPos;switch(this._arrow.getOrientation()){case DvtScrollbarArrow.ORIENT_RIGHT:case DvtScrollbarArrow.ORIENT_DOWN:this.doScroll(a);break;case DvtScrollbarArrow.ORIENT_LEFT:case DvtScrollbarArrow.ORIENT_UP:this.doScroll(-a)}this._bScrolled=!0;this._fireMoveEvent(!this._isLiveScroll)};
DvtScrollbar.prototype.doScroll=function(a){this.moveTo(this._thumbStartPos+Math.round(this._thumbLength*a))};DvtScrollbar.prototype.moveTo=function(a){a<this._thumbStartMin&&(a=this._thumbStartMin);a+this._thumbLength>this._thumbStartMin+this._thumbLengthMax&&(a=this._thumbStartMin+this._thumbLengthMax-this._thumbLength);this._thumbStartPos=a;this._thumb.updateSize()};
DvtScrollbar.prototype.moveStart=function(a){var b=this._thumbStartPos+this._thumbLength;a<this._thumbStartMin&&(a=this._thumbStartMin);a>b-DvtScrollbar.MIN_THUMB_SIZE&&(a=b-DvtScrollbar.MIN_THUMB_SIZE);this._thumbStartPos=a;this._thumbLength=b-a;this._thumb.updateSize()};
DvtScrollbar.prototype.moveEnd=function(a){a<this._thumbStartPos+DvtScrollbar.MIN_THUMB_SIZE&&(a=this._thumbStartPos+DvtScrollbar.MIN_THUMB_SIZE);a>this._thumbStartMin+this._thumbLengthMax&&(a=this._thumbStartMin+this._thumbLengthMax);this._thumbLength=a-this._thumbStartPos;this._thumb.updateSize()};
DvtScrollbar.prototype.processBackgroundClick=function(a){var b=0;a=this._isHoriz?a.x-this.getX():a.y-this.getY();a<this._thumbStartPos?b=-DvtScrollbar.LARGE_SCROLL_AMOUNT:a>this._thumbStartPos+this._thumbLength&&(b=DvtScrollbar.LARGE_SCROLL_AMOUNT);0!=b&&(this._lastMovePos=this._thumbStartPos,this.doScroll(b),this._isLiveScroll&&this._fireMoveEvent(!1),this._fireMoveEvent(!0))};DvtScrollbar.prototype.processArrowDown=function(a){this._arrow=a;this.arrowScroll();this._initScrollTimer.stop();this._initScrollTimer.start()};
DvtScrollbar.prototype.handleArrowDown=function(a,b){this.processArrowDown(a)};DvtScrollbar.prototype.processArrowUp=function(a){this._clearTimers();this._bScrolled&&this._isLiveScroll&&this._fireMoveEvent(!0);this._bScrolled=!1};DvtScrollbar.prototype._clearTimers=function(){this._initScrollTimer.stop();this._scrollTimer.stop()};DvtScrollbar.prototype.handleArrowUp=function(a,b){this.processArrowUp()};
DvtScrollbar.prototype.processThumbDragStart=function(a){this.isHorizontal()?this._clickDiff[DvtScrollbar.THUMB_TYPE]=a.x:this._clickDiff[DvtScrollbar.THUMB_TYPE]=a.y;this._lastMovePos=this._clickStartPos[DvtScrollbar.THUMB_TYPE]=this._thumbStartPos};
DvtScrollbar.prototype.processThumbDragMove=function(a){a=this.isHorizontal()?this._clickStartPos[DvtScrollbar.THUMB_TYPE]+(a.x-this._clickDiff[DvtScrollbar.THUMB_TYPE]):this._clickStartPos[DvtScrollbar.THUMB_TYPE]+(a.y-this._clickDiff[DvtScrollbar.THUMB_TYPE]);this.moveTo(a);this._fireMoveEvent(!1)};DvtScrollbar.prototype.processThumbDragEnd=function(a){var b=0,b=this.isHorizontal()?this._clickDiff[DvtScrollbar.THUMB_TYPE]-a.x:this._clickDiff[DvtScrollbar.THUMB_TYPE]-a.y;0!=b&&this._fireMoveEvent(!0)};
DvtScrollbar.prototype._fireMoveEvent=function(a){var b;if(a)b=DvtScrollbarEvent.SB_MOVE_COMPLETE;else if(this._isLiveScroll)b=DvtScrollbarEvent.SB_MOVE;else return;var c=this._thumbStartPos-this._thumbStartMin,d=c+this._thumbLength,e,f,g=null;e=this._thumbStartPos-this._lastMovePos;this._lastMovePos=this._thumbStartPos;f=e/this._thumbLengthMax;if(0!=e||a)g=new DvtScrollbarEvent(b,this,c,d,e,f);g&&this.FireListener(g,!1)};
DvtScrollbar.prototype._fireResizeEvent=function(a){var b=this._thumbStartPos-this._thumbStartMin;a=new DvtScrollbarEvent(a?DvtScrollbarEvent.SB_RESIZE_COMPLETE:DvtScrollbarEvent.SB_RESIZE,this,b,b+this._thumbLength);this.FireListener(a,!1)};DvtScrollbar.prototype.move=function(a,b,c){this.moveSliderPercent(a);b&&this._fireMoveEvent(c)};DvtScrollbar.prototype.moveSliderPercent=function(a){-100>a||100<a||this.moveSlider(a/100*this._thumbLengthMax)};
DvtScrollbar.prototype.moveSlider=function(a){this.isHorizontal();this.moveTo(this._thumbStartPos+a)};DvtScrollbar.prototype.processGlobalMouseUp=function(){this._clearTimers()};DvtScrollbar.prototype.getX=function(){return this._container.getX()};DvtScrollbar.prototype.getY=function(){return this._container.getY()};DvtScrollbar.prototype.getWidth=function(){return this._container.getWidth()};DvtScrollbar.prototype.getHeight=function(){return this._container.getHeight()};
DvtScrollbar.prototype.getScrollbarThumb=function(){return this._thumb};DvtScrollbar.prototype.setLogicalThumbStartAndLength=function(a,b){this._thumbStartPos=this._arrowWidth+a;this._thumbLength=b;this._thumb.updateSize()};DvtScrollbar.prototype.getLogicalThumbStart=function(){return this._thumbStartPos-this._arrowWidth};
DvtScrollbar.prototype.destroy=function(){this._container&&(this._thumb&&(this._thumb.destroy(),this._container.removeChild(this._thumb),this._thumb=null),this._arrowDown&&(this._arrowDown.destroy(),this._container.removeChild(this._arrowDown),this._arrowDown=null),this._arrowUp&&(this._arrowUp.destroy(),this._container.removeChild(this._arrowUp),this._arrowUp=null),this._background&&(this._background.destroy(),this._container.removeChild(this._background),this._background=null));DvtScrollbar.superclass.destroy.call(this);
this._container=null};
var DvtScrollbarArrow=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(DvtScrollbarArrow,dvt.Container,"DvtScrollbarArrow");DvtScrollbarArrow.WIDTH=15;DvtScrollbarArrow.ORIENT_RIGHT=0;DvtScrollbarArrow.ORIENT_UP=1;DvtScrollbarArrow.ORIENT_LEFT=2;DvtScrollbarArrow.ORIENT_DOWN=3;DvtScrollbarArrow.ARROW_UP_BORDER="#000000";DvtScrollbarArrow.ARROW_UP_BORDER_ALPHA=0;DvtScrollbarArrow.ARROW_UP_FILL="#000000";DvtScrollbarArrow.BG_UP_FILL_COLORS=["#ffffff","#ffffff"];
DvtScrollbarArrow.BG_UP_FILL_ALPHAS=[0,0];DvtScrollbarArrow.BG_UP_FILL_RATIOS=[0,255];DvtScrollbarArrow.ARROW_OVER_BORDER="#000000";DvtScrollbarArrow.ARROW_OVER_BORDER_ALPHA=0;DvtScrollbarArrow.ARROW_OVER_FILL="#000000";DvtScrollbarArrow.BG_OVER_FILL_COLORS=["#0d8cf9","#4ab5fc"];DvtScrollbarArrow.BG_OVER_FILL_ALPHAS=[1,1];DvtScrollbarArrow.BG_OVER_FILL_RATIOS=[0,255];DvtScrollbarArrow.ARROW_DOWN_BORDER="#4e555e";DvtScrollbarArrow.ARROW_DOWN_BORDER_ALPHA=1;DvtScrollbarArrow.ARROW_DOWN_FILL="#ffffff";
DvtScrollbarArrow.BG_DOWN_FILL_COLORS=["#4e555e","#a7b7d4"];DvtScrollbarArrow.BG_DOWN_FILL_ALPHAS=[1,1];DvtScrollbarArrow.BG_DOWN_FILL_RATIOS=[0,255];
DvtScrollbarArrow.prototype.Init=function(a,b){var c,d,e,f;this._sb=a;this._orientation=b;this._arrow=null;this._disabled=!1;a.isHorizontal()?(b==DvtScrollbarArrow.ORIENT_LEFT?(c=a.getX(),d=a.getY()):b==DvtScrollbarArrow.ORIENT_RIGHT&&(c=a.getX()+a.getWidth()-DvtScrollbarArrow.WIDTH,d=a.getY()),e=DvtScrollbarArrow.WIDTH,f=a.getHeight()):(b==DvtScrollbarArrow.ORIENT_DOWN?(c=a.getX(),d=a.getY()+a.getHeight()-DvtScrollbarArrow.WIDTH):b==DvtScrollbarArrow.ORIENT_UP&&(c=a.getX(),d=a.getY()),e=a.getWidth(),
f=DvtScrollbarArrow.WIDTH);var g=a.getCtx();DvtScrollbarArrow.superclass.Init.call(this,g);this._container=new dvt.Rect(g,c,d,e,f,null);this._arrowUpBorderColor=DvtScrollbarArrow.ARROW_UP_BORDER;this._arBGUpFillColors=DvtScrollbarArrow.BG_UP_FILL_COLORS;this._arrowOverBorderColor=DvtScrollbarArrow.ARROW_OVER_BORDER;this._arBGOverFillColors=DvtScrollbarArrow.BG_OVER_FILL_COLORS;this._arrowDownBorderColor=DvtScrollbarArrow.ARROW_DOWN_BORDER;this._arBGDownFillColors=DvtScrollbarArrow.BG_DOWN_FILL_COLORS;
this._upFill=new dvt.LinearGradientFill(0,this._arBGUpFillColors,DvtScrollbarArrow.BG_UP_FILL_ALPHAS);this._overFill=new dvt.LinearGradientFill(0,this._arBGOverFillColors,DvtScrollbarArrow.BG_OVER_FILL_ALPHAS);this._downFill=new dvt.LinearGradientFill(0,this._arBGDownFillColors,DvtScrollbarArrow.BG_DOWN_FILL_ALPHAS);this._arrowUpFill=new dvt.SolidFill(DvtScrollbarArrow.ARROW_UP_FILL,null);this._arrowOverFill=new dvt.SolidFill(DvtScrollbarArrow.ARROW_OVER_FILL,null);this._arrowDownFill=new dvt.SolidFill(DvtScrollbarArrow.ARROW_DOWN_FILL,
null);this._arrowUpBorder=new dvt.SolidStroke(DvtScrollbarArrow.ARROW_UP_BORDER,null,DvtScrollbarArrow.ARROW_UP_BORDER_ALPHA);this._arrowOverBorder=new dvt.SolidStroke(DvtScrollbarArrow.ARROW_OVER_BORDER,null,DvtScrollbarArrow.ARROW_OVER_BORDER_ALPHA);this._arrowDownBorder=new dvt.SolidStroke(DvtScrollbarArrow.ARROW_DOWN_BORDER,null,DvtScrollbarArrow.ARROW_DOWN_BORDER_ALPHA);this._arrow=this._createArrow();this._container.setPixelHinting(!0);dvt.Agent.isTouchDevice()?(this.addEvtListener(dvt.TouchEvent.TOUCHSTART,
this._touchHandler,!1,this),this.addEvtListener(dvt.TouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.addEvtListener(dvt.TouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.addEvtListener(dvt.MouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.addEvtListener(dvt.MouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.addEvtListener(dvt.MouseEvent.MOUSEDOWN,this._mouseDownHandler,!1,this),this.addEvtListener(dvt.MouseEvent.MOUSEUP,this._mouseUpHandler,!1,this));this._container.addChild(this._arrow);
this.addChild(this._container);this._drawOutState()};DvtScrollbarArrow.prototype.getOrientation=function(){return this._orientation};
DvtScrollbarArrow.prototype._createArrow=function(){var a=this._container.getX()+this._container.getWidth()/2,b=this._container.getY()+this._container.getHeight()/2,c=[];this._orientation==DvtScrollbarArrow.ORIENT_RIGHT?(c.push(a-2,b-3),c.push(a+2,b),c.push(a-2,b+3),c.push(c[0],c[1])):this._orientation==DvtScrollbarArrow.ORIENT_UP?(c.push(a-3,b+2),c.push(a,b-2),c.push(a+3,b+2),c.push(c[0],c[1])):this._orientation==DvtScrollbarArrow.ORIENT_LEFT?(c.push(a+2,b-3),c.push(a-2,b),c.push(a+2,b+3),c.push(c[0],
c[1])):this._orientation==DvtScrollbarArrow.ORIENT_DOWN&&(c.push(a-3,b-2),c.push(a,b+2),c.push(a+3,b-2),c.push(c[0],c[1]));a=new dvt.Polygon(this.getCtx(),c,null);a.setFill(this._arrowUpFill);a.setStroke(this._arrowUpBorder);a.setMouseEnabled(!1);return a};DvtScrollbarArrow.prototype._mouseOverHandler=function(a){this._drawOverState();this._disabled=!1;a&&a.preventDefault()};DvtScrollbarArrow.prototype._mouseOutHandler=function(a){this._drawOutState();this._disabled=!0;a&&a.preventDefault()};
DvtScrollbarArrow.prototype._mouseDownHandler=function(a){this._drawDownState();this._sb.handleArrowDown(this,a);a&&a.preventDefault()};DvtScrollbarArrow.prototype._mouseUpHandler=function(a){this._drawOverState();this._sb.handleArrowUp(this,a);a&&a.preventDefault()};
DvtScrollbarArrow.prototype._touchHandler=function(a){var b=a.type;b==dvt.TouchEvent.TOUCHSTART?!this._dragStarted&&(b=a.targetTouches[0])&&(this._sb.processArrowDown(this),this._dragStarted=!0,this._touchId=b.identifier):b==dvt.TouchEvent.TOUCHMOVE?this._dragStarted&&dvt.TouchManager.getTouchById(this._touchId,a.touches):b==dvt.TouchEvent.TOUCHEND&&this._dragStarted&&(b=dvt.TouchManager.getTouchById(this._touchId,a.changedTouches))&&(this._sb.processArrowUp(this),this._dragStarted=!1,this._touchId=
null);a.blockTouchHold();a.preventDefault()};DvtScrollbarArrow.prototype._drawOutState=function(){this._container.setFill(this._upFill);this._arrow.setStroke(this._arrowUpBorder);this._arrow.setFill(this._arrowUpFill)};DvtScrollbarArrow.prototype._drawOverState=function(){this._container.setFill(this._overFill);this._arrow.setStroke(this._arrowOverBorder);this._arrow.setFill(this._arrowOverFill)};
DvtScrollbarArrow.prototype._drawDownState=function(){this._container.setFill(this._downFill);this._arrow.setStroke(this._arrowDownBorder);this._arrow.setFill(this._arrowDownFill)};DvtScrollbarArrow.prototype.isDisabled=function(){return this._disabled};
DvtScrollbarArrow.prototype.destroy=function(){dvt.Agent.isTouchDevice()?(this.removeEvtListener(dvt.TouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.removeEvtListener(dvt.TouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.removeEvtListener(dvt.TouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.removeEvtListener(dvt.MouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.removeEvtListener(dvt.MouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.removeEvtListener(dvt.MouseEvent.MOUSEDOWN,
this._mouseDownHandler,!1,this),this.removeEvtListener(dvt.MouseEvent.MOUSEUP,this._mouseUpHandler,!1,this));this._container&&this._arrow&&(this._container.removeChild(this._arrow),this._arrow=null);DvtScrollbarArrow.superclass.destroy.call(this);this._container=null};
var DvtScrollbarBackground=function(a){this.Init(a)};dvt.Obj.createSubclass(DvtScrollbarBackground,dvt.Container,"DvtScrollbarBackground");DvtScrollbarBackground.BORDER_COLOR="rgb(206,211,226)";DvtScrollbarBackground.FILL_COLORS=["#fafafb","#e7e9ef"];
DvtScrollbarBackground.prototype.Init=function(a){var b,c,d,e;this._sb=a;b=a.getX();c=a.getY();d=a.getWidth();e=a.getHeight();var f=a.getCtx();DvtScrollbarBackground.superclass.Init.call(this,f);this._container=new dvt.Rect(f,b,c,d,e,null);this.addChild(this._container);var g;b=a.getStyleMap();var h;b&&(c=b[DvtScrollbar.BACKGROUND],h=b[DvtScrollbar.BORDER_COLOR],c?dvt.ColorUtils.isColor(c)&&(g=new dvt.SolidFill(c)):(b=dvt.GradientParser.parseCSSGradient(c))&&(g=new dvt.LinearGradientFill(b.getAngle(),
b.getColors(),b.getAlphas(),b.getRatios())));g||(a=a.isHorizontal()?90:180,g=new dvt.LinearGradientFill(a,DvtScrollbarBackground.FILL_COLORS));this._container.setSolidStroke(h?h:DvtScrollbarBackground.BORDER_COLOR);this._container.setFill(g);this._container.setPixelHinting(!0);dvt.Agent.isTouchDevice()?(this.addEvtListener(dvt.TouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.addEvtListener(dvt.TouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.addEvtListener(dvt.TouchEvent.TOUCHEND,this._touchHandler,
!1,this)):this.addEvtListener(dvt.MouseEvent.CLICK,this._mouseClickHandler,!1,this)};
DvtScrollbarBackground.prototype._touchHandler=function(a){var b=a.type;b==dvt.TouchEvent.TOUCHSTART?!this._backgroundClickStarted&&(b=a.targetTouches[0])&&(this._backgroundClickStarted=!0,this._touchId=b.identifier):b!=dvt.TouchEvent.TOUCHMOVE&&b==dvt.TouchEvent.TOUCHEND&&this._backgroundClickStarted&&(b=dvt.TouchManager.getTouchById(this._touchId,a.changedTouches))&&(b=this.getCtx().pageToStageCoords(b.pageX,b.pageY),b=new dvt.Point(b.x,b.y),this._sb.processBackgroundClick(b),this._backgroundClickStarted=
!1,this._touchId=null);a.blockTouchHold();a.preventDefault()};DvtScrollbarBackground.prototype._mouseClickHandler=function(a){var b=this.getCtx().pageToStageCoords(a._event.pageX,a._event.pageY),b=new dvt.Point(b.x,b.y);this._sb.processBackgroundClick(b);a&&a.preventDefault()};
DvtScrollbarBackground.prototype.destroy=function(){dvt.Agent.isTouchDevice()?(this.removeEvtListener(dvt.TouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.removeEvtListener(dvt.TouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.removeEvtListener(dvt.TouchEvent.TOUCHEND,this._touchHandler,!1,this)):this.removeEvtListener(dvt.MouseEvent.CLICK,this._mouseClickHandler,!1,this);DvtScrollbarBackground.superclass.destroy.call(this);this._container=null};
var DvtScrollbarThumb=function(a,b){this.Init(a,b)};dvt.Obj.createSubclass(DvtScrollbarThumb,dvt.Container,"DvtScrollbarThumb");DvtScrollbarThumb.UP_BORDER_COLOR="#c2cadb";DvtScrollbarThumb.UP_FILL_COLORS=["#ffffff","#e4eef8"];DvtScrollbarThumb.UP_FILL_ALPHAS=[1,1];DvtScrollbarThumb.UP_FILL_RATIOS=[70,255];DvtScrollbarThumb.OVER_BORDER_COLOR="#097bf8";DvtScrollbarThumb.OVER_FILL_COLORS=["#ffffff","#bfdefd"];DvtScrollbarThumb.OVER_FILL_ALPHAS=[1,1];DvtScrollbarThumb.OVER_FILL_RATIOS=[70,255];
DvtScrollbarThumb.DOWN_BORDER_COLOR="#c2cadb";DvtScrollbarThumb.DOWN_FILL_COLORS=["#ffffff","#e4eef8"];DvtScrollbarThumb.DOWN_FILL_ALPHAS=[1,1];DvtScrollbarThumb.DOWN_FILL_RATIOS=[70,255];DvtScrollbarThumb.GRIP_ZONE_COLOR="#b6bbca";
DvtScrollbarThumb.prototype.Init=function(a,b){var c,d,e,f;this._sb=a;this._skinName=b;a.isHorizontal()?(c=a.getX()+a.getThumbStart(),d=a.getY(),e=a.getThumbLength(),f=a.getHeight()):(c=a.getX(),d=a.getY()+a.getHeight()-a.getThumbStart()-a.getThumbLength(),e=a.getWidth(),f=a.getThumbLength());var g=a.getCtx();DvtScrollbarThumb.superclass.Init.call(this,g);this._container=new dvt.Rect(g,c,d,e,f,null);c=this._sb.isHorizontal()?270:0;d=a.getStyleMap();this.IsSkinAlta()&&d?(this._upFill=new dvt.SolidFill(d[DvtScrollbar.HANDLE_COLOR]),
this._overFill=new dvt.SolidFill(d[DvtScrollbar.HANDLE_HOVER_COLOR]),this._downFill=new dvt.SolidFill(d[DvtScrollbar.HANDLE_ACTIVE_COLOR]),this._downStroke=this._overStroke=this._upStroke=null):(this._upFill=new dvt.LinearGradientFill(c,DvtScrollbarThumb.UP_FILL_COLORS,DvtScrollbarThumb.UP_FILL_ALPHAS),this._overFill=new dvt.LinearGradientFill(c,DvtScrollbarThumb.OVER_FILL_COLORS,DvtScrollbarThumb.OVER_FILL_ALPHAS),this._downFill=new dvt.LinearGradientFill(c,DvtScrollbarThumb.DOWN_FILL_COLORS,DvtScrollbarThumb.DOWN_FILL_ALPHAS),
this._upStroke=new dvt.SolidStroke(DvtScrollbarThumb.UP_BORDER_COLOR,null,1),this._overStroke=new dvt.SolidStroke(DvtScrollbarThumb.OVER_BORDER_COLOR,null,1),this._downStroke=new dvt.SolidStroke(DvtScrollbarThumb.DOWN_BORDER_COLOR,null,1),this._grip=this._createGrip(),this._container.addChild(this._grip));dvt.Agent.isTouchDevice()?(this.addEvtListener(dvt.TouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.addEvtListener(dvt.TouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.addEvtListener(dvt.TouchEvent.TOUCHEND,
this._touchHandler,!1,this)):(this.addEvtListener(dvt.MouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.addEvtListener(dvt.MouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this._removeDragListeners=dvt.SvgDocumentUtils.addDragListeners(this,this._mouseDownHandler,this._mouseMoveHandler,this._mouseUpHandler,this));this._container.setPixelHinting(!0);this.addChild(this._container);dvt.Agent.isTouchDevice()?this._drawOverState():this._drawUpState()};
DvtScrollbarThumb.prototype.IsSkinAlta=function(){return"alta"==this._skinName};DvtScrollbarThumb.prototype.immediateTouchAttempted=function(a,b){if(!this.getTouchManager().containsTouchId(b.identifier)){var c=this.getCtx().pageToStageCoords(b.pageX,b.pageY);this.processThumbDragStart(c);this.getTouchManager().saveProcessedTouchDefault(b.identifier,this,this._container,this._sb,"thumb",this);this.drawHighlightState();a.blockTouchHold()}};
DvtScrollbarThumb.prototype.immediateTouchMoved=function(a,b){var c=this.getCtx().pageToStageCoords(b.pageX,b.pageY);this.processThumbDragMove(c);a.preventDefault()};DvtScrollbarThumb.prototype.immediateTouchEnded=function(a,b){this.getTouchManager().containsGrouping(this._sb)||this.drawPlainState();var c=this.getCtx().pageToStageCoords(b.pageX,b.pageY);this.processThumbDragEnd(c)};
DvtScrollbarThumb.prototype._touchHandler=function(a){this.getTouchManager().preEventBubble(a);this.getTouchManager().processAssociatedTouchDefault(a,this);this.getTouchManager().postEventBubble(a)};
DvtScrollbarThumb.prototype.updateSize=function(){var a=this._sb;a.isHorizontal()?(this.setX(a.getX()+a.getThumbStart()),this.setWidth(a.getThumbLength())):(this.setY(a.getY()+a.getThumbStart()),this.setHeight(a.getThumbLength()));null!=this._grip&&-1!=this._container._findChild(this._grip)?(this._container.removeChild(this._grip),this._grip=this._createGrip(),this._container.addChild(this._grip)):this._grip=this._createGrip()};DvtScrollbarThumb.prototype.isHorizontal=function(){return this._sb.isHorizontal()};
DvtScrollbarThumb.prototype._createGrip=function(){var a=this.getX()+this.getWidth()/2,b=this.getY()+this.getHeight()/2,c="";this._sb.isHorizontal()?(c+=dvt.PathUtils.moveTo(a-4.5,b-3),c+=dvt.PathUtils.lineTo(a-4.5,b+3),c+=dvt.PathUtils.moveTo(a-1.5,b-3),c+=dvt.PathUtils.lineTo(a-1.5,b+3),c+=dvt.PathUtils.moveTo(a+1.5,b-3),c+=dvt.PathUtils.lineTo(a+1.5,b+3),c+=dvt.PathUtils.moveTo(a+4.5,b-3),c+=dvt.PathUtils.lineTo(a+4.5,b+3)):(c+=dvt.PathUtils.moveTo(a-3,b-4.5),c+=dvt.PathUtils.lineTo(a+3,b-4.5),
c+=dvt.PathUtils.moveTo(a-3,b-1.5),c+=dvt.PathUtils.lineTo(a+3,b-1.5),c+=dvt.PathUtils.moveTo(a-3,b+1.5),c+=dvt.PathUtils.lineTo(a+3,b+1.5),c+=dvt.PathUtils.moveTo(a-3,b+4.5),c+=dvt.PathUtils.lineTo(a+3,b+4.5));dvt.PathUtils.closePath();a=new dvt.Path(this.getCtx(),c);a.setSolidStroke(DvtScrollbarThumb.GRIP_ZONE_COLOR);a.setMouseEnabled(!1);return a};DvtScrollbarThumb.prototype._mouseOverHandler=function(a){this._drawOverState();a&&a.preventDefault()};
DvtScrollbarThumb.prototype._mouseOutHandler=function(a){this._drawUpState();a&&a.preventDefault()};DvtScrollbarThumb.prototype._mouseDownHandler=function(a){this.removeEvtListener(dvt.MouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this);this.removeEvtListener(dvt.MouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this);a=new dvt.Point(a.pageX,a.pageY);this.processThumbDragStart(a);this._drawDownState();return!0};DvtScrollbarThumb.prototype.processThumbDragStart=function(a){this._sb.processThumbDragStart(a)};
DvtScrollbarThumb.prototype._mouseUpHandler=function(a){var b=new dvt.Point(a.pageX,a.pageY);this.processThumbDragEnd(b);this._drawUpState();this.addEvtListener(dvt.MouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this);this.addEvtListener(dvt.MouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this);a&&a.preventDefault()};DvtScrollbarThumb.prototype.processThumbDragEnd=function(a){this._sb.processThumbDragEnd(a)};
DvtScrollbarThumb.prototype._mouseMoveHandler=function(a){var b=new dvt.Point(a.pageX,a.pageY);this.processThumbDragMove(b);a&&a.preventDefault()};DvtScrollbarThumb.prototype.processThumbDragMove=function(a){this._sb.processThumbDragMove(a)};DvtScrollbarThumb.prototype._drawUpState=function(){this.drawPlainState()};DvtScrollbarThumb.prototype.drawHighlightState=function(){this._overStroke&&this.setStroke(this._overStroke);this.setFill(this._overFill)};
DvtScrollbarThumb.prototype.drawPlainState=function(){this._upStroke&&this.setStroke(this._upStroke);this.setFill(this._upFill)};DvtScrollbarThumb.prototype._drawOverState=function(){dvt.Agent.isTouchDevice()?this.drawPlainState():this.drawHighlightState()};DvtScrollbarThumb.prototype._drawDownState=function(){this._downStroke&&this.setStroke(this._downStroke);this.setFill(this._downFill)};DvtScrollbarThumb.prototype.getX=function(){return this._container.getX()};
DvtScrollbarThumb.prototype.getY=function(){return this._container.getY()};DvtScrollbarThumb.prototype.getWidth=function(){return this._container.getWidth()};DvtScrollbarThumb.prototype.getHeight=function(){return this._container.getHeight()};DvtScrollbarThumb.prototype.setX=function(a){this._container.setX(a)};DvtScrollbarThumb.prototype.setY=function(a){this._container.setY(a)};DvtScrollbarThumb.prototype.setWidth=function(a){this._container.setWidth(a)};DvtScrollbarThumb.prototype.setHeight=function(a){this._container.setHeight(a)};
DvtScrollbarThumb.prototype.setStroke=function(a){this._container.setStroke(a)};DvtScrollbarThumb.prototype.setSolidStroke=function(a,b,c){this._container.setSolidStroke(a,b,c)};DvtScrollbarThumb.prototype.setFill=function(a){this._container.setFill(a)};DvtScrollbarThumb.prototype.setSolidFill=function(a,b){this._container.setSolidFill(a,b)};
DvtScrollbarThumb.prototype.destroy=function(){dvt.Agent.isTouchDevice()?(this.removeEvtListener(dvt.TouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.removeEvtListener(dvt.TouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.removeEvtListener(dvt.TouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.removeEvtListener(dvt.MouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.removeEvtListener(dvt.MouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.removeEvtListener(dvt.MouseEvent.MOUSEDOWN,
this._mouseDownHandler,!1,this),this._removeDragListeners.call(),this.getCtx().getStage().removeEvtListener(dvt.MouseEvent.MOUSEMOVE,this._mouseMoveHandler,!1,this),this.getCtx().getStage().removeEvtListener(dvt.MouseEvent.MOUSEUP,this._mouseUpHandler,!1,this));this._container&&this._grip&&(this._container.removeChild(this._grip),this._grip=null);DvtScrollbarThumb.superclass.destroy.call(this);this._container=null};
DvtScrollbarThumb.prototype.getTouchManager=function(){!this._touchManager&&dvt.Agent.isTouchDevice()&&(this._touchManager=new dvt.TouchManager("_touchManager_sb",this._context));return this._touchManager};
var DvtScrollableContainer=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};dvt.Obj.createSubclass(DvtScrollableContainer,dvt.Container,"DvtScrollableContainer");DvtScrollableContainer.DEFAULT_SCROLLBAR_WIDTH=14;DvtScrollableContainer.DEFAULT_ALTA_SCROLLBAR_WIDTH=11;
DvtScrollableContainer.prototype.Init=function(a,b,c,d,e,f,g){DvtScrollableContainer.superclass.Init.call(this,a);this._scrollbarContentGap=f;this._skinName=g;this.IsSkinAlta()?this._sbWidth=DvtScrollableContainer.DEFAULT_ALTA_SCROLLBAR_WIDTH:this._sbWidth=DvtScrollableContainer.DEFAULT_SCROLLBAR_WIDTH;d?(this._maxW=d,this._maxContentW=d-this._sbWidth-this._scrollbarContentGap):this._maxContentW=this._maxW=Number.MAX_VALUE;e?(this._maxH=e,this._maxContentH=e-this._sbWidth-this._scrollbarContentGap):
this._maxContentH=this._maxH=Number.MAX_VALUE;this._minW=b;this._fullW=0;this._minH=c;this._fullH=0;this._hsb=null;this._hsbStart=this._hsbScale=0;this._vsb=null;this._translateX=this._translateY=this._vsbStart=this._vsbScale=0;this._contentPane=new dvt.Container(a);DvtScrollableContainer.superclass.addChild.call(this,this._contentPane);this._isBiDi=dvt.Agent.isRightToLeft(a)};DvtScrollableContainer.prototype.getSkinName=function(){return this._skinName};
DvtScrollableContainer.prototype.IsSkinAlta=function(){return"alta"==this._skinName};DvtScrollableContainer.prototype.setStyleMap=function(a){this._styleMap=a};DvtScrollableContainer.prototype.addChild=function(a){this._contentPane.addChild(a);this._addScrollEventListener(a);this.refresh()};DvtScrollableContainer.prototype.addChildAt=function(a,b){this._contentPane.addChildAt(a,b);this._addScrollEventListener(a);this.refresh()};
DvtScrollableContainer.prototype.removeChild=function(a){this._removeScrollEventListener(a);this._contentPane.removeChild(a);this.refresh()};DvtScrollableContainer.prototype.removeChildAt=function(a){var b=this._contentPane.getChildAt(a);this._removeScrollEventListener(b);this._contentPane.removeChildAt(a);this.refresh()};DvtScrollableContainer.prototype.getNumChildren=function(){return this._contentPane.getNumChildren()};DvtScrollableContainer.prototype.contains=function(a){return this._contentPane.contains(a)};
DvtScrollableContainer.prototype.getChildAfter=function(a){return this._contentPane.getChildAfter(a)};DvtScrollableContainer.prototype.getChildBefore=function(a){return this._contentPane.getChildBefore(a)};DvtScrollableContainer.prototype.getChildAt=function(a){return this._contentPane.getChildAt(a)};DvtScrollableContainer.prototype.getChildIndex=function(a){return this._contentPane.getChildIndex(a)};
DvtScrollableContainer.prototype.removeChildren=function(){for(var a=this._contentPane.getNumChildren(),b=0;b<a;b++)this._removeScrollEventListener(this._contentPane.getChildAt(b));this._contentPane.removeChildren()};DvtScrollableContainer.prototype.destroy=function(){DvtScrollableContainer.superclass.destroy.call(this);this._contentPane.setClipPath(null);this._contentPane.removeAllDrawEffects(null);this._removeHSB();this._removeVSB()};
DvtScrollableContainer.prototype.getDimensions=function(a){var b=this._getDimensionsForContentPane(!1,this),b=this._getDimensionsWithScrollbar(b);return a&&b?this.ConvertCoordSpaceRect(b,a):b};DvtScrollableContainer.prototype.getDimensionsWithStroke=function(a){var b=this._getDimensionsForContentPane(!0,this),b=this._getDimensionsWithScrollbar(b);return a&&b?this.ConvertCoordSpaceRect(b,a):b};
DvtScrollableContainer.prototype._getDimensionsWithScrollbar=function(a){a&&(this.hasHorizontalScrollbar()&&(a.h=Math.min(this._maxContentH,a.h)+this._scrollbarContentGap+this._sbWidth),this.hasVerticalScrollbar()&&(a.w=Math.min(this._maxContentW,a.w)+this._scrollbarContentGap+this._sbWidth),a.x=0,a.y=0,a.w=Math.min(this._maxW,a.w),a.h=Math.min(this._maxH,a.h));return a};
DvtScrollableContainer.prototype.setVerticalThumbPosition=function(a){this._vsb&&(this._vsbStart=a,this._contentPane.setTranslateY(-a),this._vsb.moveSlider(a-this._vsb.getThumbStart()))};DvtScrollableContainer.prototype.setVerticalContentPosition=function(a){this._vsb&&this._vsb.moveSlider(-((a-this._translateY)/this._vsbScale));this._translateY=a;this._contentPane.setTranslateY(this._translateY)};DvtScrollableContainer.prototype.getVerticalContentPosition=function(){return this._contentPane.getTranslateY()};
DvtScrollableContainer.prototype.getVerticalThumbPosition=function(){return this._vsb.getThumbStart()};DvtScrollableContainer.prototype.hasHorizontalScrollbar=function(){return null!=this._hsb};
DvtScrollableContainer.prototype.refresh=function(){this._removeVSB();this._removeHSB();var a=!1,b=!1,c=this._getDimensionsForContentPane(!1);c?(c.x+c.w>this._maxW&&(b=!0),c.y+c.h>(b?this._maxContentH:this._maxH)&&(a=!0),this._fullH=Math.max(c.y+c.h,this._minH),this._fullW=Math.max(c.x+c.w,this._minW)):(this._fullH=this._minH,this._fullW=this._minW);c=new dvt.ClipPath;a&&b?c.addRect(this._isBiDi?this._scrollbarContentGap+this._sbWidth:0,0,this._maxContentW,this._maxContentH):a?c.addRect(this._isBiDi?
this._scrollbarContentGap+this._sbWidth:0,0,this._maxContentW,this._maxH):b?c.addRect(0,0,this._maxW,this._maxContentH):c=null;this._contentPane.setClipPath(c);a&&this._addVSB(b);b&&this._addHSB(a);this._translateX=this._isBiDi&&a?b?-(this._fullW-this._maxW):this._sbWidth+this._scrollbarContentGap:0;this._contentPane.setTranslateX(this._translateX)};DvtScrollableContainer.prototype.hasVerticalScrollbar=function(){return null!=this._vsb};
DvtScrollableContainer.prototype._removeHSB=function(){this._hsb&&(this._hsb.removeEvtListener(DvtScrollbarEvent.SB_MOVE,this._onHorizontalScroll,!1,this),this._hsb.destroy(),DvtScrollableContainer.superclass.removeChild.call(this,this._hsb),this._hsb=null)};
DvtScrollableContainer.prototype._removeVSB=function(){this._vsb&&(this._vsb.removeEvtListener(DvtScrollbarEvent.SB_MOVE,this._onVerticalScroll,!1,this),this._vsb.destroy(),DvtScrollableContainer.superclass.removeChild.call(this,this._vsb),this._vsb=null)};
DvtScrollableContainer.prototype._addVSB=function(a){if(!this._vsb){var b=a?this._maxH-this._sbWidth:this._maxH;this._vsbLength=b;var c=this._isBiDi?0:a?this._maxW-this._sbWidth:this._fullW+this._scrollbarContentGap,d=this._sbWidth,e=0,f;this.IsSkinAlta()&&!a&&(d+=1,b+=2,--e,f=new dvt.ClipPath("vsb"),f.addRect(c,0,d-1,b-2));this._vsb=new DvtScrollbar(this.getCtx(),c,e,d,b,!1,this.getSkinName(),this._styleMap);f&&this._vsb.setClipPath(f);DvtScrollableContainer.superclass.addChild.call(this,this._vsb)}a=
a?this._maxContentH:this._maxH;c=a/this._fullH*this._vsb.getScrollAreaLength();c=Math.min(this._vsb.getScrollAreaLength(),Math.max(c,DvtScrollbar.MIN_THUMB_SIZE));this._vsbScale=(this._fullH-a)/(this._vsb.getScrollAreaLength()-c);this._vsb.setLogicalThumbStartAndLength(this._vsbStart,c);this._vsb.addEvtListener(DvtScrollbarEvent.SB_MOVE,this._onVerticalScroll,!1,this)};
DvtScrollableContainer.prototype._addHSB=function(a){if(!this._hsb){var b=a?this._maxW-this._sbWidth:this._maxW;this._hsbLength=b;var c=this._isBiDi&&a?this._sbWidth:0,d=a?this._maxH-this._sbWidth:this._fullH+this._scrollbarContentGap,e=this._sbWidth,f;this.IsSkinAlta()&&!a&&(e+=1,b+=2,f=new dvt.ClipPath("hsb"),f.addRect(c,d,b-2,e-1));this._hsb=new DvtScrollbar(this.getCtx(),c,d,b,e,!0,this.getSkinName(),this._styleMap);f&&this._hsb.setClipPath(f);DvtScrollableContainer.superclass.addChild.call(this,
this._hsb)}a=a?this._maxContentW:this._maxW;c=a/this._fullW*this._hsb.getScrollAreaLength();c=Math.min(this._hsb.getScrollAreaLength(),Math.max(c,DvtScrollbar.MIN_THUMB_SIZE));this._hsbScale=(this._fullW-a)/(this._hsb.getScrollAreaLength()-c);this._isBiDi&&(this._hsbStart=this._hsb.getScrollAreaLength()-c);this._hsb.setLogicalThumbStartAndLength(this._hsbStart,c);this._hsb.addEvtListener(DvtScrollbarEvent.SB_MOVE,this._onHorizontalScroll,!1,this)};
DvtScrollableContainer.prototype._onVerticalScroll=function(a){a=a.getMovedDelta();0!=a&&(this._translateY-=a*this._vsbScale,this._contentPane.setTranslateY(this._translateY),this._fireScrollEvent(null,this._vsbLength*this._vsbScale+this._translateY))};DvtScrollableContainer.prototype._onHorizontalScroll=function(a){a=a.getMovedDelta();0!=a&&(this._translateX-=a*this._hsbScale,this._contentPane.setTranslateX(this._translateX),this._fireScrollEvent(this._hsbLength*this._hsbScale+this._translateX,null))};
DvtScrollableContainer.prototype._fireScrollEvent=function(a,b){this.FireListener(new dvt.ScrollEvent(a,b))};DvtScrollableContainer.prototype._getDimensionsForContentPane=function(a,b){for(var c=null,d,e=0;e<this.getNumChildren();e++)(d=this._contentPane.getChildAt(e))&&(d=a?d.getDimensionsWithStroke(this._contentPane):d.getDimensions(this._contentPane))&&(c=null==c?new dvt.Rectangle(d.x,d.y,d.w,d.h):c.getUnion(d));return b&&c?this.ConvertCoordSpaceRect(c,b):c};
DvtScrollableContainer.prototype._addScrollEventListener=function(a){a&&a.getScrollEventCallback&&this.addEvtListener(dvt.ScrollEvent.SCROLL_EVENT,a.getScrollEventCallback(),!1,a)};DvtScrollableContainer.prototype._removeScrollEventListener=function(a){a&&a.getScrollEventCallback&&this.removeEvtListener(dvt.ScrollEvent.SCROLL_EVENT,a.getScrollEventCallback(),!1,a)};
dvt.ItemList=function(a,b,c,d,e,f,g,h){this.Init(a,b,c,d,e,f,g,h)};dvt.Obj.createSubclass(dvt.ItemList,dvt.Container,"dvt.ItemList");dvt.ItemList.INT_MODEL_SINGLE_CLICK=0;dvt.ItemList.INT_MODEL_DOUBLE_CLICK=1;dvt.ItemList._PADDING=1;dvt.ItemList._ITEM_FOCUS_COLOR="#c1e6ff";dvt.ItemList._ALTA_PADDING=10;
dvt.ItemList.prototype.Init=function(a,b,c,d,e,f,g,h){dvt.ItemList.superclass.Init.call(this,a);this._callback=g;this._callbackObj=h;this._items=b;this._minWidth=c?c:0;this._bDropShadow=d?!0:!1;this._backgroundStyleCallback=e;this._backgroundStyleCallbackObj=f;this._hoverIndex=this._focusIndex=-1;this._interactionModel=dvt.ItemList.INT_MODEL_SINGLE_CLICK;this._focusColor=dvt.ItemList._ITEM_FOCUS_COLOR;this._hoverColor=null};dvt.ItemList.prototype.renderComponent=function(){this.RenderSelf()};
dvt.ItemList.prototype.setFocusColor=function(a){this._focusColor=a};dvt.ItemList.prototype.setHoverColor=function(a){this._hoverColor=a};dvt.ItemList.prototype.setAltaSkin=function(a){this._bAltaSkin=a};dvt.ItemList.prototype.IsSkinAlta=function(){return this._bAltaSkin?!0:!1};dvt.ItemList.prototype.setInteractionModel=function(a){this._interactionModel=a};dvt.ItemList.prototype.FireEvent=function(a,b){this._callback&&this._callback.call(this._callbackObj,a,b)};
dvt.ItemList.prototype.FireItemListEvent=function(a,b){var c=new DvtItemListEvent(a,b);this.FireEvent(c)};dvt.ItemList.prototype.HandleClick=function(a){a=a.target;a instanceof dvt.ItemListSprite&&(this._interactionModel==dvt.ItemList.INT_MODEL_SINGLE_CLICK?this.FireItemListEvent(DvtItemListEvent.TYPE_SELECTION,a.getIndex()):this.setFocusIndex(a.getIndex()))};
dvt.ItemList.prototype.HandleDblClick=function(a){a=a.target;a instanceof dvt.ItemListSprite&&this._interactionModel==dvt.ItemList.INT_MODEL_DOUBLE_CLICK&&(this.setFocusIndex(a.getIndex()),this.FireItemListEvent(DvtItemListEvent.TYPE_SELECTION,a.getIndex()))};dvt.ItemList.prototype.isDoubleClickable=function(){return this._interactionModel==dvt.ItemList.INT_MODEL_DOUBLE_CLICK?!0:!1};
dvt.ItemList.prototype.HandleRollOver=function(a){a=a.target;a instanceof dvt.ItemListSprite&&(this._interactionModel==dvt.ItemList.INT_MODEL_SINGLE_CLICK?this.setFocusIndex(a.getIndex()):this.getFocusIndex()!=a.getIndex()&&this.SetHoverIndex(a.getIndex()))};dvt.ItemList.prototype.HandleRollOut=function(a){a=a.target;a instanceof dvt.ItemListSprite&&(this._interactionModel==dvt.ItemList.INT_MODEL_SINGLE_CLICK?this.setFocusIndex(-1):this.getFocusIndex()!=a.getIndex()&&this.SetHoverIndex(-1))};
dvt.ItemList.prototype.HighlightItem=function(a,b,c){var d=a.getDimensions();if(this.IsSkinAlta())var e=d.w+dvt.ItemList._ALTA_PADDING-DvtScrollableContainer.DEFAULT_ALTA_SCROLLBAR_WIDTH,e=0>e?0:e,d=new dvt.Rect(this.getCtx(),-dvt.ItemList._ALTA_PADDING,-dvt.ItemList._ALTA_PADDING,e,d.h+dvt.ItemList._ALTA_PADDING);else d=new dvt.Rect(this.getCtx(),0,0,d.w-1,d.h-1);var f;b?f=new dvt.SolidFill(this._focusColor,1):c&&(f=new dvt.SolidFill(this._hoverColor,1));d.setFill(f);d.setMouseEnabled(!1);a.addChildAt(d,
0)};dvt.ItemList.prototype.UnhighlightItem=function(a){a.removeChildAt(0)};dvt.ItemList.prototype.getNumItems=function(){return this._items?this._items.length:0};dvt.ItemList.prototype.getItemAt=function(a){return this.getChildAt(a+1)};
dvt.ItemList.prototype.SetHoverIndex=function(a){this._hoverColor&&(-1<this._hoverIndex&&this._hoverIndex<this.getNumItems()&&this.UnhighlightItem(this.getItemAt(this._hoverIndex)),this._hoverIndex=a,-1<this._hoverIndex&&this._hoverIndex<this.getNumItems()&&this.HighlightItem(this.getItemAt(this._hoverIndex),!1,!0))};
dvt.ItemList.prototype.setFocusIndex=function(a,b){if(this._focusIndex!=a||b)-1<this._focusIndex&&this._focusIndex<this.getNumItems()&&this.UnhighlightItem(this.getItemAt(this._focusIndex)),this._focusIndex=a,-1<this._focusIndex&&this._focusIndex<this.getNumItems()&&(this._hoverIndex==this._focusIndex&&this.SetHoverIndex(-1),this.HighlightItem(this.getItemAt(this._focusIndex),!0))};dvt.ItemList.prototype.getFocusIndex=function(){return this._focusIndex};
dvt.ItemList.prototype.getFocusItem=function(){return-1<this._focusIndex&&this._focusIndex<this.getNumItems()?this.getChildAt(this._focusIndex):null};dvt.ItemList.prototype.getItem=function(a){return a<this.getNumItems()?this.getChildAt(a):null};dvt.ItemList.prototype.getClosestItemIndex=function(a){for(var b=this.getNumItems(),c=null,d=0;d<b;d++){var c=this.getItem(d),e=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),c);if(a<c.getTranslateY()+e.h)return d}return b-1};
dvt.ItemList.prototype.RenderSelf=function(){var a,b=dvt.ItemList._PADDING,c=dvt.ItemList._PADDING;this.IsSkinAlta()&&(b=c=dvt.ItemList._ALTA_PADDING);for(var d=0;d<this._items.length;d++){a=new dvt.ItemListSprite(this.getCtx(),d,this);this._callbackObj.getEventManager().associate(a,a);a.addChild(this._items[d]);a.setTranslateX(c);a.setTranslateY(a.getTranslateY()+b);var e=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),a),b=b+e.h,b=this.IsSkinAlta()?b+2*dvt.ItemList._ALTA_PADDING:b+dvt.ItemList._PADDING;
this.addChild(a)}e=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this);a=Math.max(e.w,this._minWidth);for(b=0;b<this.getNumChildren();b++)e=this.getChildAt(b),this.RenderItemBackground(e,a),d=this._items[b],dvt.Agent.isRightToLeft(this.getCtx())&&(e=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),d),c=this.IsSkinAlta()?dvt.ItemList._ALTA_PADDING:dvt.ItemList._PADDING,d.setTranslateX(a-e.w-c)),this.IsSkinAlta()&&(e=this.MakeSeparator(a+dvt.ItemList._ALTA_PADDING),d.addChild(e),d=dvt.Agent.isRightToLeft(this.getCtx())?
d.getTranslateX()+dvt.ItemList._ALTA_PADDING:dvt.ItemList._ALTA_PADDING,e.setTranslateX(-d),e.setTranslateY(-dvt.ItemList._ALTA_PADDING));e=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this);c=new dvt.Rect(this.getCtx(),0,0,a+c,e.h+c);this.addChildAt(c,0);this._backgroundStyleCallback?this._backgroundStyleCallback.call(this._backgroundStyleCallbackObj,c):(a=new dvt.SolidStroke("#000000",1,1),e=new dvt.SolidFill("#ffffff"),c.setStroke(a),c.setFill(e))};
dvt.ItemList.prototype.RenderItemBackground=function(a,b){b||0==b||(b=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this).w-dvt.ItemList._PADDING);var c=new dvt.SolidStroke("#000000",0,1);a.setStroke(c);a.setInvisibleFill();a.setWidth(b-dvt.ItemList._PADDING);c=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),a);a.setHeight(c.h)};
dvt.ItemList.prototype.MakeSeparator=function(a){var b=new dvt.Container(this.getCtx());a=new dvt.Path(this.getCtx(),["M",0,0,"L",a,0]);a.setSolidStroke("#D9DFE3");b.addChild(a);return b};dvt.ItemList.prototype.getItemData=function(a){return 0<=a&&a<this._items.length?this._items[a]:null};dvt.ItemListSprite=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(dvt.ItemListSprite,dvt.Rect,"dvt.ItemListSprite");
dvt.ItemListSprite.prototype.Init=function(a,b,c){dvt.ItemListSprite.superclass.Init.call(this,a,0,0,1,1);this._index=b;this._list=c;this.setCursor(dvt.SelectionEffectUtils.getSelectingCursor());this._ariaLabel=this.getTopShortDesc();this.addAccessibilityAttributes()};dvt.ItemListSprite.prototype.getIndex=function(){return this._index};dvt.ItemListSprite.prototype.HandleClick=function(a){this._list.HandleClick(a)};dvt.ItemListSprite.prototype.HandleDblClick=function(a){this._list.HandleDblClick(a)};
dvt.ItemListSprite.prototype.isDoubleClickable=function(){return this._list.isDoubleClickable()};dvt.ItemListSprite.prototype.HandleRollOver=function(a){this._list.HandleRollOver(a)};dvt.ItemListSprite.prototype.HandleRollOut=function(a){this._list.HandleRollOut(a)};dvt.ItemListSprite.prototype.getTooltip=function(){return this.getTopShortDesc()};
dvt.ItemListSprite.prototype.getTopShortDesc=function(){var a=this._list.getItemData(this._index),b=dvt.AfComponentFactory.getAfComponent(a),a=[],c=0;for(b&&a.push(b);c<a.length;){var b=a[c++],d=b.getShortDesc();if(d)return d;for(d=0;d<b.getNumChildren();d++)a.push(b.getChildAt(d))}return null};dvt.ItemListSprite.prototype.getAriaLabel=function(){return this._ariaLabel};
dvt.ItemListSprite.prototype.addAccessibilityAttributes=function(){this.setAriaRole("group");if(!dvt.Agent.deferAriaCreation()){var a=this.getAriaLabel();a&&this.setAriaProperty("label",a)}};
var DvtItemListEvent=function(a,b){this.Init(a);this._index=b};dvt.Obj.createSubclass(DvtItemListEvent,dvt.BaseComponentEvent,"DvtItemListEvent");DvtItemListEvent.TYPE_FOCUS="dvtItemListFocus";DvtItemListEvent.TYPE_SELECTION="dvtItemListSelection";DvtItemListEvent.prototype.getIndex=function(){return this._index};
dvt.SearchEvent=function(a){this.Init(a)};dvt.Obj.createSubclass(dvt.SearchEvent,dvt.BaseComponentEvent,"dvt.SearchEvent");dvt.SearchEvent.SEARCH_EVENT="dvt.SearchEvent";dvt.SearchEvent.SEARCH_EXPAND_EVENT="dvtSearchExpandEvent";dvt.SearchEvent.SEARCH_COLLAPSE_EVENT="dvtSearchCollapseEvent";dvt.SearchEvent.SEARCH_RESULTS_CLEAR_EVENT="dvtSearchResultsClearEvent";dvt.SearchEvent.SEARCH_RESULTS_FETCH_EVENT="dvtSearchResultsFetchEvent";dvt.SearchEvent.SEARCH_RESULTS_SCROLL_EVENT="dvtSearchResultsScrollEvent";
dvt.SearchEvent.SEARCH_RESULTS_SELECTED_EVENT="dvtSearchResultSelectedEvent";dvt.SearchEvent.PARAM_CLIENT_ROW_KEY="clientRowKey";dvt.SearchEvent.PARAM_DIRECTION="direction";dvt.SearchEvent.PARAM_FIRST_VIS_CLIENT_ROW_KEY="firstVisClientRowKey";dvt.SearchEvent.PARAM_FIRST_VIS_INDEX="firstVisIndex";dvt.SearchEvent.PARAM_INDEX="index";dvt.SearchEvent.PARAM_LAST_VIS_CLIENT_ROW_KEY="lastVisClientRowKey";dvt.SearchEvent.PARAM_LAST_VIS_INDEX="lastVisIndex";dvt.SearchEvent.PARAM_SELECTED_CLIENT_ROW_KEY="selectedClientRowKey";
dvt.SearchEvent.PARAM_SELECTED_INDEX="selectedIndex";dvt.SearchEvent.PARAM_TEXT="text";dvt.SearchEvent.DIR_NEXT=0;
dvt.SearchPanel=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(dvt.SearchPanel,dvt.Container,"dvt.SearchPanel");dvt.SearchPanel._BACKGROUND_ALPHA=.2;dvt.SearchPanel._BACKGROUND_ALPHA_DE_EMPHASIZED=.2;dvt.SearchPanel._BACKGROUND_ALPHA_ROLLOVER=.6;dvt.SearchPanel._BACKGROUND_COLOR="#ffffff";dvt.SearchPanel._BORDER_ALPHA=1;dvt.SearchPanel._BORDER_ALPHA_DE_EMPHASIZED=.3;dvt.SearchPanel._BORDER_COLOR="#ffffff";dvt.SearchPanel._BORDER_THICKNESS=1;dvt.SearchPanel._BORDER_RADIUS=6;
dvt.SearchPanel._GO_BUTTON_WIDTH=18;dvt.SearchPanel._GO_BUTTON_HEIGHT=17;dvt.SearchPanel.BUTTONWIDTH=10;dvt.SearchPanel.BUTTONHEIGHT=26;dvt.SearchPanel._ALTA_CONTENT_PADDING=10;dvt.SearchPanel._ALTA_BUTTON_RADIUS=2;dvt.SearchPanel._ROUND_RECT_ELLIPSE=4;dvt.SearchPanel._TEXT_BACKGROUND_ALPHA=.9;dvt.SearchPanel._TEXT_BACKGROUND_ALPHA_ROLLOVER=.9;dvt.SearchPanel._TEXT_BACKGROUND_COLOR="#ffffff";dvt.SearchPanel._TEXT_COLOR="#2d3039";dvt.SearchPanel.ELEM_SEARCH_ADVANCED_TEMPLATE="saTm";
dvt.SearchPanel.ELEM_SEARCH_RESULTS_DATA="srd";dvt.SearchPanel.ELEM_SEARCH_RESULTS_TEMPLATE="srTm";dvt.SearchPanel._ELEM_EL="el";dvt.SearchPanel._ELEM_F="f";dvt.SearchPanel._ELEM_NODE="n";dvt.SearchPanel._ELEM_NODE_DATA="nd";dvt.SearchPanel._ATTR_AF_NAME="name";dvt.SearchPanel._ATTR_EMPTY_TEXT="emptyText";dvt.SearchPanel._ATTR_HEIGHT="height";dvt.SearchPanel._ATTR_ID="id";dvt.SearchPanel._ATTR_INITIAL_BEHAVIOR="initialBehavior";dvt.SearchPanel._ATTR_SEARCH_RESULTS_FIRST_VISIBLE="searchResultsFirstVisible";
dvt.SearchPanel._ATTR_SEARCH_RESULTS_LAST_VISIBLE="searchResultsLastVisible";dvt.SearchPanel._ATTR_SEARCH_RESULTS_SELECTED="searchResultsSelected";dvt.SearchPanel._ATTR_SEARCH_TEXT="searchText";dvt.SearchPanel._ATTR_TOTAL="total";dvt.SearchPanel._ATTR_WIDTH="width";dvt.SearchPanel.STATE_COLLAPSED=0;dvt.SearchPanel.STATE_EXPANDED=1;dvt.SearchPanel.STATE_EMBEDDED=2;dvt.SearchPanel._EXPAND_BUTTON_WIDTH=10;dvt.SearchPanel._TEXT_FIELD_HEIGHT=20;dvt.SearchPanel.HEIGHT=dvt.ControlPanelLAFUtils.VIEW_PANEL_HALF_HEIGHT;
dvt.SearchPanel.prototype.Init=function(a,b,c){dvt.SearchPanel.superclass.Init.call(this,a);this._eventManager=new DvtSearchPanelEventManager(a,b,c);this._eventManager.addListeners(this);this._eventManager.addRolloverType(dvt.SearchPanel);this._eventManager.addRolloverType(dvt.ItemListSprite);this._eventManager.associate(this,this);this._callback=b;this._callbackObj=c;this._textFieldContainer=this._background=this._frame=this._goButton=this._textField=null;this._defaultText="Search";this._advancedComponent=
this._advancedTemplate=this._resultsTemplate=this._imageURIs=null;this._text=this._defaultText;this._collapsedSprite=this._expandedSprite=null;this._searchResultsTotal=-1;this._arSearchResultsNodeData=this._searchResultsSelected=this._searchResultsLastVisible=this._searchResultsFirstVisible=this._searchText=null;this._bShowSearchResults=!1;this._resultsMaxHeight=this._resultsMaxWidth=-1;this._resultsTitleResource="Results";this._bTextFieldUsed=!1;this._searchResultsEmptyText=this._searchResultsPanel=
null;this._initialBehavior=dvt.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_HIDDEN;this._expandButton=this._collapseButton=null;this._origHeight=this._origWidth=0;this._placeholderRect=null;this._state=dvt.SearchPanel.STATE_EXPANDED;this._bStageFocusChangeListenersAdded=this._bFocus=!1;this._textFieldProxyObj=null;this._goTooltip="Search";this._expandTooltip="Show Search (Ctrl+F)";this._collapseTooltip="Hide Search (Esc)";this._resultsCloseTooltip="Close";this._skinName=null;this._textFieldHeight=dvt.SearchPanel._TEXT_FIELD_HEIGHT;
this._textBgColor=dvt.SearchPanel._TEXT_BACKGROUND_COLOR;this._textBgAlpha=dvt.SearchPanel._TEXT_BACKGROUND_ALPHA;this._textBgAlphaRollover=dvt.SearchPanel._TEXT_BACKGROUND_ALPHA_ROLLOVER;this._textCornerRadius=dvt.SearchPanel._ROUND_RECT_ELLIPSE;this._textBorderColor=null;this._goButtonWidth=dvt.SearchPanel._GO_BUTTON_WIDTH;this._goButtonHeight=dvt.SearchPanel._GO_BUTTON_HEIGHT;this._styleMap=null;c&&(this._styleMap=c.getSubcomponentStyles());this._bgAlpha=dvt.StyleUtils.getStyle(this._styleMap,
dvt.ControlPanel.BG_ALPHA,dvt.SearchPanel._BACKGROUND_ALPHA);this._borderColor=dvt.StyleUtils.getStyle(this._styleMap,dvt.CSSStyle.BORDER_COLOR,dvt.SearchPanel._BORDER_COLOR);this._borderRadius=parseInt(dvt.StyleUtils.getStyle(this._styleMap,dvt.CSSStyle.BORDER_RADIUS,dvt.SearchPanel._BORDER_RADIUS));this._bgColor=dvt.StyleUtils.getStyle(this._styleMap,dvt.CSSStyle.BACKGROUND_COLOR,dvt.SearchPanel._BACKGROUND_COLOR)};dvt.SearchPanel.prototype.getStyleMap=function(){return this._styleMap};
dvt.SearchPanel.prototype.renderComponent=function(a,b){for(var c=this.getNumChildren()-1;0<=c;c--)this.removeChild(this.getChildAt(c));this._searchResultsPanel&&this._searchResultsPanel.destroy&&this._searchResultsPanel.destroy();a&&(this._defaultText=a);c=!1;this._textField&&null!=this._textField.getText()&&""!=this._textField.getText()?(this._text=this._textField.getText(),this._textField.destroy()):(this._text=this._defaultText,this.IsSkinAlta()&&(c=!0));this._advancedComponent=this._textFieldContainer=
this._background=this._frame=this._goButton=this._textField=this._collapsedSprite=this._expandedSprite=this._expandButton=this._collapseButton=this._searchResultsPanel=null;this._imageURIs=b;this.addEvtListener(dvt.MouseEvent.MOUSEWHEEL,dvt.EventManager.consumeEvent,!1);this._origWidth||this._origHeight?this._state==dvt.SearchPanel.STATE_COLLAPSED?this.addChild(this.RenderSelfCollapsed()):this.addChild(this.RenderSelfExpanded()):(this.addChild(this.RenderSelfExpanded()),this._origWidth=this._background.getWidth(),
this._origHeight=this._background.getHeight(),this._state==dvt.SearchPanel.STATE_COLLAPSED&&this._doCollapse(!0));c&&(this._text="",this._textField.setText(this._text));this._state!=dvt.SearchPanel.STATE_COLLAPSED&&this._bShowSearchResults&&this.DisplaySearchResults()};dvt.SearchPanel.prototype.setText=function(a){this._text=a;this._textField&&this._textField.setText(this._text);this._bTextFieldUsed=!0};
dvt.SearchPanel.prototype.setInitialBehavior=function(a){this._initialBehavior=a;this._origWidth||this._origHeight||a!=dvt.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_COLLAPSED||(this._state=dvt.SearchPanel.STATE_COLLAPSED)};dvt.SearchPanel.prototype.getInitialBehavior=function(){return this._initialBehavior};dvt.SearchPanel.prototype.setSearchResultsEmptyText=function(a){this._searchResultsEmptyText=a};dvt.SearchPanel.prototype.getSearchResultsEmptyText=function(){return this._searchResultsEmptyText};
dvt.SearchPanel.prototype.getSearchText=function(){return this._searchText};dvt.SearchPanel.prototype.getSearchResultsTotal=function(){return this._searchResultsTotal};dvt.SearchPanel.prototype.isDisclosed=function(){return this.getDiagram().isSearchPanelDisclosed()};dvt.SearchPanel.prototype.setGoTooltip=function(a){this._goTooltip=a};dvt.SearchPanel.prototype.setExpandTooltip=function(a){this._expandTooltip=a};dvt.SearchPanel.prototype.setCollapseTooltip=function(a){this._collapseTooltip=a};
dvt.SearchPanel.prototype.setResultsCloseTooltip=function(a){this._resultsCloseTooltip=a};dvt.SearchPanel.prototype.setResultsMaxWidth=function(a){this._resultsMaxWidth=a};dvt.SearchPanel.prototype.setResultsMaxHeight=function(a){this._resultsMaxHeight=a};dvt.SearchPanel.prototype.setResultsTitleResource=function(a){this._resultsTitleResource=a};dvt.SearchPanel.prototype.setState=function(a){this._state!=a&&(this._origWidth&&this._origHeight&&this.toggleExpandCollapse(),this._state=a)};
dvt.SearchPanel.prototype.getState=function(){return this._state};dvt.SearchPanel.prototype.IsEmbedded=function(){return this._state==dvt.SearchPanel.STATE_EMBEDDED};dvt.SearchPanel.prototype.toggleExpandCollapse=function(a){this._state==dvt.SearchPanel.STATE_EXPANDED?this._doCollapse():this._state==dvt.SearchPanel.STATE_COLLAPSED&&this._doExpand(a)};dvt.SearchPanel.prototype.getWidth=function(){return this._origWidth};dvt.SearchPanel.prototype.getHeight=function(){return this._origHeight};
dvt.SearchPanel.prototype.setButtonStyle=function(a){this._buttonStyle=a};dvt.SearchPanel.prototype.getButtonStyle=function(){return this._buttonStyle};dvt.SearchPanel.prototype.setLabelStyle=function(a){this._labelStyle=a};dvt.SearchPanel.prototype.getLabelStyle=function(){return this._labelStyle};dvt.SearchPanel.prototype.getGoButton=function(){return this._goButton};dvt.SearchPanel.prototype.getTextField=function(){return this._textField};dvt.SearchPanel.prototype.getSearchResultsPanel=function(){return this._searchResultsPanel};
dvt.SearchPanel.prototype.getAfComponentRoot=function(){return dvt.AfComponentFactory.getAfComponent(this._advancedComponent)};dvt.SearchPanel.prototype.getAfComponent=function(a){var b=this.getAfComponentRoot();return dvt.AfComponentFactory.findAfComponent(b,a)};
dvt.SearchPanel.prototype.destroy=function(){this.removeEvtListener(dvt.MouseEvent.MOUSEWHEEL,dvt.EventManager.consumeEvent,!1);this.removeEvtListener(dvt.KeyboardEvent.KEYDOWN,this.HandleKeyDownSelf,!1,this);this._searchResultsPanel&&this._searchResultsPanel.destroy&&this._searchResultsPanel.destroy();this._removeTabStop(this._searchResultsPanel);this._searchResultsPanel=null};
dvt.SearchPanel.prototype.deEmphasizeStart=function(){this.setMouseEnabled(!1);this._background&&this._background.setAlpha(dvt.SearchPanel._BACKGROUND_ALPHA_DE_EMPHASIZED);this._collapseButton&&(this._collapseButtonAlpha=this._collapseButton.getAlpha(),this._collapseButton.setAlpha(dvt.SearchPanel._BACKGROUND_ALPHA_DE_EMPHASIZED));this._frame&&this._frame.setAlpha(dvt.SearchPanel._BORDER_ALPHA_DE_EMPHASIZED)};
dvt.SearchPanel.prototype.deEmphasizeEnd=function(){this.setMouseEnabled(!0);null!=this._background&&this._background.setAlpha(this._bgAlpha);this._collapseButton&&(this._collapseButton.setAlpha(this._collapseButtonAlpha),this._collapseButtonAlpha=null);null!=this._frame&&this._frame.setAlpha(dvt.SearchPanel._BORDER_ALPHA);this.HandleRollOut(null)};
dvt.SearchPanel.prototype.focusTextField=function(){var a=this.getCurrentTabStop();a&&a!=this&&a.hideKeyboardFocusEffect&&a.hideKeyboardFocusEffect();this._curTabStopIdx=0;this._bFocus=!0;this.ApplyAlphasRollover();this._textField&&(this.HandleTextFieldMouseDown(),this._textField.selectEditText())};dvt.SearchPanel.prototype._blurTextField=function(){this.HandleTextFieldFocusOut();this._bFocus=!1;this._eventManager.setFocus(null);this.ApplyAlphasForMouse()};
dvt.SearchPanel.prototype.HandleStageFocusChange=function(a){this._bFocus&&a.target&&a.target!=this._textField&&this._blurTextField()};dvt.SearchPanel.prototype.setSkinName=function(a){this._skinName=a;this.IsSkinAlta()&&(this._textFieldHeight=26,this._textBgColor="#fcfdfe",this._textBgAlphaRollover=this._textBgAlpha=1,this._textCornerRadius=2,this._textBorderColor="#dfe4e7",this._goButtonWidth=null,this._goButtonHeight=this._textFieldHeight)};
dvt.SearchPanel.prototype.IsSkinAlta=function(){return this._skinName==dvt.CSSStyle.SKIN_ALTA};
dvt.SearchPanel.prototype.DisplaySearchResults=function(a){a&&this.DestroySearchResultsPanel();this.CreateSearchResultsPanel();if(this._state!=dvt.SearchPanel.STATE_COLLAPSED){if(this._state==dvt.SearchPanel.STATE_EMBEDDED){var b=this._searchResultsPanel.getParent()||!1;b||this.addChild(this._searchResultsPanel);var c=this.getDimensions();this.FireListener(new dvt.ResizeEvent(c.w,c.h,c.x,c.y));b||this.removeChild(this._searchResultsPanel);this.RemovePlaceholderRect();this._placeholderRect=new dvt.Rect(this.getCtx(),
c.x,c.y,c.w,c.h);this._placeholderRect.setAlpha(0);this._placeholderRect.setMouseEnabled(!1);this.addChildAt(this._placeholderRect,0)}(a=this.ShowSearchResultsPanel(a))?(this._placeholderRect&&dvt.Playable.appendOnEnd(a,this.RemovePlaceholderRect,this),a.play()):this._placeholderRect&&this.RemovePlaceholderRect()}};
dvt.SearchPanel.prototype.RemovePlaceholderRect=function(){if(this._placeholderRect){var a=this._placeholderRect.getParent();a&&a.removeChild(this._placeholderRect)}this._placeholderRect=null};dvt.SearchPanel.prototype.StampSearchResults=function(a){var b=[];if(a&&0<a.length)for(var c=0;c<a.length;c++){var d=a[c],e=this.CreateAfContext();e.setELContext(d.getElAttributes());d=dvt.AfComponentFactory.parseAndLayout(e,this._resultsTemplate,this);d.setMouseEnabled(!1);b.push(d)}return b};
dvt.SearchPanel.prototype.CreateSearchResultsPanel=function(){var a=this.StampSearchResults(this._arSearchResultsNodeData),b=this._searchResultsTotal,c=this._searchResultsFirstVisible,d=this._searchResultsLastVisible,e=this._searchResultsSelected,f=this._resultsMaxWidth,g=this._resultsMaxHeight,h=this._resultsTitleResource;f||0==f||(f=-1);g||0==g||(g=-1);c||0==c||(c=-1);d||0==d||(d=-1);e||0==e||(e=-1);var k=this._origWidth-this._textFieldContainer.getTranslateX();dvt.Agent.isRightToLeft(this.getCtx())&&
(k=this._textFieldContainer.getTranslateX()+this._textFieldContainer.getDimensions().w+1);var l=1;this.IsSkinAlta()&&(l=7,k+=dvt.SearchPanel._ALTA_CONTENT_PADDING);l=this._origHeight+l;this._searchResultsPanel=new DvtSearchResultsPanel(this.getCtx(),h,this.getSearchResultsEmptyText(),this.HandleSearchResultsEvent,this);this._tabStopsNodeArray.push(this._searchResultsPanel);this._searchResultsPanel.setSkinName(this._skinName);this._searchResultsPanel.renderComponent(this,a,b,f,g-l,k,c,d,e,this._imageURIs);
this._searchResultsPanel.setCloseTooltip(this._resultsCloseTooltip);dvt.Agent.isRightToLeft(this.getCtx())||this.IsSkinAlta()?(a=10,this.IsSkinAlta()&&(a=0),this._searchResultsPanel.setTranslateX(a)):this._searchResultsPanel.getWidth()>k?this._searchResultsPanel.setTranslateX(this._origWidth-this._searchResultsPanel.getWidth()):this._searchResultsPanel.setTranslateX(this._textFieldContainer.getTranslateX());this._searchResultsPanel.setTranslateY(l)};
dvt.SearchPanel.prototype.ShowSearchResultsPanel=function(a){this.addChild(this._searchResultsPanel);return this._searchResultsPanel.show(a)};
dvt.SearchPanel.prototype.HideSearchResultsPanel=function(a){var b=null;this._searchResultsPanel&&(this._searchResultsPanel.getVisible()?(b=this._searchResultsPanel.hide(),a&&(b?b.onEnd=this.DestroySearchResultsPanel:this.DestroySearchResultsPanel()),this._state==dvt.SearchPanel.STATE_EMBEDDED&&this.FireListener(new dvt.ResizeEvent(this.getWidth(),this.getHeight(),0,0))):a&&this.DestroySearchResultsPanel());return b};
dvt.SearchPanel.prototype.DestroySearchResultsPanel=function(){this._searchResultsPanel&&(this._searchResultsPanel.getParent()&&this._searchResultsPanel.getParent().removeChild(this._searchResultsPanel),this._removeTabStop(this._searchResultsPanel),this._searchResultsPanel.destroy&&this._searchResultsPanel.destroy(),this._searchResultsPanel=null)};
dvt.SearchPanel.prototype.HandleSearchResultsEvent=function(a){if(a.type==dvt.SearchEvent.SEARCH_RESULTS_CLEAR_EVENT){if(this._bShowSearchResults=!1,this.DestroySearchResultsPanel(),this._searchResultsPanel=null,this.ClearResultsNodeData(),this._state==dvt.SearchPanel.STATE_EMBEDDED){var b=this.getDimensions();this.FireListener(new dvt.ResizeEvent(b.w,b.h,b.x,b.y))}}else a.type==dvt.SearchEvent.SEARCH_RESULTS_SELECTED_EVENT?(b=a.getParamValue(dvt.SearchEvent.PARAM_INDEX),(b=this.GetResultId(b))&&
a.addParam(dvt.SearchEvent.PARAM_CLIENT_ROW_KEY,b)):a.type==dvt.SearchEvent.SEARCH_RESULTS_FETCH_EVENT?(b=a.getParamValue(dvt.SearchEvent.PARAM_INDEX),(b=this.GetResultId(b))&&a.addParam(dvt.SearchEvent.PARAM_CLIENT_ROW_KEY,b)):a.type==dvt.SearchEvent.SEARCH_RESULTS_SCROLL_EVENT&&(b=a.getParamValue(dvt.SearchEvent.PARAM_FIRST_VIS_INDEX),(b=this.GetResultId(b))&&a.addParam(dvt.SearchEvent.PARAM_FIRST_VIS_CLIENT_ROW_KEY,b),b=a.getParamValue(dvt.SearchEvent.PARAM_SELECTED_INDEX),(b=this.GetResultId(b))&&
a.addParam(dvt.SearchEvent.PARAM_SELECTED_CLIENT_ROW_KEY,b));this.FireEvent(a)};dvt.SearchPanel.prototype.GetResultId=function(a){return this._arSearchResultsNodeData&&this._arSearchResultsNodeData.length>a&&(a=this._arSearchResultsNodeData[a])?a.getId():null};dvt.SearchPanel.prototype.FireEvent=function(a,b){this._callback&&this._callback.call(this._callbackObj,a,b)};
dvt.SearchPanel.prototype.FireSearchEvent=function(a){this.ClearResultsNodeData();var b=new dvt.SearchEvent(dvt.SearchEvent.SEARCH_EVENT);b.addParam(dvt.SearchEvent.PARAM_TEXT,a);this.FireEvent(b)};dvt.SearchPanel.prototype.FireExpandEvent=function(){this.FireEvent(new dvt.SearchEvent(dvt.SearchEvent.SEARCH_EXPAND_EVENT))};dvt.SearchPanel.prototype.FireCollapseEvent=function(){this.FireEvent(new dvt.SearchEvent(dvt.SearchEvent.SEARCH_COLLAPSE_EVENT))};dvt.SearchPanel.prototype.HandleRollOver=function(a){this.ApplyAlphasRollover()};
dvt.SearchPanel.prototype.HandleRollOut=function(a){this._bFocus||this.ApplyAlphasRollout()};dvt.SearchPanel.prototype.ApplyAlphasRollover=function(){this._textFieldContainer&&this._textFieldContainer.setAlpha(this._textBgAlphaRollover);this._background&&this._background.setAlpha(dvt.SearchPanel._BACKGROUND_ALPHA_ROLLOVER)};dvt.SearchPanel.prototype.ApplyAlphasRollout=function(){this._textFieldContainer&&this._textFieldContainer.setAlpha(this._textBgAlpha);this._background&&this._background.setAlpha(this._bgAlpha)};
dvt.SearchPanel.prototype.ApplyAlphasForMouse=function(){this.ApplyAlphasRollover()};dvt.SearchPanel.prototype._doExpand=function(a){var b=this.RenderSelfExpanded();this.addChild(b);b=this.TransitionExpand(this._collapsedSprite,b);this._state=dvt.SearchPanel.STATE_EXPANDED;this.FireExpandEvent();if(this._searchResultsPanel){var c=this;dvt.Playable.appendOnEnd(b,function(){var b=c.ShowSearchResultsPanel();a&&dvt.Playable.appendOnEnd(b,a);b.play()})}else a&&dvt.Playable.appendOnEnd(b,a);b.play()};
dvt.SearchPanel.prototype._doCollapse=function(a){var b=this.HideSearchResultsPanel(!1);this._textField&&(this._text=this._textField.getText());var c=this.RenderSelfCollapsed();this.addChild(c);this._bFocus=!1;var d=this.TransitionCollapse(this._expandedSprite,c,a);this._state=dvt.SearchPanel.STATE_COLLAPSED;this.FireCollapseEvent();b?(d&&dvt.Playable.appendOnEnd(b,function(){d.play()}),b.play()):d&&d.play()};
dvt.SearchPanel.prototype.TransitionExpand=function(a,b){var c=new dvt.Animator(this.getCtx(),.25);a.setAlpha(1);b.setAlpha(0);c.addProp(dvt.Animator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,0);c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getAlpha,b.setAlpha,1);var d=b.getDimensions(),e=a.getDimensions();b.setScaleX(e.w/d.w);c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getScaleX,b.setScaleX,1);dvt.Agent.isRightToLeft(this.getCtx())||(b.setTranslateX(a.getTranslateX()),c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getTranslateX,
b.setTranslateX,0));b.setScaleY(e.h/d.h);c.addProp(dvt.Animator.TYPE_NUMBER,b,b.getScaleY,b.setScaleY,1);dvt.Playable.appendOnEnd(c,function(){a.getParent().removeChild(a)});dvt.Playable.appendOnEnd(c,this.ApplyAlphasForMouse,this);this._collapsedSprite=null;return c};
dvt.SearchPanel.prototype.TransitionCollapse=function(a,b,c){var d=null;c||(d=new dvt.Animator(this.getCtx(),.25));d?(a.setAlpha(1),b.setAlpha(0),d.addProp(dvt.Animator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,0),d.addProp(dvt.Animator.TYPE_NUMBER,b,b.getAlpha,b.setAlpha,1)):(a.alpha=0,b.alpha=1);if(d){c=b.getDimensions();var e=a.getDimensions();d.addProp(dvt.Animator.TYPE_NUMBER,a,a.getScaleX,a.setScaleX,c.w/e.w);d.addProp(dvt.Animator.TYPE_NUMBER,a,a.getScaleY,a.setScaleY,c.h/e.h);dvt.Agent.isRightToLeft(this.getCtx())||
d.addProp(dvt.Animator.TYPE_NUMBER,a,a.getTranslateX,a.setTranslateX,b.getTranslateX())}if(d){var f=this;dvt.Playable.appendOnEnd(d,function(){a.getParent().removeChild(a);f.ApplyAlphasForMouse()})}else a.getParent().removeChild(a),this.ApplyAlphasForMouse();this._expandedSprite=null;return d};
dvt.SearchPanel.prototype.RenderSelfCollapsed=function(){var a=new dvt.Container(this.getCtx()),b=dvt.Agent.isRightToLeft(this.getCtx());this.addChild(a);var c=dvt.ControlPanelLAFUtils.getViewPanelHalfHeight();this._background=dvt.ControlPanelLAFUtils.createEmptyViewClosedShape(this.getCtx(),c,this._styleMap,!b);this._background.setAlpha(this._bgAlpha);a.addChild(this._background);this._frame=new dvt.Container(this.getCtx());c=dvt.ControlPanelLAFUtils.createEmptyViewClosedFrame(this.getCtx(),c,this._styleMap,
!b);this._frame.addChild(c);a.addChild(this._frame);this._expandButton=this.CreateExpandButton();b||this._expandButton.setTranslateX(this._expandButton.getTranslateX()+1);this._frame.addChild(this._expandButton);b||(b=dvt.StyleUtils.getStyle(this._styleMap,dvt.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0),a.setTranslateX(this._origWidth-b));this._collapsedSprite=a;this.removeChild(a);return a};
dvt.SearchPanel.prototype.CreateAfContext=function(){var a=new dvt.AfContext(this.getCtx(),this._eventManager);a.setSkinName(this._skinName);return a};dvt.SearchPanel.prototype.getScrollEventCallback=function(){if(!this._scrollCallbackFunc){var a=this;this._scrollCallbackFunc=function(b){null!=b.getX()&&(b=a.getParent().getTranslateX(),a._textField.updateClipRect(null,null,null,-(b+a._textFieldContainer.getTranslateX()+a._textField.getTranslateX())))}}return this._scrollCallbackFunc};
dvt.SearchPanel.prototype._getTextFieldWidth=function(a,b){var c=this.IsSkinAlta()?200:110,d=.5*this._callbackObj.getWidth()-a,d=Math.max(d,b);return d=Math.min(c,d)};
dvt.SearchPanel.prototype.RenderSelfExpanded=function(){var a=new dvt.Container(this.getCtx());this.addChild(a);this._background=new dvt.Rect(this.getCtx(),0,0,1,1);this._background.setFill(null);this._background.setAlpha(this._bgAlpha);a.addChild(this._background);this._frame=new dvt.Path(this.getCtx());this._frame.setFill(null);a.addChild(this._frame);var b=this.IsSkinAlta()?dvt.SearchPanel._ALTA_CONTENT_PADDING:4,c=this.IsSkinAlta()?dvt.SearchPanel._ALTA_CONTENT_PADDING+7:3,d=this.IsSkinAlta()?
3:b+2,e=null;this._goButton=this.CreateGoButton();var f=this.CreateAfContext();this._tabStopsNodeArray=[];f.setTabStopsArray(this._tabStopsNodeArray);f.registerTabStop(this);this._curTabStopIdx=-1;this._advancedTemplate&&(this._advancedComponent=dvt.AfComponentFactory.parseAndLayout(f,this._advancedTemplate,this._frame))&&(e=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this._advancedComponent));this._textFieldContainer=new dvt.Rect(this.getCtx(),0,0,1,1);this._textFieldContainer.setAlpha(this._textBgAlpha);
this._frame.addChild(this._textFieldContainer);var g=this._getTextFieldWidth(e?e.w+this._goButtonWidth+4*b+d+1:this._goButtonWidth+3*b+d+1,this._goButtonWidth);this._textField=this.CreateTextField(this._textFieldContainer,g);var h=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this._textFieldContainer),f=new dvt.Rectangle(h.x,h.y,g,h.h);h.h<this._textFieldHeight&&(this._textField.setTranslateY(.5*(this._textFieldHeight-h.h)),h.h=this._textFieldHeight);h.w=g+b;this._textFieldContainer.setTranslate(b,
c);this._textFieldContainer.setWidth(h.w);this._textFieldContainer.setHeight(h.h);this._textFieldContainer.setRx(this._textCornerRadius);this._textFieldContainer.setRy(this._textCornerRadius);g=new dvt.SolidFill(this._textBgColor);this._textFieldContainer.setFill(g);this._textBorderColor&&this._textFieldContainer.setSolidStroke(this._textBorderColor);this.IsSkinAlta()&&this._textField.setTranslateX(this._textFieldContainer.getTranslateX()/2);this._frame.addChild(this._goButton);this._goButton.setTranslate(this._textFieldContainer.getTranslateX()+
h.w+d,(this._textFieldContainer.getTranslateY()+h.h+c-this._goButtonHeight)/2);var k=Math.max(this._goButton.getTranslateY()+this._goButtonHeight,this._textFieldContainer.getTranslateY()+h.h),d=this._goButton.getTranslateX()+this._goButtonWidth+b,l;this._advancedComponent&&(l=e.w,this.IsSkinAlta()?(this._advancedComponent.setTranslate(this._goButton.getTranslateX()+this._goButtonWidth+b,this._goButton.getTranslateY()+(this._goButtonHeight-e.h)/2),d=this._advancedComponent.getTranslateX()+l+b,k=this._advancedComponent.getTranslateY()+
e.h):(this._advancedComponent.setTranslateX(d),e.h<this._textFieldContainer.getTranslateY()+h.h+c&&this._advancedComponent.setTranslateY((this._textFieldContainer.getTranslateY()+h.h+c-e.h)/2),k=Math.max(k,e.h),d=this._advancedComponent.getTranslateX()+l+b),this._frame.addChild(this._advancedComponent));this.IsEmbedded()||(this._collapseButton=this.CreateCollapseButton(k+c),a.addChild(this._collapseButton));b=0;this._collapseButton&&(b=dvt.StyleUtils.getStyle(this._styleMap,dvt.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,
0));this._background.setWidth(d+1+b);this._background.setHeight(k+c+1);this._background.setRx(this._borderRadius);this._background.setRy(this._borderRadius);this.IsEmbedded()||(g=new dvt.SolidFill(this._bgColor),this._background.setFill(g));this.CreateFrame(this._frame,d,k+c,this._borderRadius);this.IsEmbedded()||(c=new dvt.SolidStroke(this._borderColor,dvt.SearchPanel._BORDER_ALPHA,dvt.SearchPanel._BORDER_THICKNESS),this._frame.setStroke(c));this._collapseButton&&!dvt.Agent.isRightToLeft(this.getCtx())&&
this._frame.setTranslateX(dvt.StyleUtils.getStyle(this._styleMap,dvt.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0));this._expandedSprite=a;dvt.Agent.isRightToLeft(this.getCtx())&&(this._collapseButton&&this._collapseButton.setTranslateX(d-this._collapseButton.getTranslateX()),this._textFieldContainer.setTranslateX(d-this._textFieldContainer.getTranslateX()-h.w),this._goButton.setTranslateX(d-this._goButton.getTranslateX()-this._goButtonWidth),this._advancedComponent&&this._advancedComponent.setTranslateX(d-
this._advancedComponent.getTranslateX()-l));this.CheckShowDefaultText();l=new dvt.ClipPath("searchTextClip");l.addRect(f.x+this._textField.getTranslateX(),f.y+this._textField.getTranslateY(),f.w,f.h);this._textField.setClipPath(l);this.removeChild(a);return a};dvt.SearchPanel.prototype.CheckTextFieldUsed=function(){this._bTextFieldUsed||(this._bTextFieldUsed=!0,this._textField.setText(""))};dvt.SearchPanel.prototype.getDiagram=function(){return this._callbackObj};
dvt.SearchPanel.prototype.blurEditTextField=function(a){var b=this.getCtx().getSvgDocument();this._blurTextField();window.setTimeout(function(){b.parentNode.focus(a)},0)};dvt.SearchPanel.prototype.HandleTextFieldMouseDown=function(a){this.CheckTextFieldUsed();this._eventManager.setFocus(this._textFieldProxyObj);this._textField.focusEditText();this._bFocus=!0;this.getDiagram().enableSearchKeyboardHandler()};
dvt.SearchPanel.prototype.HandleTextFieldKeyDown=function(a){var b=!1;if(a.keyCode==dvt.KeyboardEvent.ENTER&&this.isTextFieldFocus())this.HideResultsAndFireSearchEvent(),b=!0;else if(a.keyCode==dvt.KeyboardEvent.ESCAPE||a.keyCode==dvt.KeyboardEvent.TAB)b=this.HandleKeyDownSelf(a);return b};dvt.SearchPanel.prototype.isTextFieldFocus=function(){return this._eventManager.getFocus()==this._textFieldProxyObj};
dvt.SearchPanel.prototype.HandleGoClick=function(a){dvt.Agent.isTouchDevice()&&dvt.Agent.isBrowserChrome()&&this._textField&&this._textField.isEditing()&&this._textField.destroy();this.HideResultsAndFireSearchEvent()};dvt.SearchPanel.prototype.HideResultsAndFireSearchEvent=function(){if(this._bTextFieldUsed){var a=this.HideSearchResultsPanel(!0);if(a){var b=this;dvt.Playable.appendOnEnd(a,function(){b.FireSearchEvent(b._textField.getText())});a.play()}else this.FireSearchEvent(this._textField.getText())}};
dvt.SearchPanel.prototype.HandleKeyDownSelf=function(a){var b=!1;if(a.keyCode==dvt.KeyboardEvent.F&&a.ctrlKey)this.getDiagram().FocusSearchField(),b=!0;else if(a.keyCode==dvt.KeyboardEvent.ESCAPE)b=this.HandleKeyboardEscape(a);else if(a.keyCode==dvt.KeyboardEvent.TAB){var c=this.getNextNavigable(a);c&&(c instanceof dvt.SearchPanel?(this.focusTextField(a),b=!0):c instanceof DvtSearchResultsPanel&&this._searchResultsPanel&&this._searchResultsPanel.getVisible()?b=this.HandleSearchResultsKeyDown(a):c.showKeyboardFocusEffect&&
(c.showKeyboardFocusEffect(),this._eventManager.UpdateActiveElement(c,c.getDisplayObj()),b=!0))}else if(c=this.getCurrentTabStop())a.keyCode==dvt.KeyboardEvent.ENTER&&c.handleKeyboardEvent?(c.hideKeyboardFocusEffect&&c.hideKeyboardFocusEffect(),c.handleKeyboardEvent(a),b=!0):b=this.HandleSearchResultsKeyDown(a);return b};
dvt.SearchPanel.prototype.HandleKeyboardEscape=function(a){this.resetTabStops();if(this._searchResultsPanel&&this._searchResultsPanel.getVisible())return this.getDiagram().FocusSearchField(),(a=this.HideSearchResultsPanel(!0))&&a.play(),!0;this._state==dvt.SearchPanel.STATE_EMBEDDED?(this.blurEditTextField(a),this.getDiagram().collapseSearchPanel()):this._state==dvt.SearchPanel.STATE_EXPANDED&&(this.blurEditTextField(a),this._doCollapse());this.getDiagram().enableDiagramKeyboardHandler();return!1};
dvt.SearchPanel.prototype.HandleSearchResultsKeyDown=function(a){return!this._searchResultsPanel||a.keyCode!=dvt.KeyboardEvent.TAB&&a.keyCode!=dvt.KeyboardEvent.ENTER&&a.keyCode!=dvt.KeyboardEvent.UP_ARROW&&a.keyCode!=dvt.KeyboardEvent.DOWN_ARROW?!0:this._searchResultsPanel.handleKeyboardEvent(a)};
dvt.SearchPanel.prototype.CreateTextField=function(a,b){var c=new dvt.Text(this.getCtx(),this._text);a&&a.addChild(c);c.setSolidFill(dvt.SearchPanel._TEXT_COLOR);if(this.IsSkinAlta()){var d=new dvt.SolidFill("#333333",1);c.setFill(d);c.setFontSize(12);d=new dvt.CSSStyle(dvt.CSSStyle.FONT_FAMILY+':"Helvetica Neue", Helvetica, Arial, sans-serif;'+dvt.CSSStyle.BACKGROUND+":"+this._textBgColor+";");c.setCSSStyle(d)}c.setEditWidth(b);var e=this;c.setEditMode(!0,null,function(a){e._blurTextField();return null});
var f={};this._textFieldProxyObj=f;f.HandleClick=function(a){e.HandleTextFieldMouseDown(a)};f.showKeyboardFocusEffect=function(){f.bFocusEffect=!0};f.hideKeyboardFocusEffect=function(){f.bFocusEffect=!1};f.isShowingKeyboardFocusEffect=function(){return f.bFocusEffect};f.getNextNavigable=function(a){return f};f.getDisplayable=function(){return c};this._eventManager.associate(c,f);return c};
dvt.SearchPanel.prototype.handleKeyboardEvent=function(a){var b=!1;if(!this.getDiagram().isSearchPanelDisclosed())return b;if(b=this.isTextFieldFocus()?this.HandleTextFieldKeyDown(a):this.HandleKeyDownSelf(a))a.preventDefault(),a.stopPropagation();return b};dvt.SearchPanel.prototype.HandleTextFieldFocusOut=function(a){this.CheckShowDefaultText()};
dvt.SearchPanel.prototype.CheckShowDefaultText=function(){!this._textField||null!=this._textField.getText()&&""!=this._textField.getText()||(this.IsSkinAlta()||this._textField.setText(this._defaultText),this._bTextFieldUsed=!1)};
dvt.SearchPanel.prototype.CreateExpandButton=function(){var a=dvt.Agent.isRightToLeft(this.getCtx()),b=dvt.ControlPanelLAFUtils.getViewPanelHalfHeight(),a=dvt.ButtonLAFUtils.createExpandButton(this.getCtx(),this._imageURIs,b,this._styleMap,a?dvt.ButtonLAFUtils.DIR_LEFT:dvt.ButtonLAFUtils.DIR_RIGHT),b=new dvt.Container(this.getCtx());b.addChild(a);var a=b,c=this;this._eventManager.associate(a,{HandleClick:function(a){c.HandleExpandClick(a)},getTooltip:function(){return c._expandTooltip}});return a};
dvt.SearchPanel.prototype.CreateCollapseButton=function(a){var b=dvt.Agent.isRightToLeft(this.getCtx());a||(a=dvt.ControlPanelLAFUtils.getViewPanelHalfHeight());a=dvt.ButtonLAFUtils.createCollapseButton(this.getCtx(),this._imageURIs,a,this._styleMap,b?dvt.ButtonLAFUtils.DIR_LEFT:dvt.ButtonLAFUtils.DIR_RIGHT);b=new dvt.Container(this.getCtx());b.addChild(a);a=b;var c=this;this._eventManager.associate(a,{HandleClick:function(a){c.HandleCollapseClick(a)},getTooltip:function(){return c._collapseTooltip}});
return a};dvt.SearchPanel.prototype.HandleExpandClick=function(a){a.stopPropagation();this._doExpand()};dvt.SearchPanel.prototype.HandleCollapseClick=function(a){a.stopPropagation();this._doCollapse()};
dvt.SearchPanel.prototype.CreateGoButton=function(){var a;a=this.IsSkinAlta()?this._createAltaGoButton():dvt.ButtonLAFUtils.createQuickQueryButton(this.getCtx(),this._imageURIs);var b=this;this._eventManager.associate(a,{HandleClick:function(a){b.HandleGoClick(a)},getTooltip:function(){return b._goTooltip}});return a};
dvt.SearchPanel.prototype._createAltaGoButton=function(){var a=this._textFieldHeight,b=this._defaultText,c=this.getLabelStyle(),d=new dvt.Text(this.getCtx(),b,0,0),e=new dvt.Text(this.getCtx(),b,0,0),b=new dvt.Text(this.getCtx(),b,0,0);c&&(d.setCSSStyle(c[0]),e.setCSSStyle(c[1]),b.setCSSStyle(c[2]));var c=this.getButtonStyle(),f=new dvt.Rect(this.getCtx(),0,0,h,a);f.setRx(dvt.SearchPanel._ALTA_BUTTON_RADIUS);f.setRy(dvt.SearchPanel._ALTA_BUTTON_RADIUS);var g=d.measureDimensions(),h=g.w+14;this._goButtonWidth=
h;f=new dvt.Rect(this.getCtx(),0,0,h,a);f.setRx(dvt.SearchPanel._ALTA_BUTTON_RADIUS);f.setRy(dvt.SearchPanel._ALTA_BUTTON_RADIUS);d.setX(7);d.setY(.5*(a-g.h));f.addChild(d);d=new dvt.Rect(this.getCtx(),0,0,h,a);d.setRx(dvt.SearchPanel._ALTA_BUTTON_RADIUS);d.setRy(dvt.SearchPanel._ALTA_BUTTON_RADIUS);e.setX(7);e.setY(.5*(a-g.h));d.addChild(e);e=new dvt.Rect(this.getCtx(),0,0,h,a);e.setRx(dvt.SearchPanel._ALTA_BUTTON_RADIUS);e.setRy(dvt.SearchPanel._ALTA_BUTTON_RADIUS);b.setX(7);b.setY(.5*(a-g.h));
e.addChild(b);c&&(dvt.ButtonLAFUtils.parseStyle(f,c[0]),dvt.ButtonLAFUtils.parseStyle(d,c[1]),dvt.ButtonLAFUtils.parseStyle(e,c[2]));return new dvt.Button(this.getCtx(),f,d,e)};dvt.SearchPanel.prototype.LoadIcon=function(a,b,c){c||0==c||(c=9999);a=dvt.ImageLAFUtils.getIconUrl(a,c);a=dvt.ImageLAFUtils.loadIcon(this.getCtx(),a);a.setMouseEnabled(!1);b.addChild(a);return a};
dvt.SearchPanel.prototype.parseNode=function(a){switch(a.getName()){case dvt.SearchPanel.ELEM_SEARCH_RESULTS_TEMPLATE:this.ParseResultsTemplate(a);break;case dvt.SearchPanel.ELEM_SEARCH_ADVANCED_TEMPLATE:this.ParseAdvancedTemplate(a);break;case dvt.SearchPanel.ELEM_SEARCH_RESULTS_DATA:this.ParseResultsData(a),this._bShowSearchResults=!0}};
dvt.SearchPanel.prototype.parseNodeJson=function(a){if(a){var b=a[dvt.SearchPanel.ELEM_SEARCH_RESULTS_TEMPLATE];b&&this.ParseResultsTemplateJson(b);(b=a[dvt.SearchPanel.ELEM_SEARCH_ADVANCED_TEMPLATE])&&this.ParseAdvancedTemplateJson(b);if(b=a[dvt.SearchPanel.ELEM_SEARCH_RESULTS_DATA])this.ParseResultsDataJson(b),this._bShowSearchResults=!0}};
dvt.SearchPanel.prototype.parseResultsData=function(a,b,c,d){this.ParseResultsData(a);this._bShowSearchResults=!0;d&&"-1"!=d?this.ProcessAdditionalSearchResults():this.ProcessInitialSearchResults()};dvt.SearchPanel.prototype.parseResultsDataJson=function(a,b,c,d){this.ParseResultsDataJson(a);this._bShowSearchResults=!0;d&&"-1"!=d?this.ProcessAdditionalSearchResults():this.ProcessInitialSearchResults()};dvt.SearchPanel.prototype.ProcessInitialSearchResults=function(){this.DisplaySearchResults()};
dvt.SearchPanel.prototype.ProcessAdditionalSearchResults=function(){var a=this._searchResultsPanel.getFocusItemIndex();this.DisplaySearchResults(!0);this._searchResultsPanel.setFocusItemIndex(a)};
dvt.SearchPanel.prototype.ParseResultsTemplate=function(a){var b;(b=a.getAttr(dvt.SearchPanel._ATTR_EMPTY_TEXT))&&this.setSearchResultsEmptyText(b);(b=a.getAttr(dvt.SearchPanel._ATTR_INITIAL_BEHAVIOR))&&this.setInitialBehavior(b);a=a.getChildNodes();for(b=0;b<a.length;b++){var c=a[b];c.getName()==dvt.SearchPanel._ELEM_NODE&&this.ParseResultsNode(c)}};
dvt.SearchPanel.prototype.ParseResultsTemplateJson=function(a){var b;(b=a[dvt.SearchPanel._ATTR_EMPTY_TEXT])&&this.setSearchResultsEmptyText(b);(b=a[dvt.SearchPanel._ATTR_INITIAL_BEHAVIOR])&&this.setInitialBehavior(b);b=a[dvt.SearchPanel._ELEM_NODE];this.ParseResultsNodeJson(b)};dvt.SearchPanel.prototype.ParseAdvancedTemplate=function(a){this._advancedTemplate=(a=dvt.AfComponentFactory.parseXml(a))?a:null};
dvt.SearchPanel.prototype.ParseAdvancedTemplateJson=function(a){this._advancedTemplate=(a=dvt.AfComponentFactory.parseJson(a.children))?a:null};
dvt.SearchPanel.prototype.ParseResultsData=function(a){var b;this._searchResultsTotal=(b=a.getAttr(dvt.SearchPanel._ATTR_TOTAL))?parseInt(b):-1;this._searchText=b=a.getAttr(dvt.SearchPanel._ATTR_SEARCH_TEXT);this._searchResultsFirstVisible=(b=a.getAttr(dvt.SearchPanel._ATTR_SEARCH_RESULTS_FIRST_VISIBLE))?parseInt(b):-1;this._searchResultsLastVisible=(b=a.getAttr(dvt.SearchPanel._ATTR_SEARCH_RESULTS_LAST_VISIBLE))?parseInt(b):-1;this._searchResultsSelected=(b=a.getAttr(dvt.SearchPanel._ATTR_SEARCH_RESULTS_SELECTED))?
parseInt(b):-1;a=a.getChildNodes();for(b=0;b<a.length;b++){var c=a[b];c.getName()==dvt.SearchPanel._ELEM_NODE_DATA&&this.ParseNodeData(c)}};
dvt.SearchPanel.prototype.ParseResultsDataJson=function(a){var b;b=a[dvt.SearchPanel._ATTR_TOTAL];this._searchResultsTotal=isNaN(b)?-1:parseInt(b);this._searchText=b=a[dvt.SearchPanel._ATTR_SEARCH_TEXT];b=a[dvt.SearchPanel._ATTR_SEARCH_RESULTS_FIRST_VISIBLE];this._searchResultsFirstVisible=isNaN(b)?-1:parseInt(b);b=a[dvt.SearchPanel._ATTR_SEARCH_RESULTS_LAST_VISIBLE];this._searchResultsLastVisible=isNaN(b)?-1:parseInt(b);b=a[dvt.SearchPanel._ATTR_SEARCH_RESULTS_SELECTED];this._searchResultsSelected=
isNaN(b)?-1:parseInt(b);if(a=a[dvt.SearchPanel._ELEM_NODE_DATA])for(b=0;b<a.length;b++)this.ParseNodeDataJson(a[b])};dvt.SearchPanel.prototype.ParseNodeData=function(a){var b,c=new DvtSearchResultsNodeData;b=a.getAttr(dvt.SearchPanel._ATTR_ID);c.setId(b);if((a=a.getFirstChild())&&a.getName()===dvt.SearchPanel._ELEM_EL){a=a.getAttributes();for(var d={},e=0;e<a.length;e++)b=a[e],d[b.name]=b.value;c.setElAttributes(d)}this.AddResultNodeData(c)};
dvt.SearchPanel.prototype.ParseNodeDataJson=function(a){var b=new DvtSearchResultsNodeData;b.setId(a[dvt.SearchPanel._ATTR_ID]);b.setElAttributes(a[dvt.SearchPanel._ELEM_EL]);this.AddResultNodeData(b)};dvt.SearchPanel.prototype.AddResultNodeData=function(a){this._arSearchResultsNodeData||(this._arSearchResultsNodeData=[]);this._arSearchResultsNodeData.push(a)};
dvt.SearchPanel.prototype.ClearResultsNodeData=function(){if(this._arSearchResultsNodeData){for(;0<this._arSearchResultsNodeData.length;)this._arSearchResultsNodeData.pop();this._arSearchResultsNodeData=null}};
dvt.SearchPanel.prototype.ParseResultsNode=function(a){var b=new dvt.AfPanelGroupLayout;b.setLayout(dvt.AfPanelGroupLayout.LAYOUT_VERTICAL);this.ParseNodeAttrs(a,b);if((a=a.getChildNodes())&&0<a.length)for(var c,d=0;d<a.length;d++)c=a[d],c.getName()===dvt.SearchPanel._ELEM_F&&("content"===c.getAttr(dvt.SearchPanel._ATTR_AF_NAME)&&(c=dvt.AfComponentFactory.parseXml(c))&&b.addChild(c),a.splice(d,1),d--);this._resultsTemplate=b};
dvt.SearchPanel.prototype.ParseResultsNodeJson=function(a){var b=new dvt.AfPanelGroupLayout;b.setLayout(dvt.AfPanelGroupLayout.LAYOUT_VERTICAL);this.ParseNodeAttrsJson(a,b);a=a[dvt.SearchPanel._ELEM_F];"content"===a[dvt.SearchPanel._ATTR_AF_NAME]&&(a=dvt.AfComponentFactory.parseJson(a.children))&&b.addChild(a);this._resultsTemplate=b};
dvt.SearchPanel.prototype.ParseNodeAttrs=function(a,b){var c;c=a.getAttr(dvt.SearchPanel._ATTR_ID);b.setId(c);c="";var d=a.getAttr(dvt.SearchPanel._ATTR_WIDTH);d&&(0<c.length&&(c+=";"),c+="width:"+d);if(d=a.getAttr(dvt.SearchPanel._ATTR_HEIGHT))0<c.length&&(c+=";"),c+="height:"+d;0<c.length&&b.setInlineStyle(c)};
dvt.SearchPanel.prototype.ParseNodeAttrsJson=function(a,b){b.setId(a[dvt.SearchPanel._ATTR_ID]);var c="",d=a[dvt.SearchPanel._ATTR_WIDTH];d&&(0<c.length&&(c+=";"),c+="width:"+d);if(d=a[dvt.SearchPanel._ATTR_HEIGHT])0<c.length&&(c+=";"),c+="height:"+d;0<c.length&&b.setInlineStyle(c)};
dvt.SearchPanel.prototype.getDimensions=function(a){var b;this._searchResultsPanel&&(b=this._searchResultsPanel.getDimensions())&&(b.h+=b.y+this._searchResultsPanel.getTranslateY());b||(b=dvt.SearchPanel.superclass.getDimensions.call(this));return a&&b?this.ConvertCoordSpaceRect(b,a):b};dvt.SearchPanel.prototype.getDimensionsWithStroke=function(a){return this.getDimensions(a)};dvt.SearchPanel.prototype.hideKeyboardFocusEffect=function(){};
dvt.SearchPanel.prototype.CreateFrame=function(a,b,c,d){var e=dvt.Agent.isRightToLeft(this.getCtx()),f=this.IsEmbedded();a.setCommands(f||e?!f&&e?["M",b,0,"L",b,c,"L",d,c,"A",d,d,0,0,1,0,c-d,"L",0,d,"A",d,d,0,0,1,d,0,"Z"]:["M",b-d,0,"A",d,d,0,0,1,b,d,"L",b,c-d,"A",d,d,0,0,1,b-d,c,"L",d,c,"A",d,d,0,0,1,0,c-d,"L",0,d,"A",d,d,0,0,1,d,0,"Z"]:["M",b-d,0,"A",d,d,0,0,1,b,d,"L",b,c-d,"A",d,d,0,0,1,b-d,c,"L",0,c,"L",0,0,"Z"])};
dvt.SearchPanel.prototype.canReuse=function(){var a=!1;dvt.Agent.isTouchDevice()&&dvt.Agent.isBrowserChrome()&&this._textField&&this._textField.isEditing()&&(a=!0);return a};dvt.SearchPanel.prototype.getEventManager=function(){return this._eventManager};
dvt.SearchPanel.prototype.getNextTabStop=function(){this._prevTabStopIdx=this._curTabStopIdx;this._curTabStopIdx++;if(this._tabStopsNodeArray&&this._tabStopsNodeArray.length>this._curTabStopIdx)return this._tabStopsNodeArray[this._curTabStopIdx];this._curTabStopIdx=-1;return null};
dvt.SearchPanel.prototype.getPrevTabStop=function(){-1==this._curTabStopIdx&&this._prevTabStopIdx==this._tabStopsNodeArray.length-1?this._curTabStopIdx=this._prevTabStopIdx:(this._prevTabStopIdx=this._curTabStopIdx,this._curTabStopIdx--);if(0<=this._curTabStopIdx&&this._tabStopsNodeArray&&this._tabStopsNodeArray.length>this._curTabStopIdx)return this._tabStopsNodeArray[this._curTabStopIdx];this._curTabStopIdx=-1;return null};
dvt.SearchPanel.prototype.getCurrentTabStop=function(){return-1<this._curTabStopIdx&&this._tabStopsNodeArray&&this._tabStopsNodeArray.length>this._curTabStopIdx?this._tabStopsNodeArray[this._curTabStopIdx]:null};
dvt.SearchPanel.prototype.setCurrentTabStop=function(a){a==this._textFieldProxyObj?a=this:a instanceof dvt.ItemListSprite&&(a=this._searchResultsPanel);a=dvt.ArrayUtils.getIndex(this._tabStopsNodeArray,a);if(0<=a&&this._curTabStopIdx!=a){var b=this.getCurrentTabStop();b&&b.hideKeyboardFocusEffect&&b.hideKeyboardFocusEffect();this._curTabStopIdx=a}};dvt.SearchPanel.prototype._removeTabStop=function(a){a=dvt.ArrayUtils.getIndex(this._tabStopsNodeArray,a);0<=a&&this._tabStopsNodeArray.splice(a,1)};
dvt.SearchPanel.prototype.resetTabStops=function(){var a=this.getCurrentTabStop();a&&a==this?this.blurEditTextField():a&&a.hideKeyboardFocusEffect&&a.hideKeyboardFocusEffect();this._curTabStopIdx=-1};
dvt.SearchPanel.prototype.getNextNavigable=function(a){var b=null;(b=this.getCurrentTabStop())&&b instanceof dvt.SearchPanel?this.blurEditTextField():b&&b.hideKeyboardFocusEffect&&b.hideKeyboardFocusEffect();return b=a.keyCode!=dvt.KeyboardEvent.TAB||a.shiftKey?a.keyCode==dvt.KeyboardEvent.TAB?this.getPrevTabStop():null:this.getNextTabStop()};var DvtSearchResultsNodeData=function(){this._id=null;this._elAttributes=[]};dvt.Obj.createSubclass(DvtSearchResultsNodeData,dvt.Obj,"DvtSearchResultsNodeData");
DvtSearchResultsNodeData.prototype.setId=function(a){this._id=a};DvtSearchResultsNodeData.prototype.getId=function(){return this._id};DvtSearchResultsNodeData.prototype.setElAttributes=function(a){this._elAttributes=a};DvtSearchResultsNodeData.prototype.getElAttributes=function(){return this._elAttributes};
var DvtSearchPanelEventManager=function(a,b,c){this.Init(a,b,c)};dvt.Obj.createSubclass(DvtSearchPanelEventManager,dvt.EventManager,"DvtSearchPanelEventManager");DvtSearchPanelEventManager.prototype.Init=function(a,b,c){DvtSearchPanelEventManager.superclass.Init.call(this,a,b,c);this._diagram=c};
DvtSearchPanelEventManager.prototype.OnMouseDown=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));DvtSearchPanelEventManager.superclass.OnMouseDown.call(this,a);b&&(b.HandleMouseDown&&b.HandleMouseDown(a),this._diagram.enableSearchKeyboardHandler(),this._diagram.getSearchPanel().setCurrentTabStop(b))};
DvtSearchPanelEventManager.prototype.OnClick=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));DvtSearchPanelEventManager.superclass.OnClick.call(this,a);b&&(b.HandleClick&&b.HandleClick(a),a.stopPropagation())};DvtSearchPanelEventManager.prototype.OnDblClickInternal=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&(b.isDoubleClickable&&b.isDoubleClickable()&&b.HandleDblClick&&b.HandleDblClick(a),a.stopPropagation())};
DvtSearchPanelEventManager.prototype.OnRollOver=function(a){DvtSearchPanelEventManager.superclass.OnRollOver.call(this,a);var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&b.HandleRollOver&&b.HandleRollOver(a)};DvtSearchPanelEventManager.prototype.OnRollOut=function(a){DvtSearchPanelEventManager.superclass.OnRollOut.call(this,a);var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&b.HandleRollOut&&b.HandleRollOut(a)};
DvtSearchPanelEventManager.prototype.OnComponentTouchClick=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));DvtSearchPanelEventManager.superclass.OnComponentTouchClick.call(this,a);b&&(b.HandleClick&&b.HandleClick(a),a.stopPropagation())};DvtSearchPanelEventManager.prototype.HandleTouchDblClickInternal=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&(b.isDoubleClickable&&b.isDoubleClickable()&&b.HandleDblClick&&b.HandleDblClick(a),a.stopPropagation())};
DvtSearchPanelEventManager.prototype.ShowKeyboardFocusByDefault=function(a){return!0};DvtSearchPanelEventManager.prototype.setFocus=function(a){this._focusedObj=a};DvtSearchPanelEventManager.prototype.getFocus=function(){return this._focusedObj};
var DvtSearchResultsPanel=function(a,b,c,d,e){this.Init(a,b,c,d,e)};dvt.Obj.createSubclass(DvtSearchResultsPanel,dvt.Container,"DvtSearchResultsPanel");DvtSearchResultsPanel._BORDER_COLOR="#C1D0D7";DvtSearchResultsPanel._TEXT_COLOR="#333333";DvtSearchResultsPanel._TEXT_FONT="Arial";DvtSearchResultsPanel._TEXT_SIZE=11;DvtSearchResultsPanel._TEXT_WEIGHT="normal";DvtSearchResultsPanel._TITLE_BAR_HEIGHT=19;DvtSearchResultsPanel._ANIM_DURATION=.25;DvtSearchResultsPanel._CLOSE_BUTTON_WIDTH=11;
DvtSearchResultsPanel._CLOSE_BUTTON_HEIGHT=11;DvtSearchResultsPanel._PGL_BASE_STYLE="background-color:transparent;border-width:0px;fill-type:solid;padding:0px;";
DvtSearchResultsPanel.prototype.Init=function(a,b,c,d,e){DvtSearchResultsPanel.superclass.Init.call(this,a);this._callback=d;this._callbackObj=e;this._eventManager=this._callbackObj.getEventManager();this._styleMap=e.getStyleMap();this._titleResource=b?b:"Search Results [{0}]";this._emptyText=c?c:"No results to display.";this._actualItemCount=0;this._total=-1;this._items;this._maxHeight=this._maxWidth=Number.MAX_VALUE;this._minWidth=-1;this._origHeight=this._origWidth=0;this._popupMenu;this._popupMenuMinWidth;
this._scrollableContainer;this._contentPGL;this._titleTextField;this._bVScroll=this._bHScroll=!1;this._contentWidth;this._closeTooltip="Close";this._closeButton;this._selectedIndex=this._lastVisIndex=this._firstVisIndex=-1;this._imageURIs=this._skinName=null;this._textColor=DvtSearchResultsPanel._TEXT_COLOR;this._textFont=DvtSearchResultsPanel._TEXT_FONT;this._textSize=DvtSearchResultsPanel._TEXT_SIZE;this._textWeight=DvtSearchResultsPanel._TEXT_WEIGHT;this._titleBarHeight=DvtSearchResultsPanel._TITLE_BAR_HEIGHT;
this._closeButtonWidth=DvtSearchResultsPanel._CLOSE_BUTTON_WIDTH;this._closeButtonHeight=DvtSearchResultsPanel._CLOSE_BUTTON_HEIGHT;this._borderColor=dvt.StyleUtils.getStyle(this._styleMap,dvt.CSSStyle.BORDER_COLOR,DvtSearchResultsPanel._BORDER_COLOR);this._bgColor=dvt.StyleUtils.getStyle(this._styleMap,dvt.CSSStyle.BACKGROUND_COLOR,null);this._bFetchFired=!1};
DvtSearchResultsPanel.prototype.renderComponent=function(a,b,c,d,e,f,g,h,k,l){this._total=c||0==c?c:-1;this._maxWidth=d||0==d?d:Number.MAX_VALUE;this._maxHeight=e||0==e?e:Number.MAX_VALUE;this._minWidth=f||0==f?f-3:-1;this._firstVisIndex=g||0==g?g:-1;this._lastVisIndex=h||0==h?h:-1;this._selectedIndex=k||0==k?k:-1;a&&a.addChild(this);this._imageURIs=l;this.setItems(b);a&&a.removeChild(this)};DvtSearchResultsPanel.prototype.setCloseTooltip=function(a){this._closeTooltip=a};
DvtSearchResultsPanel.prototype.show=function(a){if(this.IsSkinAlta()||!dvt.Agent.isEnvironmentBrowser())a=!0;a?(this.setAlpha(1),this.setScaleY(1)):(this.setAlpha(0),this.setScaleY(.001));this.setVisible(!0);var b;a||(b=new dvt.Animator(this.getCtx(),DvtSearchResultsPanel._ANIM_DURATION),b.addProp(dvt.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,1),b.addProp(dvt.Animator.TYPE_NUMBER,this,this.getScaleY,this.setScaleY,1));this._bFetchFired=!1;return b};
DvtSearchResultsPanel.prototype.hide=function(){if(this.IsSkinAlta())return this.setAlpha(0),this.setScaleY(.001),this.MakeHidden(),null;var a=new dvt.Animator(this.getCtx(),DvtSearchResultsPanel._ANIM_DURATION);a.addProp(dvt.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,0);a.addProp(dvt.Animator.TYPE_NUMBER,this,this.getScaleY,this.setScaleY,.001);dvt.Playable.appendOnEnd(a,this.MakeHidden,this);return a};DvtSearchResultsPanel.prototype.MakeHidden=function(){this.setVisible(!1)};
DvtSearchResultsPanel.prototype.setItems=function(a){this._actualItemCount=0;a&&(this._actualItemCount=a.length);this.SetItemsHelper(a);this._items&&this.RenderSelf()};DvtSearchResultsPanel.prototype.SetItemsHelper=function(a){(this._items=a)&&0>this._total&&(a=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this._items[0]),a=new dvt.Rect(this.getCtx(),0,0,a.w,a.h),a.setInvisibleFill(),this._items.push(a))};
DvtSearchResultsPanel.prototype.getItems=function(){return 0>this._total&&this._items?this._items.slice(0,this._items.length-2):this._items};DvtSearchResultsPanel.prototype.getWidth=function(){return this._origWidth};DvtSearchResultsPanel.prototype.getHeight=function(){return this._origHeight};DvtSearchResultsPanel.prototype.getSkinName=function(){return this._skinName};
DvtSearchResultsPanel.prototype.setSkinName=function(a){this._skinName=a;this.IsSkinAlta()&&(this._textColor="#737373",this._textFont='"Helvetica Neue", Helvetica, Arial, sans-serif',this._textWeight="bold",this._textSize=12,this._titleBarHeight=32,this._closeButtonHeight=this._closeButtonWidth=13)};DvtSearchResultsPanel.prototype.IsSkinSkyros=function(){return this._skinName==dvt.CSSStyle.SKIN_SKYROS};DvtSearchResultsPanel.prototype.IsSkinAlta=function(){return this._skinName==dvt.CSSStyle.SKIN_ALTA};
DvtSearchResultsPanel.prototype.GetTitleText=function(){var a="";this._titleResource&&(a="0",0>this._total?a=String(this._actualItemCount)+"+":this._items&&(a=String(this._actualItemCount)),a=dvt.Bundle.format(this._titleResource,[a]));return a};DvtSearchResultsPanel.prototype.GetEmptyText=function(){return this._emptyText};DvtSearchResultsPanel.prototype.getCloseButton=function(){return this._closeButton};
DvtSearchResultsPanel.prototype.RenderSelf=function(){var a=this.CreateTitleBar(this._minWidth);this.addChild(a);var b=a.getDimensions(),c=null;if(this._items&&0<this._items.length){var d=b.w;this.IsSkinAlta()&&(d-=dvt.ItemList._ALTA_PADDING,c=this.CalcMaxItemListHeight(),(dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this._items[0]).h+2*dvt.ItemList._ALTA_PADDING)*this._items.length>c&&(d-=DvtScrollableContainer.DEFAULT_ALTA_SCROLLBAR_WIDTH));c=this.CreateItemList(d)}else c=this.CreateEmptyItemList(b.w);
d=c.getDimensions();d=Math.max(d.w,this._minWidth);if(b.w!=d){var e=this.getChildIndex(a);this.removeChild(a);a.destroy&&a.destroy();a=this.CreateTitleBar(d);this.addChildAt(a,e)}a=this.MakeSeparator(d,1);a.setTranslateY(b.h);this.addChild(a);b=a.getDimensions();c.setTranslateY(a.getTranslateY()+b.h);b=this.getDimensions();a=new dvt.Rect(this.getCtx(),0,0,b.w,b.h);a.setSolidFill("#ffffff");this.SetPanelLineStyle(a);this.addChildAt(a,0);this._origWidth=d;0<this._maxWidth&&this._maxWidth<d&&(this._origWidth=
this._maxWidth);this._origHeight=b.h;0<this._maxHeight&&this._maxHeight<b.h&&(this._origHeight=this._maxHeight);this.setAlpha(0);this.setVisible(!1);this._popupMenu&&(b=this._popupMenu.getFocusIndex(),-1<b&&(this._popupMenu.setFocusIndex(b,!0),this.ScrollFocusItemIntoView()));this._selectedIndex=this._lastVisIndex=this._firstVisIndex=-1};
DvtSearchResultsPanel.prototype.CreateTitleBar=function(a){var b=new dvt.Rect(this.getCtx(),0,0,1,1),c=3,d=5;this.IsSkinAlta()&&(d=c=dvt.SearchPanel._ALTA_CONTENT_PADDING,b.setFill(null));this._closeButton=this.CreateCloseButton();this._titleTextField=this.CreateTitleTextField(this.GetTitleText());var e=this._titleTextField.measureDimensions();if(0>a||e.w>a)a=c+e.w+c+this._closeButtonWidth+d;dvt.Agent.isRightToLeft(this.getCtx())?this._titleTextField.setTranslateX(a-c-e.w):this._titleTextField.setTranslateX(c);
this._titleTextField.setTranslateY((this._titleBarHeight-e.h)/2);b.addChild(this._titleTextField);dvt.Agent.isRightToLeft(this.getCtx())?this._closeButton.setTranslateX(d):this._closeButton.setTranslateX(a-d-this._closeButtonWidth);this._closeButton.setTranslateY((this._titleBarHeight-this._closeButtonHeight)/2);b.addChild(this._closeButton);this.RenderTitleBarBackground(b,0,0,a,this._titleBarHeight);this._titleBarWidth=a;return b};
DvtSearchResultsPanel.prototype.HandleCloseClick=function(a){(a=this.hide())?(dvt.Playable.appendOnEnd(a,this.FireSearchResultsClearEvent,this),a.play()):this.FireSearchResultsClearEvent()};DvtSearchResultsPanel.prototype.CreateCloseButton=function(){var a=dvt.ButtonLAFUtils.createClearResultsButton(this.getCtx(),this._imageURIs),b=this;this._eventManager.associate(a,{HandleClick:function(a){b.HandleCloseClick(a)},getTooltip:function(){return b._closeTooltip}});return a};
DvtSearchResultsPanel.prototype.CreateTitleTextField=function(a){a=new dvt.OutputText(this.getCtx(),a);a.setSolidFill(this._textColor);a.setFontSize(this._textSize);var b=new dvt.CSSStyle(dvt.CSSStyle.FONT_FAMILY+":"+this._textFont+";"+dvt.CSSStyle.FONT_WEIGHT+":"+this._textWeight+";");a.setCSSStyle(b);a.setMouseEnabled(!1);return a};
DvtSearchResultsPanel.prototype.CreateEmptyItemList=function(a){var b=this.CalcMaxItemListWidth(),c=this.CalcMaxItemListHeight();this._scrollableContainer=new DvtScrollableContainer(this.getCtx(),a,0,b,c,0,this.getSkinName());this._scrollableContainer.setStyleMap(this._styleMap);this.addChild(this._scrollableContainer);b=this.CreateTitleTextField(this.GetEmptyText());b.setTranslate(4,4);var c=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),b),d=new dvt.Rect(this.getCtx(),0,0,c.w+8,c.h+8);d.setFill(null);
d.addChild(b);this._scrollableContainer.addChild(d);dvt.Agent.isRightToLeft(this.getCtx())&&b.setTranslateX(Math.max(a-4-c.w),0);return this._scrollableContainer};
DvtSearchResultsPanel.prototype.CreateItemList=function(a){this._popupMenu=this.CreatePopupMenu(a);var b=this.CalcMaxItemListWidth(),c=this.CalcMaxItemListHeight(),d=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this._popupMenu),e=d.h;if(-1<this._firstVisIndex&&-1<this._lastVisIndex&&this._lastVisIndex>=this._firstVisIndex)for(var e=0,f=this._firstVisIndex;f<=this._lastVisIndex;f++)var g=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),this._popupMenu.getItem(f)),e=e+g.h;0>this._total&&
(f=null,0<this._popupMenu.getNumItems()&&(f=this._popupMenu.getItem(this._popupMenu.getNumItems()-1)),f&&(f=dvt.DisplayableUtils.getDimensionsForced(this.getCtx(),f),e-f.h-1<=c&&d.h==e&&(c=e-f.h-1)));this._scrollableContainer=new DvtScrollableContainer(this.getCtx(),a,0,b,c,0,this.getSkinName());this._scrollableContainer.setStyleMap(this._styleMap);this.addChild(this._scrollableContainer);this._scrollableContainer.addChild(this._popupMenu);this._scrollableContainer.hasVerticalScrollbar()&&(-1<this._firstVisIndex&&
this._scrollableContainer.setVerticalThumbPosition(this._popupMenu.getItem(this._firstVisIndex).getTranslateY()),this._scrollableContainer.addEvtListener(dvt.ScrollEvent.SCROLL_EVENT,this.HandleVertScroll,!1,this));this._contentWidth=this._scrollableContainer.getDimensions().w;return this._scrollableContainer};DvtSearchResultsPanel.prototype.CreateAfContext=function(){var a=new dvt.AfContext(this.getCtx(),this._eventManager);a.setSkinName(this._skinName);return a};
DvtSearchResultsPanel.prototype.CreateContentPGL=function(a,b,c){b=new dvt.Rect(this.getCtx(),0,0,Math.ceil(b),Math.ceil(c));c=new dvt.SolidStroke("#000000",0,0);b.setInvisibleFill();b.setStroke(c);b.addChild(a);return b};
DvtSearchResultsPanel.prototype.HandleVertScroll=function(a){if(null!=a.getY()&&(this.FetchAdditionalResults(),!this._bFetchFired&&this._popupMenu&&!dvt.Agent.isTouchDevice())){var b=this._scrollableContainer.getDimensions(),c=this._popupMenu.getClosestItemIndex(a.getY());a=this._popupMenu.getClosestItemIndex(a.getY()+b.h-1);b=this._popupMenu.getFocusIndex();this.FireSearchResultsScrollEvent(c,a,b)}};
DvtSearchResultsPanel.prototype.FetchAdditionalResults=function(){if(!this._bFetchFired&&0>this._total&&this._popupMenu){var a=this._popupMenu.getItem(this._popupMenu.getNumItems()-1);if(a){var b=this._scrollableContainer.getVerticalContentPosition(),c=this._scrollableContainer.getDimensions();a.getTranslateY()+b<=c.h&&(this._bFetchFired=!0,this.FireFetchEvent(this._popupMenu.getNumItems()-2,dvt.SearchEvent.DIR_NEXT))}}};
DvtSearchResultsPanel.prototype.FireScrollEvent=function(a){if(!this._bFetchFired&&this._popupMenu&&!dvt.Agent.isTouchDevice()){var b=0,c=this._popupMenu.getNumItems()-1;this._scrollableContainer.hasVerticalScrollbar()&&(c=this._scrollableContainer.getDimensions(),b=this._popupMenu.getClosestItemIndex(this._scrollableContainer.getVerticalThumbPosition()),c=this._popupMenu.getClosestItemIndex(this._scrollableContainer.getVerticalThumbPosition()+c.h-1));this.FireSearchResultsScrollEvent(b,c,a)}};
DvtSearchResultsPanel.prototype.getFocusItemIndex=function(){return this._popupMenu?this._popupMenu.getFocusIndex():-1};DvtSearchResultsPanel.prototype.setFocusItemIndex=function(a){this._popupMenu&&(this._popupMenu.setFocusIndex(a),this.ScrollFocusItemIntoView())};DvtSearchResultsPanel.prototype.FireEvent=function(a,b){this._callback&&this._callback.call(this._callbackObj,a,b)};
DvtSearchResultsPanel.prototype.FireFetchEvent=function(a,b){var c=new dvt.SearchEvent(dvt.SearchEvent.SEARCH_RESULTS_FETCH_EVENT);c.addParam(dvt.SearchEvent.PARAM_INDEX,a);c.addParam(dvt.SearchEvent.PARAM_DIRECTION,b);this.FireEvent(c)};
DvtSearchResultsPanel.prototype.FireSearchResultsScrollEvent=function(a,b,c){var d=new dvt.SearchEvent(dvt.SearchEvent.SEARCH_RESULTS_SCROLL_EVENT);d.addParam(dvt.SearchEvent.PARAM_FIRST_VIS_INDEX,a);d.addParam(dvt.SearchEvent.PARAM_LAST_VIS_INDEX,b);d.addParam(dvt.SearchEvent.PARAM_SELECTED_INDEX,c);this.FireEvent(d)};
DvtSearchResultsPanel.prototype.FireSearchResultSelectedEvent=function(a){var b=new dvt.SearchEvent(dvt.SearchEvent.SEARCH_RESULTS_SELECTED_EVENT);b.addParam(dvt.SearchEvent.PARAM_INDEX,a);this.FireEvent(b)};DvtSearchResultsPanel.prototype.FireSearchResultsClearEvent=function(){var a=new dvt.SearchEvent(dvt.SearchEvent.SEARCH_RESULTS_CLEAR_EVENT);this.FireEvent(a)};
DvtSearchResultsPanel.prototype.CreatePopupMenu=function(a){this._popupMenuMinWidth=a;a=new dvt.ItemList(this.getCtx(),this._items,a,!1,this.PopupBackgroundStyle,this,this.HandlePopupMenu,this);this.IsSkinAlta()&&(a.setHoverColor("#ebeced"),a.setFocusColor("#CFE8FC"),a.setAltaSkin(!0));a.renderComponent();-1<this._selectedIndex&&(this.addChild(a),a.setFocusIndex(this._selectedIndex),this.removeChild(a));a.setInteractionModel(dvt.ItemList.INT_MODEL_DOUBLE_CLICK);return a};
DvtSearchResultsPanel.prototype.PopupBackgroundStyle=function(a){a.setInvisibleFill()};DvtSearchResultsPanel.prototype.HandlePopupMenu=function(a){a.type==DvtItemListEvent.TYPE_SELECTION?this.FireSearchResultSelectedEvent(a.getIndex()):a.type==DvtItemListEvent.TYPE_FOCUS&&this.FireScrollEvent(a.getIndex())};DvtSearchResultsPanel.prototype.CalcMaxItemListWidth=function(){return 0<this._maxWidth?this._maxWidth:Number.MAX_VALUE};
DvtSearchResultsPanel.prototype.CalcMaxItemListHeight=function(){return 0<this._maxHeight?this._maxHeight-this._titleBarHeight:Number.MAX_VALUE};
DvtSearchResultsPanel.prototype.handleKeyboardEvent=function(a){var b,c,d=!0;if(a.keyCode==dvt.KeyboardEvent.TAB)if(this._popupMenu){b=this._popupMenu.getFocusIndex();if(!b||0>b)b=0;b=this._popupMenu.getItemAt(b);this._eventManager.UpdateActiveElement(b,b);a.target=b;this._popupMenu.HandleClick(a)}else d=!1;else if(a.keyCode==dvt.KeyboardEvent.ENTER)null!=this._popupMenu&&(b=this._popupMenu.getFocusIndex(),c=this._popupMenu.getNumItems(),0<c&&0<=b&&b<c&&(a.target=this._popupMenu.getItemAt(b),this._popupMenu.HandleDblClick(a)));
else if((a.keyCode==dvt.KeyboardEvent.DOWN_ARROW||a.keyCode==dvt.KeyboardEvent.UP_ARROW)&&null!=this._popupMenu){a=a.keyCode==dvt.KeyboardEvent.DOWN_ARROW;var e=-1;b=this._popupMenu.getFocusIndex();c=this._popupMenu.getNumItems();0<c&&(a?0>b?e=0:b<c-1&&(e=b+1):0>b?e=0>this._total?c-2:c-1:0<b&&(e=b-1));0<=e&&(this._popupMenu.setFocusIndex(e),this.ScrollFocusItemIntoView(),b=this._popupMenu.getItemAt(e),this._eventManager.UpdateActiveElement(b,b))}return d};
DvtSearchResultsPanel.prototype.ScrollFocusItemIntoView=function(){var a=this._popupMenu.getFocusIndex(),b=this._popupMenu.getItemAt(a),c=this._scrollableContainer.hasVerticalScrollbar();if(!(null==b||0>a)&&c){var c=b.getTranslateY(),b=b.getHeight(),d=this._scrollableContainer.getDimensions(),e=Math.abs(this._scrollableContainer.getVerticalContentPosition()),c=c-e;0>c?(this.IsSkinAlta()&&(c-=dvt.ItemList._ALTA_PADDING),this._scrollableContainer.setVerticalContentPosition(-(e+c))):c+b>d.h&&(c+=b-d.h,
this.IsSkinAlta()&&(c+=dvt.ItemList._ALTA_PADDING),this._scrollableContainer.setVerticalContentPosition(-(e+c)),this.FetchAdditionalResults());this.FireScrollEvent(a)}};DvtSearchResultsPanel.prototype.DestroyPopupMenu=function(a){a&&a.destroy&&a.destroy()};
DvtSearchResultsPanel.prototype.DestroyScrollablePGL=function(){this._scrollableContainer&&(this._scrollableContainer.hasVerticalScrollbar()&&this._scrollableContainer.removeEvtListener(dvt.ScrollEvent.SCROLL_EVENT,this.HandleVertScroll,!1,this),this._scrollableContainer.destroy&&this._scrollableContainer.destroy(),this._scrollableContainer=null)};
DvtSearchResultsPanel.prototype.destroy=function(){this.DestroyScrollablePGL();this._contentPGL&&this._contentPGL.destroy&&this._contentPGL.destroy();this._contentPGL=null;this.DestroyPopupMenu(this._popupMenu);this._popupMenu=null};DvtSearchResultsPanel.LoadIcon=function(a,b){return null};DvtSearchResultsPanel.prototype.RenderTitleBarBackground=function(a,b,c,d,e){this.SetPanelLineAndFill(a,b,c,d,e);a.setX(b);a.setY(c);a.setWidth(d);a.setHeight(e)};
DvtSearchResultsPanel.prototype.SetPanelLineStyle=function(a){this.IsSkinAlta()||a.setSolidStroke(this._borderColor,.2)};DvtSearchResultsPanel.prototype.SetPanelFillStyle=function(a,b,c,d,e){if(this.IsSkinSkyros()&&this._bgColor)b=new dvt.SolidFill(this._bgColor);else{var f=["#C1D0D7","#FFFFFF"],g=[1,1],h=[0,230/255],k=-90;this.IsSkinAlta()&&(f=["#e6e9ec","#edeff1"],g=[1,1],h=[0,1],k=90);b=new dvt.LinearGradientFill(k,f,g,h,[b,c,d,e]);a.setFill(b)}a.setFill(b)};
DvtSearchResultsPanel.prototype.SetPanelLineAndFill=function(a,b,c,d,e){this.IsSkinAlta()||(this.SetPanelLineStyle(a),this.SetPanelFillStyle(a,b,c,d,e))};
DvtSearchResultsPanel.prototype.MakeSeparator=function(a,b){var c=new dvt.Container(this.getCtx());if(this.IsSkinAlta()){var d=new dvt.Path(this.getCtx(),["M",0,0,"L",a,0]);d.setSolidStroke("#D9DFE3",1,b);c.addChild(d)}else{d=new dvt.Path(this.getCtx(),["M",0,0,"L",a,0]);d.setSolidStroke("#96A8BA",1,b);var e=new dvt.Path(this.getCtx(),["M",0,b,"L",a,b]);e.setSolidStroke("#FFFFFF");c.addChild(d);c.addChild(e)}return c};
DvtSearchResultsPanel.prototype.getDimensions=function(a){var b=this._scrollableContainer.getDimensions();b&&(b.h+=b.y+this._scrollableContainer.getTranslateY(),this._titleBarWidth&&(b.w=Math.max(b.w,this._titleBarWidth)));return a&&b?this.ConvertCoordSpaceRect(b,a):b};DvtSearchResultsPanel.prototype.getEventManager=function(){return this._eventManager};
DvtSearchResultsPanel.prototype.getAfComponent=function(a,b){var c=this.getItems();return c&&a<c.length?(c=dvt.AfComponentFactory.getAfComponent(c[a]),dvt.AfComponentFactory.findAfComponent(c,b)):null};DvtSearchResultsPanel.prototype.getActualItemCount=function(){return this._actualItemCount};
})(dvt);
