var $AdfDhtmlDeckPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlDeckPeer", $JSCompiler_alias_FALSE$$);
$goog$exportSymbol$$("AdfDhtmlDeckPeer", $AdfDhtmlDeckPeer$$);
$AdfDhtmlDeckPeer$$.$InitSubclass$ = function $$AdfDhtmlDeckPeer$$$$InitSubclass$$() {
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichDeck.DISPLAYED_CHILD)
};
$goog$exportSymbol$$("AdfDhtmlDeckPeer.InitSubclass", $AdfDhtmlDeckPeer$$.$InitSubclass$);
$AdfDhtmlDeckPeer$$.prototype.$GetComponentDisplayedChild$ = function $$AdfDhtmlDeckPeer$$$$$GetComponentDisplayedChild$$($component$$674$$, $domElement$$162$$) {
  return $JSCompiler_StaticMethods__getOptimizedDomAttribute$$("data-afr-dsp-child", $component$$674$$, $domElement$$162$$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.GetComponentDisplayedChild", {$GetComponentDisplayedChild$:$AdfDhtmlDeckPeer$$.prototype.$GetComponentDisplayedChild$});
function $JSCompiler_StaticMethods__getOptimizedDomAttribute$$($attributeName$$, $agent$$207_clientId$$142_component$$675_optRndSubId$$, $domElement$$163$$) {
  $agent$$207_clientId$$142_component$$675_optRndSubId$$ = $agent$$207_clientId$$142_component$$675_optRndSubId$$.$getClientId$();
  $agent$$207_clientId$$142_component$$675_optRndSubId$$ = $AdfRichUIPeer$$.$CreateSubId$($agent$$207_clientId$$142_component$$675_optRndSubId$$, "optRnd");
  var $attributeValue$$2_optRndElement$$ = document.getElementById($agent$$207_clientId$$142_component$$675_optRndSubId$$);
  $agent$$207_clientId$$142_component$$675_optRndSubId$$ = $AdfAgent$$.$AGENT$;
  $attributeValue$$2_optRndElement$$ = $agent$$207_clientId$$142_component$$675_optRndSubId$$.getAttribute($attributeValue$$2_optRndElement$$, $attributeName$$);
  $attributeValue$$2_optRndElement$$ == $JSCompiler_alias_NULL$$ && ($attributeValue$$2_optRndElement$$ = $agent$$207_clientId$$142_component$$675_optRndSubId$$.getAttribute($domElement$$163$$, $attributeName$$));
  return $attributeValue$$2_optRndElement$$
}
$AdfDhtmlDeckPeer$$.prototype.$ComponentRemoved$ = function $$AdfDhtmlDeckPeer$$$$$ComponentRemoved$$() {
  this.$_transitionCancelFunction$ != $JSCompiler_alias_NULL$$ && ($AdfPage$$.$PAGE$.$decrementPendingAnimation$(), this.$_transitionCancelFunction$())
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.ComponentRemoved", {$ComponentRemoved$:$AdfDhtmlDeckPeer$$.prototype.$ComponentRemoved$});
$AdfDhtmlDeckPeer$$.prototype.$needsResizeNotify$ = $JSCompiler_returnArg$$($JSCompiler_alias_TRUE$$);
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.needsResizeNotify", {$needsResizeNotify$:$AdfDhtmlDeckPeer$$.prototype.$needsResizeNotify$});
$AdfDhtmlDeckPeer$$.prototype.$_getAttribute$ = function $$AdfDhtmlDeckPeer$$$$$_getAttribute$$($agent$$208_value$$125$$, $element$$204$$, $name$$78$$, $defaultValue$$9$$) {
  $agent$$208_value$$125$$ = $agent$$208_value$$125$$.getAttribute($element$$204$$, $name$$78$$);
  return $agent$$208_value$$125$$ == $JSCompiler_alias_NULL$$ ? $defaultValue$$9$$ : $agent$$208_value$$125$$
};
function $JSCompiler_StaticMethods__deleteElement$$($JSCompiler_StaticMethods__deleteElement$self_logger$$11$$, $elementToDelete$$, $deleteDom$$, $deleteObjects$$) {
  if($elementToDelete$$ != $JSCompiler_alias_NULL$$) {
    try {
      var $root$$2$$ = $JSCompiler_StaticMethods__deleteElement$self_logger$$11$$.$getDomElement$();
      $deleteObjects$$ && ($AdfPage$$.$PAGE$.$removeComponentsInSubtree$($elementToDelete$$), $AdfAgent$$.$AGENT$.$elementsRemoved$($elementToDelete$$), $deleteDom$$ || $AdfDhtmlDeckPeer$$.$_removeIds$($elementToDelete$$));
      $deleteDom$$ && $root$$2$$.firstChild.removeChild($elementToDelete$$)
    }catch($problem$$4$$) {
      $JSCompiler_StaticMethods__deleteElement$self_logger$$11$$ = $AdfLogger$$.$LOGGER$, $JSCompiler_StaticMethods__deleteElement$self_logger$$11$$.finest("Unable to delete the old deck element (" + $deleteDom$$ + ", " + $deleteObjects$$ + ", " + $elementToDelete$$ + "):"), $JSCompiler_StaticMethods__deleteElement$self_logger$$11$$.finest($problem$$4$$)
    }
  }
}
$AdfDhtmlDeckPeer$$.$_removeIds$ = function $$AdfDhtmlDeckPeer$$$$_removeIds$$($allNodes$$1_element$$205$$) {
  $allNodes$$1_element$$205$$.id = $JSCompiler_alias_NULL$$;
  $allNodes$$1_element$$205$$ = $allNodes$$1_element$$205$$.getElementsByTagName("*");
  for(var $nodeCount$$4$$ = $allNodes$$1_element$$205$$.length, $i$$221$$ = 0;$i$$221$$ < $nodeCount$$4$$;$i$$221$$++) {
    $allNodes$$1_element$$205$$[$i$$221$$].id = $JSCompiler_alias_NULL$$
  }
};
$AdfDhtmlDeckPeer$$.$_statelessOptimizeReplaceFinished$ = function $$AdfDhtmlDeckPeer$$$$_statelessOptimizeReplaceFinished$$($callbackParams$$5_oldChild$$inline_1620$$) {
  var $JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1619$$ = $callbackParams$$5_oldChild$$inline_1620$$[0];
  $callbackParams$$5_oldChild$$inline_1620$$ = $callbackParams$$5_oldChild$$inline_1620$$[1];
  $JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1619$$.$_transitionCancelFunction$ != $JSCompiler_alias_NULL$$ && ($JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1619$$.$_transitionCancelFunction$ = $JSCompiler_alias_NULL$$, $JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1619$$.$getDomElement$() && ($JSCompiler_StaticMethods__deleteElement$$($JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1619$$, $callbackParams$$5_oldChild$$inline_1620$$, 
  $JSCompiler_alias_TRUE$$, $JSCompiler_alias_FALSE$$), $AdfPage$$.$PAGE$.$doResizeNotify$($JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1619$$.$getComponent$())));
  $AdfPage$$.$PAGE$.$decrementPendingAnimation$()
};
$AdfDhtmlDeckPeer$$.prototype.$ReplaceDomElement$ = function $$AdfDhtmlDeckPeer$$$$$ReplaceDomElement$$($newElement$$13$$, $oldElement$$4$$) {
  if(0 < $newElement$$13$$.id.indexOf("optRnd")) {
    var $agent$$209$$ = $AdfAgent$$.$AGENT$, $root$$4$$ = this.$getDomElement$(), $oldChild$$4$$ = $root$$4$$.firstChild, $component$$inline_1623_oldIndex$$1$$ = -1;
    $oldChild$$4$$.id != $JSCompiler_alias_NULL$$ && -1 == $oldChild$$4$$.id.indexOf("optRnd") ? $component$$inline_1623_oldIndex$$1$$ = $agent$$209$$.getAttribute($oldChild$$4$$.firstChild, "data-afr-index") : $oldChild$$4$$ = $JSCompiler_alias_NULL$$;
    var $newChild$$3$$ = $newElement$$13$$.firstChild, $newIndex$$1$$ = -1;
    $newChild$$3$$ != $JSCompiler_alias_NULL$$ && ($newIndex$$1$$ = $agent$$209$$.getAttribute($newChild$$3$$, "data-afr-index"));
    $agent$$209$$.setAttribute($newElement$$13$$, "data-afr-index", $newIndex$$1$$);
    if($newIndex$$1$$ == $component$$inline_1623_oldIndex$$1$$ && -1 != $newIndex$$1$$) {
      if($AdfPage$$.$PAGE$.$removeComponentsInSubtree$($oldChild$$4$$), $agent$$209$$.$elementsRemoved$($oldChild$$4$$), $component$$inline_1623_oldIndex$$1$$ = this.$getComponent$(), $JSCompiler_StaticMethods__getOptimizedDomAttribute$$("data-afr-replace-navigate", $component$$inline_1623_oldIndex$$1$$, $root$$4$$) != $JSCompiler_alias_NULL$$) {
        $AdfDhtmlDeckPeer$$.$_removeIds$($oldChild$$4$$)
      }else {
        $agent$$209$$.$replaceNode$($newChild$$3$$, $oldChild$$4$$);
        $agent$$209$$.$elementsAdded$($newChild$$3$$);
        return
      }
    }
  }
  $AdfDhtmlDeckPeer$$.$superclass$.$ReplaceDomElement$.call(this, $newElement$$13$$, $oldElement$$4$$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.ReplaceDomElement", {$ReplaceDomElement$:$AdfDhtmlDeckPeer$$.prototype.$ReplaceDomElement$});
$AdfDhtmlDeckPeer$$.prototype.$DomReplaceNotify$ = function $$AdfDhtmlDeckPeer$$$$$DomReplaceNotify$$($domNode$$22$$) {
  if(0 < $domNode$$22$$.id.indexOf("optRnd")) {
    var $agent$$210_dimensionsFromParent$$5$$ = $AdfAgent$$.$AGENT$;
    if(this.$_transitionCancelFunction$ != $JSCompiler_alias_NULL$$) {
      var $deleteCallbackParams_page$$83$$ = this.$_transitionCancelFunction$();
      this.$_transitionCancelFunction$ = $JSCompiler_alias_NULL$$;
      $deleteCallbackParams_page$$83$$ != $JSCompiler_alias_NULL$$ && $JSCompiler_StaticMethods__deleteElement$$(this, $deleteCallbackParams_page$$83$$[1], $JSCompiler_alias_TRUE$$, $JSCompiler_alias_FALSE$$);
      $AdfPage$$.$PAGE$.$decrementPendingAnimation$()
    }
    var $deleteCallbackParams_page$$83$$ = $AdfPage$$.$PAGE$, $logger$$12$$ = $AdfLogger$$.$LOGGER$, $callbackParams$$6_root$$5$$ = this.$getDomElement$(), $oldChild$$5$$ = $callbackParams$$6_root$$5$$.firstChild.firstChild, $oldIndex$$2_properties$$53$$ = -1;
    $oldChild$$5$$.id != $JSCompiler_alias_NULL$$ && -1 == $oldChild$$5$$.id.indexOf("optRnd") ? $oldIndex$$2_properties$$53$$ = $agent$$210_dimensionsFromParent$$5$$.getAttribute($oldChild$$5$$, "data-afr-index") : $oldChild$$5$$ = $JSCompiler_alias_NULL$$;
    var $newChild$$4$$ = $domNode$$22$$.firstChild, $newIndex$$2$$ = $agent$$210_dimensionsFromParent$$5$$.getAttribute($domNode$$22$$, "data-afr-index"), $component$$678_transitionType$$1$$ = this.$getComponent$(), $component$$678_transitionType$$1$$ = $newIndex$$2$$ == $oldIndex$$2_properties$$53$$ ? $JSCompiler_StaticMethods__getOptimizedDomAttribute$$("data-afr-replace-navigate", $component$$678_transitionType$$1$$, $callbackParams$$6_root$$5$$) : $newIndex$$2$$ < $oldIndex$$2_properties$$53$$ ? 
    $JSCompiler_StaticMethods__getOptimizedDomAttribute$$("data-afr-bck-navigate", $component$$678_transitionType$$1$$, $callbackParams$$6_root$$5$$) : $JSCompiler_StaticMethods__getOptimizedDomAttribute$$("data-afr-fwd-navigate", $component$$678_transitionType$$1$$, $callbackParams$$6_root$$5$$);
    if($newIndex$$2$$ == $oldIndex$$2_properties$$53$$) {
      if(-1 == $newIndex$$2$$) {
        return $JSCompiler_alias_NULL$$
      }
      if($component$$678_transitionType$$1$$ == $JSCompiler_alias_NULL$$) {
        return $callbackParams$$6_root$$5$$
      }
    }
    $oldChild$$5$$ != $JSCompiler_alias_NULL$$ && $JSCompiler_StaticMethods__deleteElement$$(this, $oldChild$$5$$, $JSCompiler_alias_FALSE$$, $JSCompiler_alias_TRUE$$);
    -1 != $newIndex$$2$$ && $callbackParams$$6_root$$5$$.firstChild.insertBefore($newChild$$4$$, $callbackParams$$6_root$$5$$.firstChild.firstChild);
    $agent$$210_dimensionsFromParent$$5$$ = "yes" == $agent$$210_dimensionsFromParent$$5$$.getAttribute($domNode$$22$$, "data-afr-dfp");
    $callbackParams$$6_root$$5$$ = [this, $oldChild$$5$$];
    $oldIndex$$2_properties$$53$$ = {parentFlipAllowed:$JSCompiler_alias_TRUE$$};
    $oldIndex$$2_properties$$53$$.dimensionsFromParent = $agent$$210_dimensionsFromParent$$5$$;
    $oldIndex$$2_properties$$53$$.finishedFunction = $AdfDhtmlDeckPeer$$.$_statelessOptimizeReplaceFinished$;
    $oldIndex$$2_properties$$53$$.callbackParams = $callbackParams$$6_root$$5$$;
    $oldIndex$$2_properties$$53$$.animationEnabled = $deleteCallbackParams_page$$83$$.$isAnimationEnabled$() || $deleteCallbackParams_page$$83$$.$isAutomationEnabled$();
    $oldIndex$$2_properties$$53$$.isRtl = $deleteCallbackParams_page$$83$$.$getLocaleContext$().$isRightToLeft$();
    $oldIndex$$2_properties$$53$$.fineLogger = $adf$$.$shared$.$impl$.$animationUtils$.$getProxyFunction$($logger$$12$$, $logger$$12$$.fine);
    $AdfPage$$.$PAGE$.$incrementPendingAnimation$();
    this.$_transitionCancelFunction$ = $adf$$.$shared$.$impl$.$animationUtils$.transition($component$$678_transitionType$$1$$, $oldChild$$5$$, $newChild$$4$$, $oldIndex$$2_properties$$53$$);
    this.$_transitionCancelFunction$ == $JSCompiler_alias_NULL$$ && $logger$$12$$.fine("Unexpected null transition cancel function.")
  }
  return $domNode$$22$$
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.DomReplaceNotify", {$DomReplaceNotify$:$AdfDhtmlDeckPeer$$.prototype.$DomReplaceNotify$});
