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$$2334_parent$$76$$) {
  return $component$$2334_parent$$76$$ instanceof AdfRichMenuBar ? !0 : ($component$$2334_parent$$76$$ = $component$$2334_parent$$76$$.getParent()) && $component$$2334_parent$$76$$ instanceof AdfRichMenuBar;
};
$goog$exportSymbol$$("AdfMenuUtils.isOnMenuBar", $AdfMenuUtils$$.$isOnMenuBar$);
$AdfMenuUtils$$.$isInOverflow$ = function $$AdfMenuUtils$$$$isInOverflow$$($rootElement$$170$$) {
  return "true" == $rootElement$$170$$.parentNode.getAttribute($AdfMenuUtils$$.$OVERFLOW_KEY$);
};
$goog$exportSymbol$$("AdfMenuUtils.isInOverflow", $AdfMenuUtils$$.$isInOverflow$);
$AdfMenuUtils$$.$isInMenu$ = function $$AdfMenuUtils$$$$isInMenu$$($component$$2335_parent$$77$$) {
  return ($component$$2335_parent$$77$$ = $component$$2335_parent$$77$$.getParent()) && $component$$2335_parent$$77$$ instanceof AdfRichMenu;
};
$goog$exportSymbol$$("AdfMenuUtils.isInMenu", $AdfMenuUtils$$.$isInMenu$);
$AdfMenuUtils$$.$isInDetachedMenu$ = function $$AdfMenuUtils$$$$isInDetachedMenu$$($component$$2336$$) {
  if ($AdfMenuUtils$$.$isInMenu$($component$$2336$$)) {
    var $peer$$191$$ = $component$$2336$$.getParent().$getPeer$();
    $peer$$191$$.bind($component$$2336$$);
    return $peer$$191$$.$isDetached$();
  }
  return !1;
};
$goog$exportSymbol$$("AdfMenuUtils.isInDetachedMenu", $AdfMenuUtils$$.$isInDetachedMenu$);
$AdfMenuUtils$$.$closeAllMenus$ = function $$AdfMenuUtils$$$$closeAllMenus$$($restoreFocus$$) {
  var $openedMenus$$ = $AdfMenuUtils$$.$_sOpenedMenus$;
  if ($openedMenus$$ && 0 < $openedMenus$$.length) {
    for (var $i$$730$$ = $openedMenus$$.length - 1;0 <= $i$$730$$;$i$$730$$--) {
      var $component$$2337$$ = $AdfPage$$.$PAGE$.$findComponent$($openedMenus$$[$i$$730$$]);
      if ($component$$2337$$) {
        var $peer$$192$$ = $component$$2337$$.$getPeer$();
        $peer$$192$$.bind($component$$2337$$);
        $peer$$192$$.$hidePopup$();
      } else {
        delete $openedMenus$$[$i$$730$$];
      }
    }
  }
  $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$$), null != $focusComponent_lastOpenedRootMenuId$$)) {
    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$$613$$) {
  var $newHighlightedMenuItemId$$ = $domElement$$613$$.getAttribute("id"), $oldHighlightedMenuItemId$$ = $AdfMenuUtils$$.$_highlightedRootMenuItemId$;
  $oldHighlightedMenuItemId$$ && $oldHighlightedMenuItemId$$ != $newHighlightedMenuItemId$$ && $AdfMenuUtils$$.$unhighlightRootMenuItem$();
  $AdfDomUtils$$.$addCSSClassName$($domElement$$613$$, $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$ = null;
};
$goog$exportSymbol$$("AdfMenuUtils.unhighlightRootMenuItem", $AdfMenuUtils$$.$unhighlightRootMenuItem$);
$AdfMenuUtils$$.$dismiss$ = function $$AdfMenuUtils$$$$dismiss$$($element$$381$$, $immediate$$6$$, $keepOpen$$) {
  var $openedMenus$$1$$ = $AdfMenuUtils$$.$_sOpenedMenus$;
  if ($openedMenus$$1$$ && 0 != $openedMenus$$1$$.length) {
    for (var $i$$731$$ = $openedMenus$$1$$.length - 1;0 <= $i$$731$$;$i$$731$$--) {
      var $openedMenuComponent$$ = $AdfPage$$.$PAGE$.$findComponent$($openedMenus$$1$$[$i$$731$$]);
      if ($openedMenuComponent$$) {
        var $openedMenuPeer$$ = $openedMenuComponent$$.$getPeer$();
        $openedMenuPeer$$.bind($openedMenuComponent$$);
        if ($JSCompiler_StaticMethods__contains$$($openedMenuPeer$$, $element$$381$$)) {
          break;
        }
        $keepOpen$$ ? $openedMenus$$1$$.pop() : ($openedMenuPeer$$.$_deselectElement$(), $immediate$$6$$ ? $openedMenuPeer$$.$hidePopup$() : $JSCompiler_StaticMethods__delayPopupHiding$$($openedMenuPeer$$, $i$$731$$));
      } else {
        delete $openedMenus$$1$$[$i$$731$$];
      }
    }
  }
};
$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$$79$$) {
  var $targetAttrs$$2$$ = null;
  for ($menuItem$$8_parent$$79$$ = $menuItem$$8_parent$$79$$.getParent();null != $menuItem$$8_parent$$79$$ && ($menuItem$$8_parent$$79$$ instanceof AdfRichMenu || $menuItem$$8_parent$$79$$ instanceof AdfRichPopup);) {
    var $rowCurrency$$;
    if (null != ($rowCurrency$$ = $menuItem$$8_parent$$79$$[$AdfMenuUtils$$.$AFR_TARGETROWCURRENCY$])) {
      $targetAttrs$$2$$ = {$targetRowCurrency$:$rowCurrency$$, $targetComponentId$:$menuItem$$8_parent$$79$$[$AdfMenuUtils$$.$AFR_TARGETCOMPONENTID$]};
      break;
    }
    $menuItem$$8_parent$$79$$ = $menuItem$$8_parent$$79$$.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$;
  null == $propKeys$$[$currencyKey$$] && ($propKeys$$[$currencyKey$$] = $propKeys$$[$componentIdKey$$1$$] = {type:"String"}, $AdfRichUIPeer$$.$addSuppressedPPRAttributes$(this, $currencyKey$$, $componentIdKey$$1$$));
  $menuItem$$9$$.setProperty($componentIdKey$$1$$, null);
  $menuItem$$9$$.setProperty($currencyKey$$, 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$$2338_parentComponent$$11$$, $domElement$$614_parentPeer$$22$$, $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$, $menuContainerElement$$) {
  if (1 == $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$) {
    $AdfDomUtils$$.$addCSSClassName$($domElement$$614_parentPeer$$22$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$);
    $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$ = $AdfMenuUtils$$.$isInMenu$($component$$2338_parentComponent$$11$$) ? $domElement$$614_parentPeer$$22$$ : $AdfDomUtils$$.$getFirstChildElement$($domElement$$614_parentPeer$$22$$);
    var $oldTabIndex$$ = $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$.getAttribute("tabIndex");
    $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$.removeAttribute("tabIndex");
    $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false");
    $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$.setAttribute("aria-disabled", "true");
    $menuContainerElement$$ && $menuContainerElement$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false");
    $AdfMenuUtils$$.$isOnMenuBar$($component$$2338_parentComponent$$11$$) && $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$614_parentPeer$$22$$, "a").removeAttribute("href");
    $oldTabIndex$$ && "0" == $oldTabIndex$$ && ($component$$2338_parentComponent$$11$$ = $component$$2338_parentComponent$$11$$.getParent(), $domElement$$614_parentPeer$$22$$ = $component$$2338_parentComponent$$11$$.$getPeer$(), $domElement$$614_parentPeer$$22$$.bind($component$$2338_parentComponent$$11$$), $AdfAssert$$.assert(null != $domElement$$614_parentPeer$$22$$.$resetActiveDescendant$, "The menu item's parent should have a resetActiveDescendant method."), $domElement$$614_parentPeer$$22$$.$resetActiveDescendant$());
  } else {
    $AdfDomUtils$$.$removeCSSClassName$($domElement$$614_parentPeer$$22$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$), $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$ = $AdfMenuUtils$$.$isInMenu$($component$$2338_parentComponent$$11$$) ? $domElement$$614_parentPeer$$22$$ : $AdfDomUtils$$.$getFirstChildElement$($domElement$$614_parentPeer$$22$$), $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$.setAttribute("tabIndex", "-1"), $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, 
    "true"), $newValue$$188_tabIndexElementDisabled_tabIndexElementEnabled$$.removeAttribute("aria-disabled"), $menuContainerElement$$ && $menuContainerElement$$.removeAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$), $AdfMenuUtils$$.$isOnMenuBar$($component$$2338_parentComponent$$11$$) && $AdfDomUtils$$.$getFirstDescendentElement$($domElement$$614_parentPeer$$22$$, "a").setAttribute("href", "#");
  }
};
$goog$exportSymbol$$("AdfMenuUtils.menuItemDisabledChanged", $AdfMenuUtils$$.$menuItemDisabledChanged$);
$AdfMenuUtils$$.$menuItemVisibleChanged$ = function $$AdfMenuUtils$$$$menuItemVisibleChanged$$($component$$2339_parentPeer$$23_tabIndexElementVisible$$, $domElement$$615_tabIndexElementNotVisible$$, $newValue$$189_oldTabIndex$$1$$, $menuContainerElement$$1_parentComponent$$12$$) {
  1 == $newValue$$189_oldTabIndex$$1$$ ? ($component$$2339_parentPeer$$23_tabIndexElementVisible$$ = $AdfMenuUtils$$.$isInMenu$($component$$2339_parentPeer$$23_tabIndexElementVisible$$) ? $domElement$$615_tabIndexElementNotVisible$$ : $AdfDomUtils$$.$getFirstChildElement$($domElement$$615_tabIndexElementNotVisible$$), $component$$2339_parentPeer$$23_tabIndexElementVisible$$.setAttribute("tabIndex", "-1"), $component$$2339_parentPeer$$23_tabIndexElementVisible$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, 
  "true"), $menuContainerElement$$1_parentComponent$$12$$ && $menuContainerElement$$1_parentComponent$$12$$.removeAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$)) : ($domElement$$615_tabIndexElementNotVisible$$ = $AdfMenuUtils$$.$isInMenu$($component$$2339_parentPeer$$23_tabIndexElementVisible$$) ? $domElement$$615_tabIndexElementNotVisible$$ : $AdfDomUtils$$.$getFirstChildElement$($domElement$$615_tabIndexElementNotVisible$$), $newValue$$189_oldTabIndex$$1$$ = $domElement$$615_tabIndexElementNotVisible$$.getAttribute("tabIndex"), 
  $domElement$$615_tabIndexElementNotVisible$$.removeAttribute("tabIndex"), $domElement$$615_tabIndexElementNotVisible$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false"), $menuContainerElement$$1_parentComponent$$12$$ && $menuContainerElement$$1_parentComponent$$12$$.setAttribute($AdfFocusUtils$$.$DESCENDANT_FOCUSABLE$, "false"), $newValue$$189_oldTabIndex$$1$$ && "0" == $newValue$$189_oldTabIndex$$1$$ && ($menuContainerElement$$1_parentComponent$$12$$ = $component$$2339_parentPeer$$23_tabIndexElementVisible$$.getParent(), 
  $component$$2339_parentPeer$$23_tabIndexElementVisible$$ = $menuContainerElement$$1_parentComponent$$12$$.$getPeer$(), $component$$2339_parentPeer$$23_tabIndexElementVisible$$.bind($menuContainerElement$$1_parentComponent$$12$$), $AdfAssert$$.assert(null != $component$$2339_parentPeer$$23_tabIndexElementVisible$$.$resetActiveDescendant$, "The menu item's parent should have a resetActiveDescendant method."), $component$$2339_parentPeer$$23_tabIndexElementVisible$$.$resetActiveDescendant$()));
};
$goog$exportSymbol$$("AdfMenuUtils.menuItemVisibleChanged", $AdfMenuUtils$$.$menuItemVisibleChanged$);
