function $AdfMenuUtils$$() {
}
$goog$exportSymbol$$("AdfMenuUtils", $AdfMenuUtils$$);
$goog$exportSymbol$$("AdfMenuUtils", $AdfMenuUtils$$);
$AdfObject$$.$createSubclass$($AdfMenuUtils$$);
$AdfMenuUtils$$.$InitClass$ = function $$AdfMenuUtils$$$$InitClass$$() {
  $AdfMenuUtils$$.$SELECTED_STYLE_CLASS$ = "p_AFSelected";
  $goog$exportSymbol$$("AdfMenuUtils.SELECTED_STYLE_CLASS", $AdfMenuUtils$$.$SELECTED_STYLE_CLASS$);
  this.$HIGHLIGHTED_STYLE_CLASS$ = "p_AFHighlighted";
  $goog$exportSymbol$$("AdfMenuUtils.HIGHLIGHTED_STYLE_CLASS", $AdfMenuUtils$$.$HIGHLIGHTED_STYLE_CLASS$);
  this.$FOCUSED_STYLE_CLASS$ = "p_AFFocused";
  $goog$exportSymbol$$("AdfMenuUtils.FOCUSED_STYLE_CLASS", $AdfMenuUtils$$.$FOCUSED_STYLE_CLASS$);
  this.$DEPRESSED_STYLE_CLASS$ = "p_AFDepressed";
  $goog$exportSymbol$$("AdfMenuUtils.DEPRESSED_STYLE_CLASS", $AdfMenuUtils$$.$DEPRESSED_STYLE_CLASS$);
  this.$DETACHED_STYLE_CLASS$ = "p_AFDetached";
  $goog$exportSymbol$$("AdfMenuUtils.DETACHED_STYLE_CLASS", $AdfMenuUtils$$.$DETACHED_STYLE_CLASS$);
  this.$MENU_DEPTH_KEY$ = "_afrDth";
  $goog$exportSymbol$$("AdfMenuUtils.MENU_DEPTH_KEY", $AdfMenuUtils$$.$MENU_DEPTH_KEY$);
  this.$OVERFLOW_KEY$ = "_afrOflw";
  $goog$exportSymbol$$("AdfMenuUtils.OVERFLOW_KEY", $AdfMenuUtils$$.$OVERFLOW_KEY$);
  this.$OVERFLOW_CELL_STYLE_CLASS$ = "AFMenuBarOverflowCell";
  $goog$exportSymbol$$("AdfMenuUtils.OVERFLOW_CELL_STYLE_CLASS", $AdfMenuUtils$$.$OVERFLOW_CELL_STYLE_CLASS$);
  this.$AFR_TARGETROWCURRENCY$ = "_afrTargetRowCurrency";
  $goog$exportSymbol$$("AdfMenuUtils.AFR_TARGETROWCURRENCY", $AdfMenuUtils$$.$AFR_TARGETROWCURRENCY$);
  this.$AFR_TARGETCOMPONENTID$ = "_afrTargetComponentId";
  $goog$exportSymbol$$("AdfMenuUtils.AFR_TARGETCOMPONENTID", $AdfMenuUtils$$.$AFR_TARGETCOMPONENTID$);
  this.$_sOpenedMenus$ = []
};
$goog$exportSymbol$$("AdfMenuUtils.InitClass", $AdfMenuUtils$$.$InitClass$);
$AdfMenuUtils$$.$isOnMenuBar$ = function $$AdfMenuUtils$$$$isOnMenuBar$$($component$$1766_parent$$71$$) {
  return $component$$1766_parent$$71$$ instanceof AdfRichMenuBar ? $JSCompiler_alias_TRUE$$ : ($component$$1766_parent$$71$$ = $component$$1766_parent$$71$$.getParent()) && $component$$1766_parent$$71$$ instanceof AdfRichMenuBar
};
$goog$exportSymbol$$("AdfMenuUtils.isOnMenuBar", $AdfMenuUtils$$.$isOnMenuBar$);
$AdfMenuUtils$$.$isInOverflow$ = function $$AdfMenuUtils$$$$isInOverflow$$($rootElement$$145$$) {
  return"true" == $rootElement$$145$$.parentNode.getAttribute($AdfMenuUtils$$.$OVERFLOW_KEY$)
};
$goog$exportSymbol$$("AdfMenuUtils.isInOverflow", $AdfMenuUtils$$.$isInOverflow$);
$AdfMenuUtils$$.$isInMenu$ = function $$AdfMenuUtils$$$$isInMenu$$($component$$1767_parent$$72$$) {
  return($component$$1767_parent$$72$$ = $component$$1767_parent$$72$$.getParent()) && $component$$1767_parent$$72$$ instanceof AdfRichMenu
};
$goog$exportSymbol$$("AdfMenuUtils.isInMenu", $AdfMenuUtils$$.$isInMenu$);
$AdfMenuUtils$$.$closeAllMenus$ = function $$AdfMenuUtils$$$$closeAllMenus$$($restoreFocus$$) {
  var $openedMenus$$ = $AdfMenuUtils$$.$_sOpenedMenus$;
  if($openedMenus$$ && 0 < $openedMenus$$.length) {
    for(var $i$$608$$ = $openedMenus$$.length - 1;0 <= $i$$608$$;$i$$608$$--) {
      var $component$$1768$$ = $AdfPage$$.$PAGE$.$findComponent$($openedMenus$$[$i$$608$$]);
      if($component$$1768$$) {
        var $peer$$158$$ = $component$$1768$$.$getPeer$();
        $peer$$158$$.bind($component$$1768$$);
        $peer$$158$$.$hidePopup$()
      }else {
        delete $openedMenus$$[$i$$608$$]
      }
    }
  }
  $restoreFocus$$ && $AdfMenuUtils$$.$restoreFocusToLastOpenedRootMenu$()
};
$goog$exportSymbol$$("AdfMenuUtils.closeAllMenus", $AdfMenuUtils$$.$closeAllMenus$);
$AdfMenuUtils$$.$GetLastOpenedRootMenuId$ = function $$AdfMenuUtils$$$$GetLastOpenedRootMenuId$$() {
  return $AdfMenuUtils$$.$_sLastOpenedRootMenuId$
};
$goog$exportSymbol$$("AdfMenuUtils.GetLastOpenedRootMenuId", $AdfMenuUtils$$.$GetLastOpenedRootMenuId$);
$AdfMenuUtils$$.$setLastOpenedRootMenuId$ = function $$AdfMenuUtils$$$$setLastOpenedRootMenuId$$($menuId$$8$$) {
  $AdfMenuUtils$$.$_sLastOpenedRootMenuId$ = $menuId$$8$$
};
$goog$exportSymbol$$("AdfMenuUtils.setLastOpenedRootMenuId", $AdfMenuUtils$$.$setLastOpenedRootMenuId$);
$AdfMenuUtils$$.$isMenuBarAutoOpenMode$ = function $$AdfMenuUtils$$$$isMenuBarAutoOpenMode$$() {
  return $AdfMenuUtils$$.$_menuBarAutoOpenMode$
};
$goog$exportSymbol$$("AdfMenuUtils.isMenuBarAutoOpenMode", $AdfMenuUtils$$.$isMenuBarAutoOpenMode$);
$AdfMenuUtils$$.$setMenuBarAutoOpenMode$ = function $$AdfMenuUtils$$$$setMenuBarAutoOpenMode$$($menuBarAutoOpenMode$$) {
  $AdfLogger$$.$LOGGER$.finest("menuBar auto open mode: " + $AdfMenuUtils$$.$_menuBarAutoOpenMode$ + " -\x3e " + $menuBarAutoOpenMode$$);
  $AdfMenuUtils$$.$_menuBarAutoOpenMode$ = $menuBarAutoOpenMode$$
};
$goog$exportSymbol$$("AdfMenuUtils.setMenuBarAutoOpenMode", $AdfMenuUtils$$.$setMenuBarAutoOpenMode$);
$AdfMenuUtils$$.$restoreFocusToLastOpenedRootMenu$ = function $$AdfMenuUtils$$$$restoreFocusToLastOpenedRootMenu$$() {
  var $focusComponent_lastOpenedRootMenuId$$ = $AdfMenuUtils$$.$_sLastOpenedRootMenuId$;
  if($focusComponent_lastOpenedRootMenuId$$ && ($focusComponent_lastOpenedRootMenuId$$ = $AdfPage$$.$PAGE$.$findComponent$($focusComponent_lastOpenedRootMenuId$$), $focusComponent_lastOpenedRootMenuId$$ != $JSCompiler_alias_NULL$$)) {
    var $rootMenuPeer$$ = $focusComponent_lastOpenedRootMenuId$$.$getPeer$(), $rootMenuDomElement$$ = $rootMenuPeer$$.$getDomElement$();
    $rootMenuPeer$$.focus($focusComponent_lastOpenedRootMenuId$$);
    $AdfMenuUtils$$.$highlightRootMenuItem$($rootMenuDomElement$$)
  }
};
$goog$exportSymbol$$("AdfMenuUtils.restoreFocusToLastOpenedRootMenu", $AdfMenuUtils$$.$restoreFocusToLastOpenedRootMenu$);
$AdfMenuUtils$$.$highlightRootMenuItem$ = function $$AdfMenuUtils$$$$highlightRootMenuItem$$($domElement$$534$$) {
  var $newHighlightedMenuItemId$$ = $domElement$$534$$.getAttribute("id"), $oldHighlightedMenuItemId$$ = $AdfMenuUtils$$.$_highlightedRootMenuItemId$;
  $oldHighlightedMenuItemId$$ && $oldHighlightedMenuItemId$$ != $newHighlightedMenuItemId$$ && $AdfMenuUtils$$.$unhighlightRootMenuItem$();
  $AdfDomUtils$$.$addCSSClassName$($domElement$$534$$, $AdfMenuUtils$$.$HIGHLIGHTED_STYLE_CLASS$);
  $AdfMenuUtils$$.$_highlightedRootMenuItemId$ = $newHighlightedMenuItemId$$
};
$goog$exportSymbol$$("AdfMenuUtils.highlightRootMenuItem", $AdfMenuUtils$$.$highlightRootMenuItem$);
$AdfMenuUtils$$.$unhighlightRootMenuItem$ = function $$AdfMenuUtils$$$$unhighlightRootMenuItem$$() {
  var $highlightedMenuItem$$ = $AdfAgent$$.$AGENT$.getElementById($AdfMenuUtils$$.$_highlightedRootMenuItemId$);
  $highlightedMenuItem$$ && $AdfDomUtils$$.$removeCSSClassName$($highlightedMenuItem$$, $AdfMenuUtils$$.$HIGHLIGHTED_STYLE_CLASS$);
  $AdfMenuUtils$$.$_highlightedRootMenuItemId$ = $JSCompiler_alias_NULL$$
};
$goog$exportSymbol$$("AdfMenuUtils.unhighlightRootMenuItem", $AdfMenuUtils$$.$unhighlightRootMenuItem$);
$AdfMenuUtils$$.$dismiss$ = function $$AdfMenuUtils$$$$dismiss$$($element$$337$$, $immediate$$5$$, $keepOpen$$) {
  var $openedMenus$$1$$ = $AdfMenuUtils$$.$_sOpenedMenus$;
  if($openedMenus$$1$$ && 0 != $openedMenus$$1$$.length) {
    for(var $i$$609$$ = $openedMenus$$1$$.length - 1;0 <= $i$$609$$;$i$$609$$--) {
      var $openedMenuComponent$$ = $AdfPage$$.$PAGE$.$findComponent$($openedMenus$$1$$[$i$$609$$]);
      if($openedMenuComponent$$) {
        var $openedMenuPeer$$ = $openedMenuComponent$$.$getPeer$();
        $openedMenuPeer$$.bind($openedMenuComponent$$);
        if($JSCompiler_StaticMethods__contains$$($openedMenuPeer$$, $element$$337$$)) {
          break
        }
        $keepOpen$$ ? $openedMenus$$1$$.pop() : ($openedMenuPeer$$.$_deselectElement$(), $immediate$$5$$ ? $openedMenuPeer$$.$hidePopup$() : $JSCompiler_StaticMethods__delayPopupHiding$$($openedMenuPeer$$, $i$$609$$))
      }else {
        delete $openedMenus$$1$$[$i$$609$$]
      }
    }
  }
};
$goog$exportSymbol$$("AdfMenuUtils.dismiss", $AdfMenuUtils$$.$dismiss$);
$AdfMenuUtils$$.$areMenusOpened$ = function $$AdfMenuUtils$$$$areMenusOpened$$() {
  return $AdfMenuUtils$$.$_sOpenedMenus$ && 0 < $AdfMenuUtils$$.$_sOpenedMenus$.length
};
$goog$exportSymbol$$("AdfMenuUtils.areMenusOpened", $AdfMenuUtils$$.$areMenusOpened$);
$AdfMenuUtils$$.$isMenuOpen$ = function $$AdfMenuUtils$$$$isMenuOpen$$($menuId$$9$$) {
  return 0 <= $AdfCollections$$.indexOf($AdfMenuUtils$$.$_sOpenedMenus$, $menuId$$9$$)
};
$goog$exportSymbol$$("AdfMenuUtils.isMenuOpen", $AdfMenuUtils$$.$isMenuOpen$);
$AdfMenuUtils$$.$addOpenMenu$ = function $$AdfMenuUtils$$$$addOpenMenu$$($menuId$$10$$) {
  $AdfMenuUtils$$.$isMenuOpen$($menuId$$10$$) || $AdfMenuUtils$$.$_sOpenedMenus$.push($menuId$$10$$)
};
$goog$exportSymbol$$("AdfMenuUtils.addOpenMenu", $AdfMenuUtils$$.$addOpenMenu$);
$AdfMenuUtils$$.$removeOpenMenu$ = function $$AdfMenuUtils$$$$removeOpenMenu$$($menuId$$11$$) {
  $AdfCollections$$.$removeArrayValue$($AdfMenuUtils$$.$_sOpenedMenus$, $menuId$$11$$)
};
$goog$exportSymbol$$("AdfMenuUtils.removeOpenMenu", $AdfMenuUtils$$.$removeOpenMenu$);
$AdfMenuUtils$$.$getContextMenuItemTargetAttrs$ = function $$AdfMenuUtils$$$$getContextMenuItemTargetAttrs$$($menuItem$$8_parent$$73$$) {
  var $targetAttrs$$2$$ = $JSCompiler_alias_NULL$$;
  for($menuItem$$8_parent$$73$$ = $menuItem$$8_parent$$73$$.getParent();$menuItem$$8_parent$$73$$ != $JSCompiler_alias_NULL$$ && ($menuItem$$8_parent$$73$$ instanceof AdfRichMenu || $menuItem$$8_parent$$73$$ instanceof AdfRichPopup);) {
    var $rowCurrency$$;
    if(($rowCurrency$$ = $menuItem$$8_parent$$73$$[$AdfMenuUtils$$.$AFR_TARGETROWCURRENCY$]) != $JSCompiler_alias_NULL$$) {
      $targetAttrs$$2$$ = {$targetRowCurrency$:$rowCurrency$$, $targetComponentId$:$menuItem$$8_parent$$73$$[$AdfMenuUtils$$.$AFR_TARGETCOMPONENTID$]};
      break
    }
    $menuItem$$8_parent$$73$$ = $menuItem$$8_parent$$73$$.getParent()
  }
  return $targetAttrs$$2$$
};
$goog$exportSymbol$$("AdfMenuUtils.getContextMenuItemTargetAttrs", $AdfMenuUtils$$.$getContextMenuItemTargetAttrs$);
$AdfMenuUtils$$.$setContextMenuItemTargetAttrs$ = function $$AdfMenuUtils$$$$setContextMenuItemTargetAttrs$$($menuItem$$9$$, $targetAttrs$$3$$) {
  var $propKeys$$ = $menuItem$$9$$.$getPropertyKeys$(), $currencyKey$$ = $AdfMenuUtils$$.$AFR_TARGETROWCURRENCY$, $componentIdKey$$1$$ = $AdfMenuUtils$$.$AFR_TARGETCOMPONENTID$;
  $propKeys$$[$currencyKey$$] == $JSCompiler_alias_NULL$$ && ($propKeys$$[$currencyKey$$] = $propKeys$$[$componentIdKey$$1$$] = {type:"String"}, $AdfRichUIPeer$$.$addSuppressedPPRAttributes$(this, $currencyKey$$, $componentIdKey$$1$$));
  $menuItem$$9$$.setProperty($componentIdKey$$1$$, $JSCompiler_alias_NULL$$);
  $menuItem$$9$$.setProperty($currencyKey$$, $JSCompiler_alias_NULL$$);
  $menuItem$$9$$.setProperty($componentIdKey$$1$$, $targetAttrs$$3$$.$targetComponentId$);
  $menuItem$$9$$.setProperty($currencyKey$$, $targetAttrs$$3$$.$targetRowCurrency$)
};
$goog$exportSymbol$$("AdfMenuUtils.setContextMenuItemTargetAttrs", $AdfMenuUtils$$.$setContextMenuItemTargetAttrs$);
$AdfMenuUtils$$.$menuItemDisabledChanged$ = function $$AdfMenuUtils$$$$menuItemDisabledChanged$$($component$$1769_parentComponent$$9$$, $domElement$$535_parentPeer$$16$$, $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$, $menuContainerElement$$) {
  if($newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$ == $JSCompiler_alias_TRUE$$) {
    $AdfDomUtils$$.$addCSSClassName$($domElement$$535_parentPeer$$16$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$);
    $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$ = $AdfMenuUtils$$.$isInMenu$($component$$1769_parentComponent$$9$$) ? $domElement$$535_parentPeer$$16$$ : $AdfDomUtils$$.$getFirstChildElement$($domElement$$535_parentPeer$$16$$);
    var $oldTabIndex$$ = $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$.getAttribute("tabIndex");
    $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$.removeAttribute("tabIndex");
    $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false");
    $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$.setAttribute("aria-disabled", "true");
    $menuContainerElement$$ && $menuContainerElement$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false");
    $AdfMenuUtils$$.$isOnMenuBar$($component$$1769_parentComponent$$9$$) && $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$535_parentPeer$$16$$, "a").removeAttribute("href");
    $oldTabIndex$$ && "0" == $oldTabIndex$$ && ($component$$1769_parentComponent$$9$$ = $component$$1769_parentComponent$$9$$.getParent(), $domElement$$535_parentPeer$$16$$ = $component$$1769_parentComponent$$9$$.$getPeer$(), $domElement$$535_parentPeer$$16$$.bind($component$$1769_parentComponent$$9$$), $AdfAssert$$.assert($domElement$$535_parentPeer$$16$$.$resetActiveDescendant$ != $JSCompiler_alias_NULL$$, "The menu item's parent should have a resetActiveDescendant method."), $domElement$$535_parentPeer$$16$$.$resetActiveDescendant$())
  }else {
    $AdfDomUtils$$.$removeCSSClassName$($domElement$$535_parentPeer$$16$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$), $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$ = $AdfMenuUtils$$.$isInMenu$($component$$1769_parentComponent$$9$$) ? $domElement$$535_parentPeer$$16$$ : $AdfDomUtils$$.$getFirstChildElement$($domElement$$535_parentPeer$$16$$), $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$.setAttribute("tabIndex", "-1"), $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, 
    "true"), $newValue$$164_tabIndexElementDisabled_tabIndexElementEnabled$$.removeAttribute("aria-disabled"), $menuContainerElement$$ && $menuContainerElement$$.removeAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$), $AdfMenuUtils$$.$isOnMenuBar$($component$$1769_parentComponent$$9$$) && $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$535_parentPeer$$16$$, "a").setAttribute("href", "#")
  }
};
$goog$exportSymbol$$("AdfMenuUtils.menuItemDisabledChanged", $AdfMenuUtils$$.$menuItemDisabledChanged$);
$AdfMenuUtils$$.$menuItemVisibleChanged$ = function $$AdfMenuUtils$$$$menuItemVisibleChanged$$($component$$1770_parentPeer$$17_tabIndexElementVisible$$, $domElement$$536_tabIndexElementNotVisible$$, $newValue$$165_oldTabIndex$$1$$, $menuContainerElement$$1_parentComponent$$10$$) {
  $newValue$$165_oldTabIndex$$1$$ == $JSCompiler_alias_TRUE$$ ? ($component$$1770_parentPeer$$17_tabIndexElementVisible$$ = $AdfMenuUtils$$.$isInMenu$($component$$1770_parentPeer$$17_tabIndexElementVisible$$) ? $domElement$$536_tabIndexElementNotVisible$$ : $AdfDomUtils$$.$getFirstChildElement$($domElement$$536_tabIndexElementNotVisible$$), $component$$1770_parentPeer$$17_tabIndexElementVisible$$.setAttribute("tabIndex", "-1"), $component$$1770_parentPeer$$17_tabIndexElementVisible$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, 
  "true"), $menuContainerElement$$1_parentComponent$$10$$ && $menuContainerElement$$1_parentComponent$$10$$.removeAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$)) : ($domElement$$536_tabIndexElementNotVisible$$ = $AdfMenuUtils$$.$isInMenu$($component$$1770_parentPeer$$17_tabIndexElementVisible$$) ? $domElement$$536_tabIndexElementNotVisible$$ : $AdfDomUtils$$.$getFirstChildElement$($domElement$$536_tabIndexElementNotVisible$$), $newValue$$165_oldTabIndex$$1$$ = $domElement$$536_tabIndexElementNotVisible$$.getAttribute("tabIndex"), 
  $domElement$$536_tabIndexElementNotVisible$$.removeAttribute("tabIndex"), $domElement$$536_tabIndexElementNotVisible$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false"), $menuContainerElement$$1_parentComponent$$10$$ && $menuContainerElement$$1_parentComponent$$10$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false"), $newValue$$165_oldTabIndex$$1$$ && "0" == $newValue$$165_oldTabIndex$$1$$ && ($menuContainerElement$$1_parentComponent$$10$$ = $component$$1770_parentPeer$$17_tabIndexElementVisible$$.getParent(), 
  $component$$1770_parentPeer$$17_tabIndexElementVisible$$ = $menuContainerElement$$1_parentComponent$$10$$.$getPeer$(), $component$$1770_parentPeer$$17_tabIndexElementVisible$$.bind($menuContainerElement$$1_parentComponent$$10$$), $AdfAssert$$.assert($component$$1770_parentPeer$$17_tabIndexElementVisible$$.$resetActiveDescendant$ != $JSCompiler_alias_NULL$$, "The menu item's parent should have a resetActiveDescendant method."), $component$$1770_parentPeer$$17_tabIndexElementVisible$$.$resetActiveDescendant$()))
};
$goog$exportSymbol$$("AdfMenuUtils.menuItemVisibleChanged", $AdfMenuUtils$$.$menuItemVisibleChanged$);
