function AdfDhtmlNoteWindowPopupSelector(a){this.Init(a)}AdfObject.createSubclass(AdfDhtmlNoteWindowPopupSelector,AdfDhtmlPopupSelector);
AdfDhtmlNoteWindowPopupSelector.InitClass=function(){this._STYLE_CLASS="AFNoteWindow";this._RIGHT_STYLE_CLASS="AFNoteWindowRight";this._CONE_STYLE_CLASS="AFNoteWindowCone";this._CONE_STYLE_CLASS_TR="AFNoteWindowConeTR";this._CONE_STYLE_CLASS_BR="AFNoteWindowConeBR";this._CONE_STYLE_CLASS_BL="AFNoteWindowConeBL";this._CONE_BORDER_STYLE_CLASS="AFNoteWindowConeBorder";this._CONE_BORDER_RIGHT_STYLE_CLASS="AFNoteWindowConeBorderRight";this._CONTENT_STYLE_CLASS="AFNoteWindowContent";this._CONTENT_END_ID=
"endContent"};AdfDhtmlNoteWindowPopupSelector.prototype.Init=function(a){AdfDhtmlNoteWindowPopupSelector.superclass.Init.call(this);this._autoDismissType=a;this.setShadowAnchor(this.GetContentParent())};
AdfDhtmlNoteWindowPopupSelector.prototype.setAccessibleAttrs=function(a){var b=this.getElement();b.setAttribute("role","tooltip");var d=null,d=null;a&&((d=a[AdfDhtmlPopupHints.ALIGN_ELEMENT])?d.setAttribute("aria-describedby",b.id):(d=a[AdfRichPopup.HINT_LAUNCH_ID])&&(a=AdfAgent.AGENT.getElementById(d))&&a.setAttribute("aria-describedby",b.id))};
AdfDhtmlNoteWindowPopupSelector.prototype.announceOpeningViaLiveRegion=function(a){a=AdfPage.PAGE.getLookAndFeel();var b=AdfPage.PAGE.getDocumentClientId(),b=AdfRichUIPeer.CreateSubId(b,AdfDhtmlDocumentPeer._GLOBAL_LIVE_CONTAINER_ID),b=AdfAgent.AGENT.getElementById(b),d=AdfPage.PAGE.getDomWindow().AdfSafariMobileAgent&&AdfAgent.AGENT instanceof AdfSafariMobileAgent?"AFTooltipLiveTextMobile":"AFTooltipLiveText";a=a.getTranslatedString(d);AdfAgent.AGENT.setTextContent(b,a)};
AdfDhtmlNoteWindowPopupSelector.prototype.removeAccessibleAttrs=function(){var a=this.getAlignElement();a?a.removeAttribute("aria-describedby"):(a=this.getLaunchSourceId())&&(a=AdfAgent.AGENT.getElementById(a))&&a.removeAttribute("aria-describedby");a=AdfPage.PAGE.getDocumentClientId();a=AdfRichUIPeer.CreateSubId(a,AdfDhtmlDocumentPeer._GLOBAL_LIVE_CONTAINER_ID);a=AdfAgent.AGENT.getElementById(a);AdfAgent.AGENT.setTextContent(a,"")};
AdfDhtmlNoteWindowPopupSelector.prototype.show=function(a){var b=null;a&&(b=a[AdfRichPopup.HINT_LAUNCH_ID]);b&&null==AdfAgent.AGENT.getElementById(b)&&(AdfLogger.LOGGER.warning("Attempting to show noteWindow but lauch element is not present."),b=a[AdfRichPopup.HINT_LAUNCH_ID]=null);b&&(a[AdfDhtmlPopupHints.ALIGN_ELEMENT]||(a[AdfRichPopup.HINT_ALIGN_ID]=b,a[AdfDhtmlPopupHints.ALIGN_ELEMENT]=AdfAgent.AGENT.getElementById(b)),b=AdfPage.PAGE.findComponent(b))&&(b.addEventListener(AdfUIInputEvent.KEY_UP_EVENT_TYPE,
this._launchSourceHandleComponentKeyUp,this),b.addEventListener(AdfUIInputEvent.KEY_DOWN_EVENT_TYPE,this._launchSourceHandleComponentKeyDown,this));AdfDhtmlNoteWindowPopupSelector.superclass.show.call(this,a)};
AdfDhtmlNoteWindowPopupSelector.prototype.hide=function(){var a=AdfPage.PAGE,b=this.getLaunchSourceId();b&&(a=a.findComponent(b))&&(a.removeEventListener(AdfUIInputEvent.KEY_UP_EVENT_TYPE,this._launchSourceHandleComponentKeyUp,this),a.removeEventListener(AdfUIInputEvent.KEY_DOWN_EVENT_TYPE,this._launchSourceHandleComponentKeyDown,this));AdfDhtmlNoteWindowPopupSelector.superclass.hide.call(this)};
AdfDhtmlNoteWindowPopupSelector.createTextDom=function(a){var b=null;0==a.indexOf("\x3chtml\x3e")&&a.lastIndexOf("\x3c/html\x3e")==a.length-7?b=AdfDomUtils.cleanHtml(AdfPage.PAGE.getDocument(),a.substring(6,a.length-7)):(b=AdfPage.PAGE.getDocument().createElement("div"),AdfAgent.AGENT.setTextContent(b,a));return b};
AdfDhtmlNoteWindowPopupSelector.prototype.CreateDomElement=function(){var a=AdfAgent.AGENT,b=AdfPage.PAGE,d=b.getDomDocument(),e=d.createElement("div"),f=this.CreateTable(1,3);f.role="presentation";e.appendChild(f);var f=f.rows[0].cells,g=f[0],h=f[2];g.onclick=h.onclick=this.createCallback(this._onClickConeCell);a.addBubbleEventListener(g,"focusin",AdfAgent.eatEventCallback);a.addBubbleEventListener(g,"focus",AdfAgent.eatEventCallback);a.addBubbleEventListener(h,"focusin",AdfAgent.eatEventCallback);
a.addBubbleEventListener(h,"focus",AdfAgent.eatEventCallback);this._autoDismissType==AdfDhtmlPopupHints.AUTODISMISS_MOUSEOUT&&(g.onmouseover=h.onmouseover=this.createCallback(this._onMouseOverConeCell),g.onmouseout=h.onmouseout=this.createCallback(this._onMouseOutConeCell));a=f[1];this.NeedsCloseLink()&&(a=d.createElement("div"),f[1].appendChild(a),b=b.getLookAndFeel().getTranslatedString("af_popup.TIP_DISMISS"),a.innerHTML='\x3ca href\x3d"javascript:;" style\x3d"position:absolute;top:-990px;" onclick\x3d"AdfPage.PAGE.getAutoDismissalManager().dismiss()"\x3e'+
b+"\x3c/a\x3e",b=d.createElement("div"),f[1].appendChild(b),a=b);f[2].className="";f[2].innerHTML="\x26#160;";f[1].className=AdfDhtmlNoteWindowPopupSelector._STYLE_CLASS;f[0].className=AdfDhtmlNoteWindowPopupSelector._CONE_BORDER_STYLE_CLASS;this._coneElement=d.createElement("div");this.SetContentParent(a);return e};AdfDhtmlNoteWindowPopupSelector.prototype.GetAnimationDurationSkinProperty=function(){return".AFNoteWindow-tr-open-animation-duration"};
AdfDhtmlNoteWindowPopupSelector.prototype.GetAnimateSkinProperty=function(){return".AFNoteWindow-tr-animate"};
AdfDhtmlNoteWindowPopupSelector.prototype.setPosition=function(a,b){var d=this.GetPositionManagerIndex();if(0<=d&&(d=AdfPage.PAGE.getPositionManager().getComputedBehavior(d))){var e=d.verticalBehavior.floatingElementAnchor,f=d.horizontalBehavior.floatingElementAnchor,d=this.GetContentParent().parentNode.parentNode.parentNode,d="TABLE"==d.tagName?d.rows[0].cells:d.parentNode.rows[0].cells,g=d[1],f=f==AdfDhtmlPositionManager.RIGHT,e=e==AdfDhtmlPositionManager.BOTTOM,h=0,k=2;AdfPage.PAGE.getLocaleContext().isRightToLeft()?
(h=d[2],k=d[0]):(h=d[0],k=d[2]);f?(h.className="",h.innerHTML="\x26#160;",g.className=AdfDhtmlNoteWindowPopupSelector._RIGHT_STYLE_CLASS,k.className=AdfDhtmlNoteWindowPopupSelector._CONE_BORDER_RIGHT_STYLE_CLASS,k.style.verticalAlign=e?"bottom":"top",this._coneElement.className=e?AdfDhtmlNoteWindowPopupSelector._CONE_STYLE_CLASS_BR:AdfDhtmlNoteWindowPopupSelector._CONE_STYLE_CLASS_TR,k.innerHTML="",k.appendChild(this._coneElement)):(k.className="",k.innerHTML="\x26#160;",g.className=AdfDhtmlNoteWindowPopupSelector._STYLE_CLASS,
h.className=AdfDhtmlNoteWindowPopupSelector._CONE_BORDER_STYLE_CLASS,h.style.verticalAlign=e?"bottom":"top",this._coneElement.className=e?AdfDhtmlNoteWindowPopupSelector._CONE_STYLE_CLASS_BL:AdfDhtmlNoteWindowPopupSelector._CONE_STYLE_CLASS,h.innerHTML="",h.appendChild(this._coneElement))}AdfDhtmlNoteWindowPopupSelector.superclass.setPosition.call(this,a,b)};
AdfDhtmlNoteWindowPopupSelector.prototype._onClickConeCell=function(a){var b=AdfAgent.AGENT;a=a||b.getDomWindow().event;var d=b.getMousePosition(a);AdfPage.PAGE.getAutoDismissalManager().dismiss(this.getElement().parentNode);var e=AdfPage.PAGE.getDocument();if(d=e.elementFromPoint?e.elementFromPoint(d.x,d.y):b.elementFromPagePoint(d.x,d.y))e=b.copyEvent(a),b.dispatchEvent(d,e),null!=d.focus&&AdfFocusUtils.focusElement(d),b.eatEvent(a)};
AdfDhtmlNoteWindowPopupSelector.prototype._onMouseOverConeCell=function(a){this._onMOConeCellTimeoutCallback||(this._onMOConeCellTimeoutCallback=this.createCallback(this._onMOConeCellTimeout));a=AdfPage.PAGE.getDomWindow();this._mouseOverTimeout&&a.clearTimeout(this._mouseOverTimeout);this._mouseOverTimeout=a.setTimeout(this._onMOConeCellTimeoutCallback,500)};AdfDhtmlNoteWindowPopupSelector.prototype._onMOConeCellTimeout=function(){delete this._mouseOverTimeout;AdfPage.PAGE.getAutoDismissalManager().dismiss(this.getElement().parentNode)};
AdfDhtmlNoteWindowPopupSelector.prototype._onMouseOutConeCell=function(a){a=AdfPage.PAGE.getDomWindow();this._mouseOverTimeout&&(a.clearTimeout(this._mouseOverTimeout),delete this._mouseOverTimeout)};AdfDhtmlNoteWindowPopupSelector.prototype.activate=function(){var a=this.GetFocusOnOpen();this.SetFocusOnOpen(!0);this.FocusOnFirstElement();this.SetFocusOnOpen(a)};
AdfDhtmlNoteWindowPopupSelector.prototype.HandleKeyNavigation=function(a){var b=this.getLaunchSourceId();if(b){var d=AdfAgent.AGENT;if(b=AdfPage.PAGE.findComponent(b))b.focus(),d.eatEvent(a)}};AdfDhtmlNoteWindowPopupSelector.prototype._launchSourceHandleComponentKeyDown=function(a){a.isCanceled()||a.getKeyCode()!=AdfKeyStroke.F6_KEY||(AdfAgent.AGENT.preventDefault(a.getNativeEvent()),this.activate&&(this.activate(),a.cancel(),a.stopBubbling()))};
AdfDhtmlNoteWindowPopupSelector.prototype._launchSourceHandleComponentKeyUp=function(a){if(!a.isCanceled()){var b=a.getNativeEvent(),d=a.getKeyCode();b.ctrlKey&&b.altKey&&d==AdfKeyStroke.W_KEY&&this.activate&&(this.activate(),a.cancel(),a.stopBubbling())}};
AdfDhtmlNoteWindowPopupSelector.prototype.autoSize=function(){AdfDhtmlNoteWindowPopupSelector.superclass.autoSize.call(this);var a=this.GetMaxWidth();if(a&&this.getWidth()>=a){var b=this.getContent();if(b=AdfDomUtils.getFirstElementMatch(b,!1,AdfDhtmlNoteWindowPopupSelector._match)){b=b.style;b.overflow="hidden";var d=this._coneElement;AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM&&d&&(b.width=a-d.offsetWidth+"px")}}};
AdfDhtmlNoteWindowPopupSelector._match=function(a){return"DIV"==a.tagName&&AdfDomUtils.containsCSSClassName(a,AdfDhtmlNoteWindowPopupSelector._CONTENT_STYLE_CLASS)?!0:!1};AdfDhtmlNoteWindowPopupSelector._focusMatch=function(a){return"DIV"==a.tagName&&(a=AdfAgent.AGENT.getComputedStyle(a))&&"hidden"!=a.visibility&&"none"!=a.display?!0:!1};AdfDhtmlNoteWindowPopupSelector.prototype.GetFocusContent=function(){var a=this.getContent();return AdfDomUtils.getFirstElementMatch(a,!1,AdfDhtmlNoteWindowPopupSelector._focusMatch)};