function AdfDhtmlPage(a,b){this.Init(a,b)}AdfObject.createSubclass(AdfDhtmlPage,AdfPage);AdfDhtmlPage.SCREEN_READER_ACCESSIBILITY_MODE="screenReader";AdfDhtmlPage.DEFAULT_ACCESSIBILITY_MODE="default";AdfDhtmlPage.INACCESSIBLE_ACCESSIBILITY_MODE="inaccessible";AdfDhtmlPage.OUPUTMODE_ATTACHMENT="attachment";AdfDhtmlPage._LOAD_CHECKPOINT=AdfCheckpoint.getCheckpoint("onload total","startup");AdfDhtmlPage._LOAD_CHECKPOINT.setDescription("Total time spent in onLoad");
AdfDhtmlPage._CALLBACK_CHECKPOINT=AdfCheckpoint.getCheckpoint("onload callback","startup");AdfDhtmlPage._CALLBACK_CHECKPOINT.setDescription("Time spent in onload callback plus post-callback layout");AdfDhtmlPage._POSTBACK_CHECKPOINT=AdfCheckpoint.getCheckpoint("postaback total","postback");AdfDhtmlPage._POSTBACK_CHECKPOINT.setDescription("Total time spent in postback");AdfDhtmlPage._BROWSER_RESIZE_CHECKPOINT=AdfCheckpoint.getCheckpoint("browser resize","resize");AdfDhtmlPage._BROWSER_RESIZE_CHECKPOINT.setDescription("Time spent in resize notify during browser resize");
AdfDhtmlPage._CUSTOM_PPR_URL_EXPANDO="_adfCustomPPRUrlExpando";AdfDhtmlPage.ACTIVE_DOM_ELEMENT_PROPERTY="activeDomElement";AdfDhtmlPage._INCOMPLETE_IMAGE_CLASS_NAME="_afrImageNotLoadedInTime";AdfDhtmlPage._ECID="_afrECID";AdfDhtmlPage._PRINTABLE_STATE="p_AFPrintable";AdfDhtmlPage._PRINTABLE_WINDOW_NAME="_new";AdfDhtmlPage.TIMER_IS_SYNCHRONIZED="isSynchronized";AdfDhtmlPage.TIMER_CALLBACK="callback";AdfDhtmlPage.TIMER_CONTEXT="context";AdfDhtmlPage.TIMER_STATE="state";AdfDhtmlPage.TIMER_ID="timerId";
AdfDhtmlPage.TIMER_DOM_ID="domTimerId";AdfDhtmlPage._FOR_CONTAINER_PREFIX="afr::msgFor";
AdfDhtmlPage.InitClass=function(){for(var a={},b=[AdfKeyStroke.getKeyStroke(AdfKeyStroke.A_KEY,AdfKeyStroke.CTRL_MASK),AdfKeyStroke.getKeyStroke(AdfKeyStroke.C_KEY,AdfKeyStroke.CTRL_MASK),AdfKeyStroke.getKeyStroke(AdfKeyStroke.V_KEY,AdfKeyStroke.CTRL_MASK),AdfKeyStroke.getKeyStroke(AdfKeyStroke.X_KEY,AdfKeyStroke.CTRL_MASK),AdfKeyStroke.getKeyStroke(AdfKeyStroke.DELETE_KEY,0)],d=b.length-1;0<=d;d--)a[b[d].toMarshalledString()]=!0;this._KEYSTROKE_OVERRIDES=a;this._EDITABLE_STYLE="p_AFInlineEditable";
this._SELECTABLE_STYLE="p_AFInlineSelectable";this._STATE_PARAM_NAME="javax.faces.ViewState";this._PAGE_STATE_ID="Adf-Page-Id";this._STREAMING_IDS_PARAM="oracle.adf.view.rich.STREAM";this._REMOVED_STREAMING_IDS_PARAM="oracle.adf.view.rich.NOSTREAM";this._STREAMING_REQUEST_SENT=0;this._STREAMING_STARTED=1;this._STREAMING_COMPLETE=2;this._LAZY_FETCH_ID_PARAM="oracle.adf.view.rich.LAZY_FETCH";this._RICH_UPDATE_FLAG="oracle.adf.view.faces.RICH_UPDATE";this._NAVIGATION_WRAPPER_ID="afr::DocWrapper";this._NAVIGATION_VIEW_ROOT=
"_afrNavViewRoot";this._NAVIGATION_QUERY_PARAMS="_afrNavParams";this._DELAYED_RESIZE_TIMEOUT=150;this._ACTIVE_DATA_HOT_KEY=AdfKeyStroke.getKeyStroke(AdfKeyStroke.R_KEY,AdfKeyStroke.ALT_MASK|AdfKeyStroke.CTRL_MASK);this._ACTIVE_DATA_HOT_KEY_TEXT="Ctrl+Alt+R";this._DOCUMENT_STYLE_HOLDER="_afrStyleHolder";this.PPR_NAVIGATION_ON=1;this.PPR_NAVIGATION_FORCE_PPR=2;this._MSG_RESET_CLIENT_AND_SERVER=0;this._MSG_RESET_SERVER=1;this._PARSER_DIV_ID="_afrParserDiv";this._BLOCKING_DIV_ID="_afBlockingDiv";this._BLOCKING_OPACITY=
0;this._POSTSCRIPT_ID_SUFFIX="::postscript";this._UI_BLOCK_REASON_PPR="ppr";this._UI_BLOCK_REASON_SCRIPT_LOADING="scriptLoading"};
AdfDhtmlPage.prototype.Init=function(a,b){AdfAssert.assertPrototype(a,AdfLookAndFeel);AdfDhtmlPage.superclass.Init.call(this,a);this._preloadImages=!1;this._window=b;this._document=b.document;this._jsfAjaxInit=this._lastDomEvent=null;this._clientIdToComponentMap={};this._clientIdToAbsoluteLocatorMap={};var d=AdfLogger.LOGGER.getLogWriter();AdfClientFileLogWriter.prototype.isPrototypeOf(d)&&d.setSessionId(AdfDhtmlPage._getCookie(this._document,"JSESSIONID"));AdfDhtmlPage.PARTIAL_TARGETS_PARAM="oracle.adf.view.rich.RENDER";
this._eventQueue=[];this._serverQueue=new AdfServerEventQueue;this._busyCounts={};this._accessibilityMode=AdfDhtmlPage.DEFAULT_ACCESSIBILITY_MODE;this._portlet=!1;this._rootClientId="";this._cssSelectorsUncompressed=this._automationEnabled=!1;this._animationEnabled=!0;this._validateEmptyFields=this._interpretEmptyString=!1;this._uiBlocks=[];this._activeDomNode=null;this._inLayout=!1;b.onunload=this.createCallback(this.Dispose);b.onresize=this.createCallback(this._handleResize);d=this.getDomDocument();
d.ondragstart=AdfAgent.eatEventCallback;d.onselectstart=this.createCallback(this._onSelectStart);this._dragLastY=this._dragLastX=this._dragStartY=this._dragStartX=0;var d=this.createCallback(this._dragMouseMove),e=this.createCallback(this._dragMouseUp),f=this.createCallback(this._dragKeyDown);this._dragDropCallbacks={mousemove:d,mouseup:e,keydown:f,touchmove:d,touchend:e,touchcancel:f};this._resizeNotifyTree={};this._resizeNotifyMap={};this._descendantResizeNotifyList=[];this._keyStrokeToCallbackMap=
{};this._keyStrokeToCallbackContextMap={};this._pageProperties={};AdfDhtmlPage._timers={};AdfDhtmlPage._nextTimerId=1;this._editableCallbackContext=this._editableCallback=this._inlineEditor=this._editedComponentId=this._editableSubtreeId=this._selectedEditingComponents=null;this._autoPPRComponents={};this._startADSClientIds={};this._startADSClientIdCount=0;this._restartAllADSComponents=!1;this._stopADSClientIds=[];this._canReceiveActiveDataCount=1;this._stopGlobalActiveData();this._defaultMessageKey=
"____GLOBAL_MESSAGES";this._messages={};this._messages.dirtyComponentsToRender=[];this._delayedMessages={};this._globalMessagesResetStrategy=AdfDhtmlPage._MSG_RESET_CLIENT_AND_SERVER;this._pendingStreamingIDs={};this._documentClientId=null;this._replaceJsfAjaxFunctions();this._responseId=this._sessionId=null;this.__shouldTracePPRRequestId=!1;this._perfProfileEnabled=b._afrTimingPreLoadStart?!0:!1;this._perfProfileTimingEnabled=b._afrTimingPreLoadTimingStart?!0:!1;this._positionBlockingGlassPaneCallback=
this.createCallback(this._positionBlockingGlassPane);if(this._perfProfileEnabled||this._perfProfileTimingEnabled)d=new AdfLogger("profiler",AdfAgent.AGENT.createDefaultLogWriter()),d.getLevel()>AdfLogger.INFO&&d.setLevel(AdfLogger.INFO),AdfLogger.PROFILER_LOGGER=AdfLogger.PROFILER_LOGGER=d,AdfLogger.PROFILER_LOGGER.register();this._haveOutstandingPPRRequest=!1;this._perfProfileLogClosed=!0;this._loadingComponents=[];this._dirtyStateService=new AdfDirtyStateService(this);this._scriptLoadingPolicy=
this._componentsUpdatedByPollEvent=null;this._windowDetectionStrategy="aggressive";this._poppedUpComponentInfo={};this._isHighContrast=this._seleniumRC=!1};AdfDhtmlPage.prototype.isPageFullyLoaded=function(){return this.isSynchronizedWithServer()};AdfDhtmlPage.prototype.isPageOnloadCalled=function(){return this._initializationComplete};AdfDhtmlPage.prototype.getDirtyStateService=function(){return this._dirtyStateService};
AdfDhtmlPage.prototype.isSynchronizedWithServer=function(){this._throwAndClearSavedErrors();return null==this.whyIsNotSynchronizedWithServer()};
AdfDhtmlPage.prototype.whyIsNotSynchronizedWithServer=function(a){var b=this.isAutomationEnabled();if(b&&a&&(a=AdfDhtmlRichDialogService.whyIsNotDialogSynchronizedWithServer(a))&&AdfAutomationHelper.WAIT_REASONS.NO_SUCH_DIALOG_ERROR.reason!==a.reason)return a;a={};var d=AdfAutomationHelper.CONFIG;a[d.AUTOMATION_ENABLED]=b;a[d.DTS]=this.getDataTransferService();a[d.PHASE]=this.getPhase();a[d.EVENT_QUEUE_LENGTH]=this._eventQueue.length;a[d.IS_ATTACHMENT_MODE]=this.isAttachmentMode();a[d.INITIALIZATION_COMPLETE]=
this._initializationComplete;a[d.PARTIAL_TARGETS]=this._partialTargets;a[d.START_ADS_CLIENT_ID_COUNT]=this._startADSClientIdCount;a[d.WINDOW_EVENT_HEADER_MAP]=this._windowEventHeaderMap;a[d.IN_HANDLE_RICH_RESPONSE]=this._inHandleRichResponse;a[d.PARTIAL_REQUEST_REDIRECT]=this._partialRequestRedirect;a[d.IN_DELIVER_QUEUED_SERVER_EVENTS]=this._inDeliverQueuedServerEvents;a[d.IN_DELIVER_QUEUED_EVENTS]=this._inDeliverQueuedEvents;a[d.WAITING_FOR_DOCUMENT_UNLOAD]=this._waitingForDocumentUnload;a[d.ARE_COMPONENTS_LOADED]=
this._areComponentsLoaded();a[d.WAITING_FOR_DESCENDANT_RESIZE]=this._waitingForDescendantResize();a[d.WAITING_FOR_INCOMPLETE_IMAGES]=this._waitingForIncompleteImages();a[d.HAS_EVENTS_TO_DELIVER]=this._serverQueue.hasEventsToDeliver();a[d.WAITING_FOR_ANIMATION]=this._waitingForAnimation();a[d.ARE_SYNCHRONOUS_TIMERS_CLEARED]=this._areSynchronousTimersCleared();a[d.IN_GET_REQUEST_NAVIGATION]=this._inGetRequestNavigation;a[d.TIMERS]=AdfDhtmlPage._timers;return AdfAutomationHelper.getInstance().whyIsNotSynchronizedWithServer(a)};
AdfDhtmlPage.prototype.getFailedConnectionText=function(){var a=AdfDhtmlPage.superclass.getFailedConnectionText.call(this);null==a&&(a=this.getLookAndFeel().getTranslatedString("af_document.MSG_FAILED_CONNECTION"));return a};AdfDhtmlPage.prototype.registerLoadingComponent=function(a){a=a.getClientId();AdfAssert.assert(-1==AdfCollections.indexOf(this._loadingComponents,a),"Component already registered");this._loadingComponents.push(a)};
AdfDhtmlPage.prototype.unregisterLoadingComponent=function(a){AdfCollections.removeArrayValue(this._loadingComponents,a.getClientId())};AdfDhtmlPage.prototype._areComponentsLoaded=function(){for(var a=this._loadingComponents,b=a.length,d=0;d<b;d++)if(this.findComponent(a[d]).getReadyState()!=AdfUIComponent.STATE_COMPLETE)return!1;return!0};AdfDhtmlPage.prototype.isPerformingFullSubmit=function(){return this._inAppNavigationFlag};
AdfDhtmlPage.prototype._resetPerformingFullSubmit=function(){this._inAppNavigationFlag=!1};AdfDhtmlPage.prototype.getAccessibilityMode=function(){return this._accessibilityMode};AdfDhtmlPage.prototype.setAccessibilityMode=function(a){AdfAssert.assert(a==AdfDhtmlPage.SCREEN_READER_ACCESSIBILITY_MODE||a==AdfDhtmlPage.DEFAULT_ACCESSIBILITY_MODE||a==AdfDhtmlPage.INACCESSIBLE_ACCESSIBILITY_MODE,"invalid accessibility mode: ",a);this._accessibilityMode=a};
AdfDhtmlPage.prototype.isScreenReaderMode=function(){return this._accessibilityMode==AdfDhtmlPage.SCREEN_READER_ACCESSIBILITY_MODE};AdfDhtmlPage.prototype.isUserActivityMonitoringOn=function(){if(void 0===this._userActivityMonitoring){this._userActivityMonitoring=!0;var a=this.getDomWindow(),b=AdfAgent.AGENT.isSessionStorageEnabled(),a=null!=a.AdfUserActivityInfo;if(!b||!a)this._userActivityMonitoring=!1,AdfLogger.LOGGER.fine("User Activity Monitoring has been disabled either because the feature is disabled or it's enabled but its resources are missing. Please check your app configuration.")}return this._userActivityMonitoring};
AdfDhtmlPage.prototype.isAttachmentMode=function(){return this._outputMode===AdfDhtmlPage.OUPUTMODE_ATTACHMENT};AdfDhtmlPage.prototype.setPortlet=function(a,b){this._portlet=a;this._rootClientId=b};AdfDhtmlPage.prototype.isPortlet=function(){return this._portlet};AdfDhtmlPage.prototype.getRootClientId=function(){return this._rootClientId};AdfDhtmlPage.prototype.isPPRNavigationEnabled=function(){return 0!=(this.getPPRNavigationOptions()&AdfDhtmlPage.PPR_NAVIGATION_ON)};
AdfDhtmlPage.prototype.setHelpWindowName=function(a){AdfDomUtils._setHelpWindowName(a)};AdfDhtmlPage.prototype.launchHelpWindow=function(a){AdfDomUtils.launchHelpWindow(a)};
AdfDhtmlPage.prototype.localNavigate=function(a){this._registerGetRequestNavigationTracking();if(this.checkUncommittedData())if(this.isPPRNavigationEnabled()){this._blockUI(!0);var b=this.isActiveDataSupported()?AdfCollections.isEmpty(this.getActiveDataSupport().getActiveComponents()):!0,d={};if(this.isUserActivityMonitoringOn()&&b){var b=AdfUserActivityInfo.getInstance(AdfUserActivityInfo.PRIMARY),e=(new Date).getTime().toString();b.setClientStartTime(e);d["oracle.adf.view.rich.monitoring.UserActivityInfo"]=
AdfUserActivityInfo.getMarshaledObject()}var d=this._getPostbackContent(null,d,null),b=null,e=/_afrPage=[^&^#]*&*/,f=e.exec(a);null!=f&&(f=f[0].split(/[=&]/g),1<f.length&&(b=f[1]),a=a.replace(e,""),a=a.replace(/[\?&]+$|[\?&]+(?=#)/,""));e=null;null!=b&&(e={},e[AdfDhtmlPage._PAGE_STATE_ID]=b);this.getDataTransferService().sendRequest(null,a,e,d,[this]);delete this._inGetRequestNavigation}else this.getDomWindow().location.href=a;else delete this._inGetRequestNavigation};
AdfDhtmlPage.prototype.checkUncommittedData=function(a){var b=!0,d=this._isTrackingDocumentUncommittedData()&&(this._dataDirty||this._dirtyStateService.__isPotentiallyDirty()),e=null,f=!1;d||(e=this._getDirtyRegionIds(),f=null!=e&&0<e.length);var g=null;f&&null!=a&&(g=a(e));if(d||f)b=this._displayUncommittedDataWarning(g);return b};
AdfDhtmlPage.prototype.checkRegionUncommittedData=function(a,b){AdfAssert.assertArray(a);for(var d=this._isTrackingRegionClientUncommittedData(),e=!1,f=0;f<a.length&&!e;f++){var g=a[f],e=null!=this._dirtyServerRegions&&this._dirtyServerRegions[g];!e&&d&&(e=this._dirtyStateService.isNamingContainerDirty(g))}return e?this._displayRegionUncommittedDataWarning(b):!0};AdfDhtmlPage.prototype.getUncommittedRegionIds=function(){return this._getDirtyRegionIds()||[]};
AdfDhtmlPage.prototype.__setAutomationEnabled=function(a){AdfAssert.assertBoolean(a);(this._automationEnabled=a)&&this._detectSeleniumRC()&&this.__markSeleniumRC()};AdfDhtmlPage.prototype.isAutomationEnabled=function(){return this._automationEnabled};AdfDhtmlPage.prototype.__setAsynchronousUpdatesState=function(a){AdfAssert.assertString(a);this._asynchronousUpdatesState=a};AdfDhtmlPage.prototype.getAsynchronousUpdatesState=function(){return this._asynchronousUpdatesState};
AdfDhtmlPage.prototype.__setCssSelectorsUncompressed=function(a){AdfAssert.assertBoolean(a);this._cssSelectorsUncompressed=a};AdfDhtmlPage.prototype.areCssSelectorsUncompressed=function(){return this._cssSelectorsUncompressed};AdfDhtmlPage.prototype.setAnimationEnabled=function(a){AdfAssert.assertBoolean(a);this._animationEnabled=a};AdfDhtmlPage.prototype.isAnimationEnabled=function(){return this._animationEnabled};AdfDhtmlPage.prototype.getSessionIdentifier=function(){return this._sessionId};
AdfDhtmlPage.prototype.__setSessionIdentifier=function(a){this._sessionId=a;return this};AdfDhtmlPage.prototype.__notifyReturnFromDialog=function(){this._disableUncommittedWarnings();"aggressive"!=this._windowDetectionStrategy&&(this._returnFromDialog=!0)};AdfDhtmlPage.prototype.shouldInterpretEmptyStringSubmittedValuesAsNull=function(){return this._interpretEmptyString};AdfDhtmlPage.prototype.__setShouldInterpretEmptyStringSubmittedValuesAsNull=function(a){this._interpretEmptyString=a};
AdfDhtmlPage.prototype.shouldValidateEmptyFields=function(){return this._validateEmptyFields};AdfDhtmlPage.prototype.__setShouldValidateEmptyFields=function(a){this._validateEmptyFields=a};AdfDhtmlPage.prototype.getResponseIdentifier=function(){return this._responseId};AdfDhtmlPage.prototype.__setResponseIdentifier=function(a){this._responseId=a;return this};AdfDhtmlPage.prototype.__setOutputMode=function(a){this._outputMode=a;return this};AdfDhtmlPage.prototype.getOutputMode=function(){return this._outputMode};
AdfDhtmlPage.prototype.shouldTracePPRRequestId=function(){return this.__shouldTracePPRRequestId};AdfDhtmlPage.prototype.__setShouldTracePPRRequestId=function(a){this.__shouldTracePPRRequestId=a};AdfDhtmlPage.prototype.setPageProperty=function(a,b){AdfAssert.assertString(a);this._pageProperties[a]=b};AdfDhtmlPage.prototype.getPageProperty=function(a){AdfAssert.assertString(a);return this._pageProperties[a]};
AdfDhtmlPage.prototype.getComponentsByType=function(a){AdfAssert.assertNonEmptyString(a);var b=[],d;for(d in this._clientIdToComponentMap){var e=this._clientIdToComponentMap[d];e&&e.getComponentType()==a&&b.push(e)}return b};AdfDhtmlPage.prototype.matchComponents=function(a,b){AdfAssert.assertFunction(a);void 0===b&&(b=this);var d=[],e;for(e in this._clientIdToComponentMap){var f=this._clientIdToComponentMap[e],g=a.call(b,f);g&1&&d.push(f);if(g&2)break}return d};
AdfDhtmlPage.prototype.getViewId=function(){return void 0!=this._viewId?this._viewId:""};AdfDhtmlPage.prototype.__setViewId=function(a){this._viewId=a};AdfDhtmlPage.prototype.findComponent=function(a){return this._clientIdToComponentMap[a]};AdfDhtmlPage.prototype.getClientIdToComponentMap=function(){return this._clientIdToComponentMap};AdfDhtmlPage.prototype._findComponentAbsoluteLocator=function(a){return this._clientIdToAbsoluteLocatorMap[a]};
AdfDhtmlPage.prototype._getClientIdToAbsoluteLocatorMap=function(){return this._clientIdToAbsoluteLocatorMap};AdfDhtmlPage.prototype.findComponentByAbsoluteLocator=function(a){if(window.AdfLocators)return AdfLocators.findComponentByAbsoluteLocator(this,a);throw Error("Automation must be enabled to call findComponentByAbsoluteLocator()");};
AdfDhtmlPage.prototype.findComponentOrAncestorByAbsoluteLocator=function(a){if(window.AdfLocators)return AdfLocators.findComponentOrAncestorByAbsoluteLocator(this,a);throw Error("Automation must be enabled to call findComponentOrAncestorByAbsoluteLocator()");};AdfDhtmlPage.prototype.findComponentWithBackup=function(a,b){if(window.AdfLocators)return AdfLocators.findComponentWithBackup(this,a,b);throw Error("Automation must be enabled to call findComponentWithBackup()");};
AdfDhtmlPage.prototype.findComponentByComplexLocator=function(a,b){if(window.AdfLocators)return AdfLocators.findComponentByComplexLocator(this,a,b);throw Error("Automation must be enabled to call findComponentByComplexLocator()");};AdfDhtmlPage.prototype.findComponentsByComplexLocator=function(a,b){if(window.AdfLocators)return AdfLocators.findComponentsByComplexLocator(this,a,b);throw Error("Automation must be enabled to call findComponentsByComplexLocator()");};
AdfDhtmlPage.prototype.getAbsoluteLocator=function(a){var b=a.getClientId(),d=this._findComponentAbsoluteLocator(b);if(null==d){var e=a.getPeer(),d=e.getAbsoluteLocator(a,b);e.isAbsoluteLocatorCacheable()&&this._mapComponentAbsoluteLocator(b,d)}return d};
AdfDhtmlPage.prototype.unmapComponent=function(a){this.isActiveDataSupported()&&this.getActiveDataSupport().unmapComponent(a);a in this._autoPPRComponents&&this._stopAutoPPR(a);var b=this._clientListeners;null!=b&&(b=b[AdfComponentRemovedEvent.EVENT_TYPE],null!=b&&AdfEventUtils.deliverEventToListeners(b,new AdfComponentRemovedEvent(this,a)));delete this._clientIdToComponentMap[a];this._unmapComponentAbsoluteLocator(a)};
AdfDhtmlPage.prototype.mapComponent=function(a,b){this._clientIdToComponentMap[a]=b};AdfDhtmlPage.prototype._mapComponentAbsoluteLocator=function(a,b){this._clientIdToAbsoluteLocatorMap[a]=b};AdfDhtmlPage.prototype._unmapComponentAbsoluteLocator=function(a){delete this._clientIdToAbsoluteLocatorMap[a]};
AdfDhtmlPage.prototype.unmapDescendantComponentAbsoluteLocators=function(a){a=a.getAbsoluteLocator();for(currClientId in this._clientIdToAbsoluteLocatorMap)this._clientIdToAbsoluteLocatorMap[currClientId].substr(0,a.length)===a&&this._unmapComponentAbsoluteLocator(currClientId)};
AdfDhtmlPage.prototype.addResource=function(a,b){var d;switch(a){case "javascript":this._loadScript(b);break;case "css":d=this._loadCss(b);d.setAttribute("afrres","true");break;case "style":d=this._createStyle(b),d.setAttribute("afrres","true")}};
AdfDhtmlPage.prototype.__applyNewPageStyleSheets=function(a){var b=this._getExistingStyleSheetElements(),d=b.reduce(AdfDhtmlPage._styleSheetMapper,{}),e=a.reduce(AdfDhtmlPage._valueMapper,{}),f;for(f in d)f in e&&(delete e[f],delete d[f]);var g=b.filter(function(a){return a.getAttribute("href")in this},d);a=a.filter(function(a){return a in this},e);if(a.length||g.length)b=this._getHead(),a.reduce(AdfDhtmlPage._insertReduce,{page:this,head:b,insertBefore:null,linkProps:{"data-afr-stylesheet":"1"}}),
window.setTimeout(function(){g.every(function(a){a.parentNode&&a.parentNode.removeChild(a)})},1E3)};AdfDhtmlPage._insertReduce=function(a,b){var d=a.page._createLink(b,a.linkProps);a.head.insertBefore(d,a.insertBefore);a.insertBefore=d.nextSibling;return a};AdfDhtmlPage._valueMapper=function(a,b){a[b]=b;return a};AdfDhtmlPage._styleSheetMapper=function(a,b){var d=b.getAttribute("href");d&&(a[d]=b);return a};AdfDhtmlPage.prototype._getExistingStyleSheetElements=function(){var a=this._getHead();return this._getLinkChildren(a).filter(function(a){return a.hasAttribute("data-afr-stylesheet")})};
AdfDhtmlPage.prototype.Dispose=function(){this.getDataTransferService().pageUnloading();null!=AdfLogger.PROFILER_LOGGER&&AdfLogger.PROFILER_LOGGER.getLogWriter().close();if(this._beforeUnloadDelayed&&(this._unloading=!0,this.isActiveDataSupported()))this.getActiveDataSupport().onBeforeUnload();AdfDhtmlRichDialogService.getInstance().cancelAll();var a=this._autoDismissalManager;a&&(a.dispose(),this._autoDismissalManager=null);if(a=this._modalityManage)a.dispose(),this._modalityManager=null;if(a=this._positionManager)a.dispose(),
this._positionManager=null;if(a=this._zOrderManager)a.dispose(),this._zOrderManager=null;(a=AdfNavigationHistoryAgent.getInstance())&&a.dispose();this.setEditableSubtree(null);var b=AdfAgent.AGENT,a=this.getDomDocument(),d=this.getDomWindow(),e=this._touchContextMenuManager;e&&e.dispose();this._disposeTimers();if(e=this._redistributeEventsCallback)b.removeEventBubbles(a,e),this._redistributeEventsCallback=null;this._onBeforeUnloadCallback&&(b.removeBubbleEventListener(d,"beforeunload",this._onBeforeUnloadCallback),
this._onBeforeUnloadCallback=null);if(e=this._keyEventCallback)b.removeKeyEventListener(a,e),this._keyEventCallback=null;d.onload=null;d.onunload=null;d.onresize=null;if(b=this._dataTransferService)b.dispose(),this._dataTransferService=null;delete this._lastFocusedElement;this._touchContextMenuManager=this._dragDropCallbacks=this._delayedResizeCallback=this._document=this._lastDomEvent=this._window=this._keyCaptureState=this._activeElementBeforeBlocking=this._uiMaskingFrame=this._glassPane=this._uiBlockingDiv=
this._pageProcessingIndicator=null;AdfDhtmlPage._disposeIFrames(a);AdfDhtmlPage.superclass.Dispose.call(this);this.isScreenReaderMode()&&this.unregisterKeyStroke(AdfDhtmlPage._ACTIVE_DATA_HOT_KEY)};AdfDhtmlPage.prototype.addPartialTargets=function(a){var b=arguments.length;if(0<b){var d=this._partialTargets;null==d&&(this._partialTargets=d=[]);for(var e=0;e<b;e++){var f=arguments[e];AdfAssert.assertPrototype(f,AdfUIComponent);f=f.getClientId();f in d||(d[f]=!0,d.push(f))}this.__queueEventTimerIfNeeded()}};
AdfDhtmlPage.prototype._scrubPartialTargets=function(a){var b=null;if(a){for(var b=[],d=a.length,e=0;e<d;e++){var f=a[e];this.findComponent(f)&&b.push(f)}b.length||(b=null)}return b};
AdfDhtmlPage.prototype.addComponents=function(a){var b=this.getDomWindow();this._perfProfileEnabled&&(b._afrTimingAddComponentsStart=(new Date).getTime());for(var d=arguments.length,e=0;e<d;e++)AdfAssert.assertPrototype(arguments[e],AdfUIComponent),arguments[e].AddNotify();this._perfProfileEnabled&&(b._afrTimingAddComponentsEnd=(new Date).getTime())};
AdfDhtmlPage.prototype.addBusyStateListener=function(a,b){AdfAssert.assertFunction(b);AdfAssert.assertObjectOrNull(a);this._busyStateListeners=AdfEventUtils.addListener(this._busyStateListeners,a,b)};AdfDhtmlPage.prototype.removeBusyStateListener=function(a,b){AdfAssert.assertFunction(b);AdfAssert.assertObjectOrNull(a);this._busyStateListeners=AdfEventUtils.removeListener(this._busyStateListeners,b,a)};
AdfDhtmlPage.prototype._broadcastBusyStateEvent=function(a){this._busyState==a?AdfLogger.LOGGER.finest("busy state event broadcast called without a change in state"):(this._busyState=a,this._busyStateListeners&&AdfEventUtils.deliverEventToListeners(this._busyStateListeners,new AdfBusyStateEvent(this,a)))};
AdfDhtmlPage.prototype.__registerDescendantResizeNotifyComponent=function(a){for(var b=this._descendantResizeNotifyList,d=b.length,e=a.getClientId(),f=AdfLogger.LOGGER,g=f.isLoggable(AdfLogger.WARNING),h=0;h<d;h++){var k=b[h].component;if(k==a)return;if(k.getClientId()==e){g&&(b=this.getDomDocument(),g=d="unknown",k=k.getPeer(),a=a.getPeer(),k&&(k=k.getDomElement())&&(d=null!=AdfDomUtils.getCommonAncestor(b,k)),a&&(a=a.getDomElement())&&(g=null!=AdfDomUtils.getCommonAncestor(b,a)),f.warning("__registerDescendantResizeNotifyComponent: Another (different) component instance with this same clientId is already in the descendant resize notify list: "+
e+" (existingConnected\x3d"+d+", newConnected\x3d"+g+")"));return}}e={component:a,depth:AdfDomUtils.getElementDepth(AdfRichUIPeer.getDomElementForComponent(a))};b.push(e);1<b.length&&(this._descendantResizeNotifyListDirty=!0);this._descendantResizeNotifyList=b};AdfDhtmlPage.prototype.__unregisterDescendantResizeNotifyComponent=function(a){for(var b=this._descendantResizeNotifyList,d=b.length,e=0;e<d;e++)if(b[e].component==a){b.splice(e,1);break}};
AdfDhtmlPage.prototype.__queueDescendantResizeNotifySource=function(a){var b=this._descendantResizeNotifyQueue;a=a.getClientId();if(null==b)b=this._descendantResizeNotifyQueue=[];else if(-1!=AdfCollections.indexOf(b,a))return;b.push(a)};
AdfDhtmlPage.prototype.__doDescendantResizeNotify=function(){if(this._descendantResizeNotifyQueue&&!this._inDescendentResizeNotify){this._inDescendentResizeNotify=!0;try{for(;0<this._descendantResizeNotifyQueue.length;)this._doDescendantResizeNotifyOnQueue(this._descendantResizeNotifyQueue.splice(0,this._descendantResizeNotifyQueue.length))}finally{delete this._inDescendentResizeNotify,delete this._descendantResizeNotifyQueue}}};
AdfDhtmlPage.prototype._doDescendantResizeNotifyOnQueue=function(a){var b=a.length,d=this._descendantResizeNotifyList,e=d.length;this._descendantResizeNotifyListDirty&&(1<d.length&&d.sort(AdfDhtmlPage._descendantResizeNotifyListComparator),this._descendantResizeNotifyListDirty=!1);for(var f=AdfLogger.LOGGER,g=f.isLoggable(AdfLogger.WARNING),h=0;h<e;h++){var k=d[h].component;if(g){var l=k.getClientId(),m=!1,n;for(n in this._resizeNotifyMap)n==l&&(m=!0);if(!m){f.warning("__doDescendantResizeNotify: A component instance is registered with the descendant resize notify list but not with the regular resize notify list but must be: "+
n);break}}for(l=0;l<b;l++)if((m=this.findComponent(a[l]))&&(m==k||m.isDescendant(k))){this.doResizeNotify(k);break}}};AdfDhtmlPage._descendantResizeNotifyListComparator=function(a,b){var d=a.depth,e=b.depth;return d>e?-1:d<e?1:0};
AdfDhtmlPage.prototype.registerResizeNotifyComponent=function(a){var b={component:a},d=a.getClientId(),e=this._resizeNotifyMap;e[d]=b;var f;a=AdfRichUIPeer.getDomElementForComponent(a);AdfAssert.assertDomElement(a);if(a){for(a=a.parentNode;a&&!(1==a.nodeType&&(f=e[a.id]));)a=a.parentNode;null==f&&(f=this._resizeNotifyTree);null==f.children&&(f.children=[]);f.children.push(b);b.parent=f}};
AdfDhtmlPage.prototype.unregisterResizeNotifyComponent=function(a){var b=a.getClientId(),d=this._resizeNotifyMap;if(a=d[b])if(delete d[b],(b=a.parent)&&AdfCollections.removeArrayValue(b.children,a),delete a.parent,b=a.children)AdfAssert.assert(0==b.length,"Unexpected number of children: "+b.length),delete a.children};
AdfDhtmlPage.prototype.doResizeNotify=function(a){if(null==a)a=this._resizeNotifyTree;else{var b=a.getClientId();a=this._resizeNotifyMap[b];AdfAssert.assert(null!=a,"No resizeNotifyNode in map for:"+b)}AdfDhtmlPage._doResizeNotify(a,!0)};
AdfDhtmlPage.prototype.doResizeNotifyDom=function(a,b){var d=this._resizeNotifyMap,e=d[a.id];if(e)AdfDhtmlPage._doResizeNotify(e,b);else{for(var f=a.parentNode;f&&!(e=d[f.id]);)f=f.parentNode;d=!1;f=this._checkCoreBackgroundLoaded(!1);e||(f&&(e=this.getZOrderManager())&&(d=e.containsElement(a)),e=this._resizeNotifyTree);this._doResizeNotifyDomChildren(a,e,d);f&&(e=this.getPositionManager(),d&&e&&e.resizeFloatingElement(a))}};
AdfDhtmlPage.prototype._doResizeNotifyDomChildren=function(a,b,d){var e=AdfAgent.AGENT;if(b=b.children)for(var f=b.length,g=0;g<f;g++){var h=b[g],k=h.component.getClientId(),k=e.getElementById(k);AdfDomUtils.isAncestor(a,k)?AdfDhtmlPage._doResizeNotify(h,!1):d&&this._doResizeNotifyDomChildren(a,h,!0)}};AdfDhtmlPage.prototype.addPropertyChangeListener=function(a,b){AdfAssert.assertFunction(b);this._propertyChangeListeners=AdfEventUtils.addListener(this._propertyChangeListeners,a,b)};
AdfDhtmlPage.prototype.removePropertyChangeListener=function(a,b){AdfAssert.assertFunction(b);this._propertyChangeListeners=AdfEventUtils.removeListener(this._propertyChangeListeners,b,a)};
AdfDhtmlPage.prototype.__addPopupInfo=function(a,b){var d=a.getClientId(),e=b.popupId,f=this._poppedUpComponentInfo[d];f||(this._poppedUpComponentInfo[d]=f={});f[e]=b;if(e=this.getEditableSubtree())if(d=AdfAgent.AGENT,e=d.getElementById(e.getClientId()),(d=d.getElementById(b.anchorId))&&AdfDhtmlPopupWindow.isAncestorOrSelf(e,d))b.madeEditable=!0,d=b.contentDom,this._filterEditableSubtree(d,this._editableCallback,this._editableCallbackContext),AdfAgent.AGENT.addEventCaptures(d,AdfDhtmlPage._inlineSelectionStub),
AdfDomUtils.addCSSClassName(d,"p_AFActiveInlineEditableContainer"),AdfAgent.AGENT.setOpacity(d,100)};AdfDhtmlPage.prototype.__removePopupInfo=function(a,b){var d=a.getClientId(),e=this._poppedUpComponentInfo,f=e[d],g=f[b];if(g.madeEditable&&(g=g.contentDom))AdfAgent.AGENT.removeEventCaptures(g,AdfDhtmlPage._inlineSelectionStub),AdfDomUtils.removeCSSClassName(g,"p_AFActiveInlineEditableContainer");delete f[b];AdfCollections.isEmpty(f)&&delete e[d]};
AdfDhtmlPage.prototype.getSelectedEditingComponents=function(){var a=this._selectedEditingComponents,b=null;if(a)for(var b=[],d=a.length,e=0;e<d;e++){var f=this.findComponent(a[e]);f&&b.push(f)}return b};AdfDhtmlPage.prototype.setSelectedEditingComponents=function(a){AdfAssert.assertArrayOrNull(a);for(var b=this._getEditableSubtrees(this._editableSubtreeId,!1),d=[],e=0;e<b.length;e++){var f=this._intersectSelectionWithEditableSubtreeDom(b[e],a);if(f)for(var g=f.length,h=0;h<g;h++)d.push(f[h])}this._setSelectedEditingComponents(d)};
AdfDhtmlPage.prototype.getEditableSubtree=function(){var a=this._editableSubtreeId;return null!=a?this.findComponent(a):null};AdfDhtmlPage.prototype.setEditableSubtreeFilter=function(a,b){AdfAssert.assertFunctionOrNull(a);this._editableCallback=a;this._editableCallbackContext=b;var d=this._editableSubtreeId;if(null!=d)for(var d=this._getEditableSubtrees(d,!0),e=0;e<d.length;e++){var f=d[e];this._unfilterEditableSubtree(f);this._filterEditableSubtree(f,a,b)}};
AdfDhtmlPage.prototype._getEditableSubtrees=function(a,b){var d=[],e=AdfAgent.AGENT,f=e.getElementById(a);if(f){d.push(f);var g=this._poppedUpComponentInfo,h;for(h in g){var k=g[h],l;for(l in k){var m=k[l],n=e.getElementById(m.anchorId);n&&AdfDhtmlPopupWindow.isAncestorOrSelf(f,n)&&d.push(b?n:m.contentDom)}}}return d};
AdfDhtmlPage.prototype._unfilterEditableSubtree=function(a){AdfAssert.assertDomElement(a);var b=a.id;b&&this.findComponent(b)&&(AdfDomUtils.removeCSSClassName(a,AdfDhtmlPage._SELECTABLE_STYLE),AdfDomUtils.removeCSSClassName(a,AdfDhtmlPage._EDITABLE_STYLE));for(a=a.firstChild;a;)1==a.nodeType&&this._unfilterEditableSubtree(a),a=a.nextSibling};
AdfDhtmlPage.prototype._getFilterResult=function(a,b,d){return a.satisfiesUsage(AdfUIComponent.USAGE_PRIVATE_CHILD)?AdfRichInlineEditor.FILTER_UNSELECTABLE:b?b.call(d,a):AdfRichInlineEditor.FILTER_EDITABLE};AdfDhtmlPage.prototype._filterComponent=function(a,b,d,e){if(e=this._getFilterResult(a,d,e)){d=AdfDhtmlPage._SELECTABLE_STYLE;if(e==AdfRichInlineEditor.FILTER_EDITABLE&&(e=a.getPeer().getInlineEditor(a,null))&&e.preEdit(a))d=AdfDhtmlPage._EDITABLE_STYLE;AdfDomUtils.addCSSClassName(b,d)}};
AdfDhtmlPage.prototype._getClientIdFromComment=function(a){a=a.nodeValue;return"compS|"==a.substring(0,6)?a.substr(6):null};AdfDhtmlPage.prototype._getComponentFromComment=function(a){return(a=this._getClientIdFromComment(a))?this.findComponent(a):null};
AdfDhtmlPage.prototype._filterEditableSubtree=function(a,b,d){AdfAssert.assertDomElement(a);var e=a.id;e&&(e=this.findComponent(e))&&this._filterComponent(e,a,b,d);for(a=a.firstChild;a;){e=a.nodeType;if(1==e)this._filterEditableSubtree(a,b,d);else if(8==e&&(e=this._getComponentFromComment(a))){for(var f=a.nextSibling;f&&1!=f.nodeType;)f=f.nextSibling;f&&this._filterComponent(e,f,b,d)}a=a.nextSibling}};
AdfDhtmlPage.prototype.setEditableSubtree=function(a){AdfAssert.assertPrototypeOrNull(a,AdfUIComponent);var b=this._editableSubtreeId,d=a?a.getClientId():null;if(d!=b){var e,f=this._getEditableSubtrees(b,!0),g=f.length;if(g){e=f[0];for(b=0;b<g;b++){var h=f[b];AdfAgent.AGENT.removeEventCaptures(h,AdfDhtmlPage._inlineSelectionStub);AdfDomUtils.removeCSSClassName(h,"p_AFActiveInlineEditableContainer");this._unfilterEditableSubtree(h)}}this._editableSubtreeId=d;var d=this._getEditableSubtrees(d,!0),f=
d.length,k;if(f){k=this._intersectSelectionWithEditableSubtree(a,this._selectedEditingComponents);for(b=0;b<f;b++)if(g=d[b])this._filterEditableSubtree(g,this._editableCallback,this._editableCallbackContext),AdfAgent.AGENT.addEventCaptures(g,AdfDhtmlPage._inlineSelectionStub),AdfDomUtils.addCSSClassName(g,"p_AFActiveInlineEditableContainer")}this._setSelectedEditingComponents(k);AdfEventUtils.firePropertyChangeEvent(this._propertyChangeListeners,this,AdfPage.EDITABLE_SUBTREE_PROPERTY,e,a)}};
AdfDhtmlPage.prototype.getEditedComponent=function(){var a=this._editedComponentId;return null!=a?this.findComponent(a):null};
AdfDhtmlPage.prototype.setEditedComponent=function(a,b){AdfAssert.assertPrototypeOrNull(a,AdfUIComponent);var d;if(null!=a){d=a.getClientId();var e=AdfRichUIPeer.getDomContentElementForComponent(a);AdfDomUtils.containsCSSClassName(e,AdfDhtmlPage._EDITABLE_STYLE)||(d=null,AdfDomUtils.containsCSSClassName(e,AdfDhtmlPage._SELECTABLE_STYLE)||(a=null))}else d=null;e=null;null!=d&&(e=a.getPeer().getInlineEditor(a,b),null==e&&(a=d=null));var f;if(this._editedComponentId!=d){f=this.getEditedComponent();var g=
this._inlineEditor;null!=g&&g.stopEdit();this._editedComponentId=d;this._inlineEditor=e}else f=a;a&&this.setSelectedEditingComponents([a]);f!=a&&(null!=e&&e.startEdit(a,b),AdfEventUtils.firePropertyChangeEvent(this._propertyChangeListeners,this,AdfPage.EDITED_COMPONENT_PROPERTY,f,a))};
AdfDhtmlPage.prototype.getDataTransferService=function(a,b,d){var e;e=b?this._adsDataTransferService:d?this._uploadDataTransferService:this._dataTransferService;if(null==e){if(a)return null;if(this.isAttachmentMode())e=new AdfOfflineDataTransferService(f);else{var f=this.getDomWindow();e=new AdfXmlHttpDataTransferService(f)}b?this._adsDataTransferService=e:d?this._uploadDataTransferService=e:this._dataTransferService=e;e.addStateChangeListener(this._dtsStateChanged,this)}return e};
AdfDhtmlPage.prototype.getAutoDismissalManager=function(){this.__ensureCoreBackgroundLoaded();var a=this._autoDismissalManager;null==a&&(this._autoDismissalManager=a=new AdfAutoDismissalManager);return a};AdfDhtmlPage.prototype.getModalityManager=function(){this.__ensureCoreBackgroundLoaded();var a=this._modalityManager;null==a&&(this._modalityManager=a=new AdfDhtmlModalityManager);return a};
AdfDhtmlPage.prototype.getPositionManager=function(){this.__ensureCoreBackgroundLoaded();var a=this._positionManager;null==a&&(this._positionManager=a=new AdfDhtmlPositionManager);return a};AdfDhtmlPage.prototype.getZOrderManager=function(){this.__ensureCoreBackgroundLoaded();var a=this._zOrderManager;null==a&&(this._zOrderManager=a=new AdfDhtmlZOrderManager);return a};
AdfDhtmlPage.prototype.scheduleTimer=function(a,b,d,e,f){AdfAssert.assertFunction(b);AdfAssert.assertNumber(e);var g=AdfDhtmlPage._timers,h=AdfDhtmlPage._nextTimerId++,k={};k[AdfDhtmlPage.TIMER_CONTEXT]=a;k[AdfDhtmlPage.TIMER_STATE]=d;k[AdfDhtmlPage.TIMER_CALLBACK]=b;k[AdfDhtmlPage.TIMER_ID]=h;if(f&&f[AdfDhtmlPage.TIMER_IS_SYNCHRONIZED]&&("true"===f[AdfDhtmlPage.TIMER_IS_SYNCHRONIZED]||!0===f[AdfDhtmlPage.TIMER_IS_SYNCHRONIZED]))k[AdfDhtmlPage.TIMER_IS_SYNCHRONIZED]=!0;g[h]=k;k[AdfDhtmlPage.TIMER_DOM_ID]=
this.getDomWindow().setTimeout("AdfDhtmlPage.__callTimerCallback("+h+");",e);return h};AdfDhtmlPage.prototype.rescheduleTimer=function(a,b){AdfAssert.assertNumeric(a);AdfAssert.assertNumber(b);a=a.valueOf();var d=AdfDhtmlPage._timers[a];null!=d?(window.clearTimeout(d[AdfDhtmlPage.TIMER_DOM_ID]),d[AdfDhtmlPage.TIMER_DOM_ID]=this.getDomWindow().setTimeout("AdfDhtmlPage.__callTimerCallback("+a+");",b)):AdfLogger.LOGGER.warning("Attempt to reschedule unknown timerId:",a)};
AdfDhtmlPage.prototype.cancelTimer=function(a){AdfAssert.assertNumeric(a);a=a.valueOf();var b=AdfDhtmlPage._timers,d=b[a];null!=d?(this.getDomWindow().clearTimeout(d[AdfDhtmlPage.TIMER_DOM_ID]),delete b[a]):AdfLogger.LOGGER.warning("Attempt to cancel unknown timerId:",a)};AdfDhtmlPage.prototype._disposeTimers=function(){var a=AdfDhtmlPage._timers;AdfDhtmlPage._timers=null;var b=this.getDomWindow(),d;for(d in a){var e=a[d];if(null!=e)try{b.clearTimeout(e[AdfDhtmlPage.TIMER_DOM_ID])}catch(f){}}};
AdfDhtmlPage.prototype._areSynchronousTimersCleared=function(){var a=AdfDhtmlPage._timers,b;for(b in a){var d=a[b];if(null!=d&&d[AdfDhtmlPage.TIMER_IS_SYNCHRONIZED])return!1}return!0};
AdfDhtmlPage.__callTimerCallback=function(a){AdfAssert.assertNumber(a);var b=AdfDhtmlPage._timers;if(null!=b){var d=b[a];if(null!=d){var e;try{e=d[AdfDhtmlPage.TIMER_CALLBACK].call(d[AdfDhtmlPage.TIMER_CONTEXT],d[AdfDhtmlPage.TIMER_STATE])}catch(f){AdfLogger.LOGGER.logErrorAsWarning(f," when calling timer callback")}AdfAssert.assertNumberOrNull(e);void 0==e||0>e?delete b[a]:d[AdfDhtmlPage.TIMER_DOM_ID]=AdfPage.PAGE.getDomWindow().setTimeout("AdfDhtmlPage.__callTimerCallback("+a+");",e)}}};
AdfDhtmlPage.prototype._getAndClearDeltas=function(a){var b=this.GetChangedComponents();if(null==b)return null;var d=Array(50),e=!1,f=AdfStrings.COMMA,g=AdfStrings.EQUALS,h=AdfStrings.START_CURLY_BRACKET,k=AdfStrings.CLOSE_CURLY_BRACKET,l;for(l in b){var m=b[l];if(!m.getPeer()){var n=m.getClientId();(n=this.findComponent(n))&&(m=n)}var n=!1,p=m.GetChanges(),q;for(q in p){n?d.push(f):(e?d.push(f):(d.push(h),e=!0),d.push(m.getClientId()),d.push("\x3d{"),n=!0);var r=p[q],s=q.length-2;q.lastIndexOf(AdfUIComponent._FLAG_PERSISTENCE)==
s&&q.substr(0,s);null!=r&&(r=r instanceof Date?AdfAgent.AGENT.toISOString(r):r.toString().replace(/\{/g,"%7B").replace(/\}/g,"%7D").replace(/\,/g,"%2C").replace(/\=/g,"%3D"));d.push(q);d.push(g);d.push(r)}n&&d.push(k)}e&&d.push(k);a&&this.ClearChangesList();return d.join("")};AdfDhtmlPage.prototype.getResourceURL=function(a){return"//"==a.substring(0,2)?a.substring(1):"/"==a.charAt(0)?this._baseResourceUrl+a:a};
AdfDhtmlPage.prototype.removeResourceURL=function(a){var b=this._baseResourceUrl,d=a.indexOf(b);return 0<=d?a.substr(d+b.length):"/"==a.charAt(0)?"/"+a:a};AdfDhtmlPage._disposeIFrames=function(a){a=a.getElementsByTagName("iframe");for(var b=a.length-1;0<=b;b--){var d=a[b];d.parentNode.removeChild(d)}};AdfDhtmlPage._forceGC=function(a){for(var b=Array(a),d=0;d<a;d++){for(var e=Array(1E4),f=0;1E4>f;f++)e[f]=f;b[d]=e}};
AdfDhtmlPage.prototype._onSelectStart=function(){if(this.isDragging())return!1;var a=this.getDnDContext();return!(a&&a.isDragging())};AdfDhtmlPage.prototype._handleResize=function(){AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM?this._resizePending||(this._resizePending=!0,setTimeout(this._getDelayedResizeCallback(),AdfDhtmlPage._DELAYED_RESIZE_TIMEOUT)):this._onResize()};
AdfDhtmlPage.prototype._getDelayedResizeCallback=function(){this._delayedResizeCallback||(this._delayedResizeCallback=this.createCallback(this._delayedOnResize));return this._delayedResizeCallback};AdfDhtmlPage.prototype._delayedOnResize=function(){this._resizePending=!1;this._onResize()};
AdfDhtmlPage.prototype._onResize=function(){if(this.getPhase()!=AdfPage.CREATE_VIEW_PHASE){this._positionGlassPane(!1);var a=AdfDhtmlPage._BROWSER_RESIZE_CHECKPOINT.start();AdfDhtmlPage._doResizeNotify(this._resizeNotifyTree,!1);AdfDhtmlPage._BROWSER_RESIZE_CHECKPOINT.stop(a)}};
AdfDhtmlPage.prototype.startDrag=function(a,b,d,e,f){var g=AdfAgent.AGENT;a=g.getMousePosition(a);this._dragStartX=a.x;this._dragStartY=a.y;this._dragLastX=this._dragStartX;this._dragLastY=this._dragStartY;this._moveCallback=b;this._dropCallback=d;this._abortCallback=e;(this._dragHideGlassPane=f)?this.showGlassPane(this._dragDropCallbacks,"auto"):(b=this._dragDropCallbacks,g.startMouseEventCapture(b),this._keyCaptureState=g.startDocumentKeyEventCapture(b,this._document.documentElement))};
AdfDhtmlPage.prototype._dragMouseMove=function(a){var b=this._moveCallback,d=AdfAgent.AGENT.getMousePosition(a);b&&b(a,d.x-this._dragLastX,d.y-this._dragLastY);this._dragLastX=d.x;this._dragLastY=d.y};AdfDhtmlPage.prototype._dragMouseUp=function(a){var b=this._dropCallback,d=AdfAgent.AGENT.getMousePosition(a);this.stopDrag();b&&b(a,d.x-this._dragStartX,d.y-this._dragStartY);this._dragLastX=d.x;this._dragLastY=d.y};
AdfDhtmlPage.prototype._dragKeyDown=function(a){if(a.keyCode==AdfKeyStroke.ESC_KEY){var b=this._abortCallback;if(b)return this.stopDrag(),b(),AdfAgent.AGENT.eatEvent(a),!1}};
AdfDhtmlPage.prototype.stopDrag=function(){if(this._dragHideGlassPane)this.hideGlassPane(this._dragDropCallbacks);else{var a=AdfAgent.AGENT,b=this._dragDropCallbacks;a.stopMouseEventCapture(b);var d=a.getPlatform()==AdfAgent.IE_PLATFORM?this._keyCaptureState:null;delete this._keyCaptureState;a.endDocumentKeyEventCapture(b,this._document.documentElement,d)}this._abortCallback=this._dropCallback=this._moveCallback=null};AdfDhtmlPage.prototype.isDragging=function(){return this._moveCallback?!0:!1};
AdfDhtmlPage.prototype.setOnLoadCallback=function(a){this._onLoadCallback=a};AdfDhtmlPage.prototype.preloadImages=function(){this._preloadImages=!0};AdfDhtmlPage.prototype.getActiveComponentId=function(){return this._activeComponentId};AdfDhtmlPage.prototype._setActiveComponentId=function(a){var b=null!=a?AdfAgent.AGENT.getElementById(a):null;this.__setActiveDomNodeInfo(b,a)};AdfDhtmlPage.prototype.getActiveDomElement=function(){return this._activeDomNode};
AdfDhtmlPage.prototype.getActiveComponent=function(){var a=this._activeComponentId;return null!=a?this.findComponent(a):null};
AdfDhtmlPage.prototype.__setActiveDomNodeInfo=function(a,b){AdfAssert.assertDomNodeOrNull(a);AdfAssert.assertStringOrNull(b);void 0===a&&(a=null);var d=this.getActiveComponent(),e=this._activeDomNode;if(AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM&&(e&&a&&"BODY"==a.tagName)&&this.getZOrderManager().containsElement(e))return AdfFocusUtils.focusElementDelayed(e,1),!1;this._activeDomNode=a;this._activeComponentId=b;AdfEventUtils.firePropertyChangeEvent(this._propertyChangeListeners,this,AdfDhtmlPage.ACTIVE_DOM_ELEMENT_PROPERTY,
e,a);AdfEventUtils.firePropertyChangeEvent(this._propertyChangeListeners,this,AdfPage.ACTIVE_COMPONENT_PROPERTY,d,this.getActiveComponent());return!0};
AdfDhtmlPage.prototype.queueEvent=function(a){if(a){AdfAssert.assertPrototype(a,AdfBaseEvent);var b=a.getType();if(!0==this._partialRequestRedirect&&AdfRedirectEvent.REDIRECT_EVENT_TYPE!=b)AdfLogger.LOGGER.info("Redirect in progress... refusing to queue event : ",a);else{(AdfValueChangeEvent.VALUE_CHANGE_TYPE==b||AdfSubmittedValueChangedEvent.SUBMITTED_VALUE_CHANGED_TYPE==b)&&this._dirtyStateService.__handleValueChangeEvent(a);!0==a.propagatesToServer()&&(void 0!==this._haveOutstandingPPRRequest&&
!0==this._haveOutstandingPPRRequest?this.__perfTimings(!1,!1,!0,"user click event : ",a):this.__perfTimings(!0,!0,!0,"user click event: ",a));AdfDhtmlPage._MSG_RESET_CLIENT_AND_SERVER===this._globalMessagesResetStrategy&&a.getClearMessages()&&(AdfLogger.LOGGER.fine("Page level messages cleared by the following event: ",a),b=this._resolveMessageComponentId(null,!1),AdfPage.PAGE.clearMessages(b));if(a.isValidationNeeded()){AdfLogger.LOGGER.fine("Client validation triggered by the following event: ",
a);var b=a.getSource(),d=a.isImmediate();if(!this._processValidators(b,b.getEventRoots(a),d)){a.cancel();this.showMessages();AdfLogger.LOGGER.info("Client validation failed. The following event that triggered the validation was not queued as a result: ",a);return}}this._eventQueue.push(a);this.getPhase()!=AdfPage.DELIVER_EVENTS_PHASE&&this.__queueEventTimerIfNeeded()}}};AdfDhtmlPage.prototype.__queueEventTimerIfNeeded=function(a){this._updateDeliveryTimer(a)};
AdfDhtmlPage.prototype.queueEventToServer=function(a){AdfAssert.assert(!this._inDeliverQueuedServerEvents);if(a)if(AdfAssert.assertPrototype(a,AdfBaseEvent),!0==this._partialRequestRedirect&&AdfRedirectEvent.REDIRECT_EVENT_TYPE!=a.getType())AdfLogger.LOGGER.info("Redirect in progress... refusing to queue event : ",a);else{if(a.isResponseExpected()&&0==a.getMaxTimeBeforePropagation()){var b=a.getSource(),d=b.getClientId(),e=this._busyCounts,f=e[d];f||(f=0,b.getPeer()&&b.getPeer().setBusy(b,!0));e[d]=
f+1}this._serverQueue.push(a);this.getPhase()!=AdfPage.DELIVER_EVENTS_PHASE&&this.__queueEventTimerIfNeeded()}};AdfDhtmlPage.__setNonHtmlResponse=function(a){a.forceFullSubmit();a.noResponseExpected()};AdfDhtmlPage.__setNonHtmlResponsePartialSubmit=function(a){a.setPartial(!0);a.noResponseExpected()};AdfDhtmlPage.__scrollComponentIntoView=function(a,b){AdfPage.PAGE.scheduleTimer(AdfPage.PAGE,AdfDhtmlPage._scrollComponentIntoView,{clientId:a,focus:b},100)};AdfDhtmlPage._scrollComponentIntoView=function(a){AdfPage.PAGE.findComponent(a.clientId).scrollIntoView(a.focus)};
AdfDhtmlPage.prototype._processValidators=function(a,b,d){var e=!0;if(null==b)return e;var f=a.getClientId(),g=f.lastIndexOf(":");for(a=[];0<g;)f=f.substring(0,g),g=this.findComponent(f),null!=g&&g instanceof AdfRichSubform&&a.push(f),g=f.lastIndexOf(":");for(k=0;k<b.length;k++){var h=b[k],f=Array(h);if(h)for(var f=h.getDescendantComponents(f),k=0;f&&k<f.length;k++)if(h=f[k],null!=h&&h instanceof AdfUIEditableValue&&(!d||h.getImmediate())){for(var l=h.getClientId(),g=l.lastIndexOf(":"),m=null;0<g;){l=
l.substring(0,g);g=this.findComponent(l);if(null!=g&&g instanceof AdfRichSubform){m=l;break}g=l.lastIndexOf(":")}g=!0;if(null!=m)if(l=a.length,0<l)for(subformIdIndex=0;subformIdIndex<l&&m!=a[subformIdIndex];subformIdIndex++)subformIdIndex==l-1&&(g=!1);else!1==this.findComponent(m).getDefault()&&(g=!1);g&&(!0==h.getValid()?h.getRequired()&&(m=AdfRichUIPeer.getDomElementForComponent(h),AdfDomUtils.isInVisibleSubtree(m)&&(h.validate(),!1==h.getValid()&&(e=!1))):(m=AdfRichUIPeer.getDomElementForComponent(h),
AdfDomUtils.isInVisibleSubtree(m)&&(m=h.getClientId(),this.hasMessages(m)?e=!1:(h.validate(),h.getValid()||(this.hasMessages(m)?e=!1:AdfLogger.LOGGER.severe("AdfDhtmlPage._processValidators: Ignoring that the component with the id '"+m+"' is invalid because there are no messages to show the user."))))))}}return e};
AdfDhtmlPage._timerDeliverEvents=function(){var a=AdfPage.PAGE;a._eventDispatcherID=void 0;a._eventDispatcherTargetTime=void 0;if(a._inHandleRichResponse||a._inDeliverQueuedEvents||a._inDeliverQueuedServerEvents)a._updateDeliveryTimer();else{a._deliverAllQueuedEvents();var b=a._serverQueue.getWaitingTimeout();0<=b&&a._updateDeliveryTimer(b)}};
AdfDhtmlPage.prototype._updateDeliveryTimer=function(a){if(void 0===a||50>a)a=50;var b=!1,d=(new Date).getTime()+a;void 0!==this._eventDispatcherID&&(AdfAssert.assert(void 0!==this._eventDispatcherTargetTime),this._eventDispatcherTargetTime>d?this.cancelTimer(this._eventDispatcherID):b=!0);b||(this._eventDispatcherTargetTime=d,b={},15E3>=a&&(b={isSynchronized:"true"}),this._eventDispatcherID=this.scheduleTimer(this,AdfDhtmlPage._timerDeliverEvents,null,a,b))};
AdfDhtmlPage.prototype._eventLoopDeliverEvents=function(){this._deliverAllQueuedEvents();var a=this._serverQueue.getWaitingTimeout();0<=a?this._updateDeliveryTimer(a):void 0!==this._eventDispatcherID&&(this.cancelTimer(this._eventDispatcherID),this._eventDispatcherTargetTime=this._eventDispatcherID=void 0)};AdfDhtmlPage.prototype._deliverAllQueuedEvents=function(){this._deliverQueuedEvents();this.getDataTransferService().getDTSState()==AdfDataTransferService.STATE_READY&&this._deliverQueuedServerEvents()};
AdfDhtmlPage.prototype._deliverQueuedEvents=function(){if(!this._inDeliverQueuedEvents){var a=this._eventQueue;try{this._inDeliverQueuedEvents=!0;do{var b=a.shift();if(!b)break;b instanceof AdfUIInputEvent||AdfLogger.LOGGER.fine("Broadcasting:",b);b.getSource().broadcast(b)}while(1)}finally{this._inDeliverQueuedEvents=!1}}};AdfDhtmlPage.prototype._findFirstAdfForm=function(){for(var a=this.getDomDocument().forms,b=a.length,d=0;d<b;d++){var e=a[d],f=e.id;if(f&&this.findComponent(f))return e}return null};
AdfDhtmlPage.prototype._deliverQueuedServerEvents=function(a,b){if(!this.isAttachmentMode()&&!this._partialRequestRedirect&&!this.isPerformingFullSubmit()&&!0!=this._inDeliverQueuedServerEvents){this._inDeliverQueuedServerEvents=!0;var d=this.isActiveDataSupported()?AdfCollections.isEmpty(this.getActiveDataSupport().getActiveComponents()):!0,e=this._scrubPartialTargets(this._partialTargets),f=0<this._startADSClientIdCount&&0<this._canReceiveActiveDataCount,g=!d&&this._restartAllADSComponents&&0<this._canReceiveActiveDataCount,
h=this._stopADSClientIds,k=f||g||0<h.length,l=null!=this._windowEventHeaderMap;this._serverQueue.validate();var m=this._serverQueue.hasEventsToDeliver(),n=null!=e||k||l,p=!1;if(m||n||a){var q={},r={},s=!0,u=null,t=AdfDhtmlPage._getFormElement,v=0!=(this.getPPRNavigationOptions()&AdfDhtmlPage.PPR_NAVIGATION_FORCE_PPR),w=!1;if(this.isUserActivityMonitoringOn()&&d)var z=AdfUserActivityInfo.getInstance(AdfUserActivityInfo.PRIMARY);null!=e&&(u=e.join(","),q[AdfDhtmlPage.PARTIAL_TARGETS_PARAM]=u,this.isUserActivityMonitoringOn()&&
d&&z.setPprTargets(u),u=t(this.findComponent(e[0])),this._partialTargets=null);var y=this._getAndClearDeltas(m||null!=q[AdfDhtmlPage.PARTIAL_TARGETS_PARAM]);if(y)q["oracle.adf.view.rich.DELTAS"]=y;else if(!m&&!n){this._inDeliverQueuedServerEvents=!1;return}var m=!1,e={},A=this._serverQueue.shiftEvents(n,y),y=n=null,B=A.length;if(1==B){var C=A[0];C.isResponseExpected()?C.isDeliveryDiscrete()&&(y=C):n=y=C}for(var C=[],D=[],G=!1,B=B-1;0<=B;B--){var E=A[B],H=E.getType();e[H]=H;var I=E.getSource(),J=I.getClientId();
p||(p=E.isResponseAnnounced());var N=t(I);null==u&&(u=N);if(u==N){if(J){J in r||C.push(J);var N=E.getProperties(),Q=r[J];if(Q){if(Q[H])continue}else Q=[],r[J]=Q;Q[H]=!0;var O=E._adfServerParams;O&&(q=AdfCollections.copyInto(O,q));Q.unshift(N);this.isUserActivityMonitoringOn()&&(d&&!G)&&z.setEventInfo(E.getType(),J,I.getComponentType(),I.getAccessibleName())}else AdfLogger.LOGGER.severe("Can not post events for ",component," because it has no clientId");N=E.isPartial()&&!E.isFullSubmitForced();m=m||
E.IsUserInputPrevented();v&&(!N&&H==AdfActionEvent.ACTION_EVENT_TYPE&&!E.isFullSubmitForced())&&(w=N=!0);s&=N}else AdfLogger.LOGGER.severe("Only submits to a single form are currently supported");if(E=I.getEventRoots(E)){if(null!==D){H=!1;for(index=0;index<E.length;index++)I=E[index].getClientId(),H=H||J==I,D.push(I);H||D.push(J)}}else D=null;this.isUserActivityMonitoringOn()&&(d&&!G)&&(G=(new Date).getTime().toString(),z.setClientStartTime(G),AdfUserActivityInfo.saveToSessionStorageByType(AdfUserActivityInfo.PRIMARY),
q["oracle.adf.view.rich.monitoring.UserActivityInfo"]=AdfUserActivityInfo.getMarshaledObject(),G=!0)}0<C.length&&(q.event=C.join(","));for(var U in r)q["event."+U]=this._marshallMultipleEventParameters(r[U]);d=null;if(k){d={};if(f||g){f=g?this.getActiveDataSupport().getActiveComponents():this._startADSClientIds;this._startADSClientIds={};this._startADSClientIdCount=0;this._restartAllADSComponents=!1;g=[];k=[];for(currClientId in f)null==u&&(u=t(this.findComponent(currClientId))),this.getActiveDataSupport().populateStartActiveDataArray(g,
k,currClientId);q["oracle.adf.view.rich.START_ACTIVE_DATA"]=g.join(",");q["oracle.adf.view.rich.START_ACTIVE_DATA_EVENT_IDS"]=k.join(",")}0<h.length&&(this._stopADSClientIds=[],q["oracle.adf.view.rich.STOP_ACTIVE_DATA"]=h.join(","))}if(null==u&&(u=this._findFirstAdfForm(),!u)){this._inDeliverQueuedServerEvents=!1;return}AdfAssert.assert(u,"No form found;  cannot postback");l&&(d||(d={}),d=AdfCollections.copyInto(d,this._windowEventHeaderMap),delete this._windowEventHeaderMap,u&&"true"==d["Adf-Window-Opened"]&&
(u.action=this.getDomWindow().location.href));AdfDomUtils.isMultiPartForm(u)&&(h=u.action,l=this.getWindowId(),t=this.getPageStateId(),h=AdfXmlHttpDataTransferService.__encodeWindowIdOnUrl(h,l),u.action=AdfXmlHttpDataTransferService.__encodePageIdOnUrl(h,t),b&&u.setAttribute("enctype","application/x-www-form-urlencoded"));d=this._addPageId(d);this.isPortlet()&&AdfDomUtils.getInputFileForm(u)&&(s=!1);h=null;null!=n?h=n.getSource().getClientId():s&&(D&&D.length)&&(h=D.join(","));null!=h&&(q["oracle.adf.view.rich.PROCESS"]=
h);s&&w&&(q["oracle.adf.view.rich.PPR_FORCED"]="true");w={};w._discreteEvent=y;w._responseAnnounced=p;w._clientEventsSet=e;w.__isSynchronous=this._synchronousUnloadedNotify?!0:!1;delete this._synchronousUnloadedNotify;null!=n?(m=!1,w._noResponseExpected=!0):this._serverQueue.hasEventsToDeliver()&&(m=!0);s?(this._doRichPostback(u,q,d,m,w,C),this.__perfTimings(!1,!1,!0,"deliver PPR request. Event: ",q.event),this._haveOutstandingPPRRequest=!0):(this.__perfTimings(!1,!1,!0,"deliver full postback request. Event: ",
q.event),this._doFullPostback(u,q,m,null==n))}this._inDeliverQueuedServerEvents=!1}};AdfDhtmlPage.prototype._sendRichPayload=function(a,b){AdfAssert.assert(a,"Attempting to send null payload");var d=this.getDomDocument().forms[0];AdfAssert.assert(d,"No form found;  cannot postback");var e=this._addPageId(null);AdfDhtmlPage._addStateParameter(d,a);AdfDhtmlPage._addPageStateIdParameter(d,a);this._doRichPostback(d,a,e,!1,b,null,null)};
AdfDhtmlPage.prototype._addPageId=function(a){a||(a={});null!=this.getPageId()&&(a["Adf-Ads-Page-Id"]=this.getPageId());return a};AdfDhtmlPage.__addServerParamsToEvent=function(a,b){b&&(a._adfServerParams=b)};AdfDhtmlPage.prototype.__getLastDomEvent=function(){return this._lastDomEvent};
AdfDhtmlPage.prototype.deliverEventToNewWindow=function(a){var b=a.getSource(),d=b.getClientId(),e={event:d};e["event."+d]=this._marshallMultipleEventParameters(Array(a.getProperties()));(a=this._getAndClearDeltas(!1))&&(e["oracle.adf.view.rich.DELTAS"]=a);b=AdfDhtmlPage._getFormElement(b);a=b.hasAttribute("target")?b.getAttribute("target"):"";b.setAttribute("target",AdfDhtmlPage._PRINTABLE_WINDOW_NAME);var f,g;if(d=AdfDomUtils.isMultiPartForm(b))g=this.getWindowId(),f=b.getAttribute("action"),b.setAttribute("action",
AdfXmlHttpDataTransferService.__encodeWindowIdOnUrl(f,g)),g=b.getAttribute("enctype"),b.setAttribute("enctype","application/x-www-form-urlencoded");this._doFullPostback(b,e,!1,!1);b.setAttribute("target",a);d&&(b.setAttribute("action",f),b.setAttribute("enctype",g))};
AdfDhtmlPage.prototype._marshallMultipleEventParameters=function(a){var b=AdfAgent.AGENT,d=b.createXmlDocument(),e=d.createElement("TEMP");b.getPlatform()==AdfAgent.IE_PLATFORM?d.documentElement=e:d.appendChild(e);a=1<a.length?a:a[0];e=AdfMarshalingService.getDefault().marshal(e,a,null);return b.getNodeXml(e)};
AdfDhtmlPage.prototype.removeComponentsInSubtree=function(a){var b,d;try{if(a.id==AdfDhtmlPage._NAVIGATION_WRAPPER_ID)for(d in this.clearAllMessages(),this._clientIdToComponentMap)b=this._clientIdToComponentMap[d],null!=b&&b.RemoveNotify();else{var e=[];this._postOrderPopulate(a,0,e,!1);for(var f=e.length-1;0<=f;f--){var g=e[f];if(null!=g){var h=g.length;for(a=0;a<h;a++)d=g[a],b=this.findComponent(d),null!=b&&b.RemoveNotify()}}}}catch(k){AdfLogger.LOGGER.logErrorAsSevere(k,"remove components in subtree")}};
AdfDhtmlPage.prototype.ComponentsInSubtreeCallback=function(a,b,d){var e=[];this._postOrderPopulate(a,0,e,!1);for(a=e.length-1;0<=a;a--){var f=e[a];if(null!=f)for(var g=f.length,h=0;h<g;h++){var k=this.findComponent(f[h]);null!=k&&b(k,d)}}};AdfDhtmlPage.cancelAllPopupsCallback=function(a,b){var d=a.getPeer();d&&d.cancelAllPopups(a,!0)};AdfDhtmlPage.prototype._postOrderPopulateComponent=function(a,b,d){if(a&&null!=this.findComponent(a)){var e=d[b];null==e?(e=Array(a),d[b]=e):e.push(a)}};
AdfDhtmlPage.prototype._postOrderPopulate=function(a,b,d,e){AdfAssert.assertDomElement(a);if(!e||AdfDomUtils.isVisible(a)){var f=a.firstChild;if(null!=f){var g=b+1;do{var h=f.nodeType;1==h?this._postOrderPopulate(f,g,d,e):8==h&&(h=this._getClientIdFromComment(f))&&this._postOrderPopulateComponent(h,g,d);f=f.nextSibling}while(null!=f)}h=a.id;this._postOrderPopulateComponent(h,b,d)}};
AdfDhtmlPage.prototype.__checkRichResponseDirty=function(){return this._isRichResponseDirty()?(this.getDomWindow().location.reload(!0),!0):!1};AdfDhtmlPage._removeFrameBusting=function(){var a=document.getElementById("adfFrameBustStyle");a&&a.parentNode.removeChild(a)};
AdfDhtmlPage._handleMessage=function(a){if("_adfShowBody"===a.data){a=a.origin;for(var b=AdfPage.PAGE,d=b._allowedOrigins,e=d.length,f=0;f<e;f++)if(d[f].test(a)){AdfDhtmlPage._removeFrameBusting();AdfDhtmlPage._doResizeNotify(b._resizeNotifyTree);break}}};
AdfDhtmlPage.prototype.__setUpFrameBusting=function(a){if(self==top)AdfDhtmlPage._removeFrameBusting();else if(a){window.addEventListener("message",AdfDhtmlPage._handleMessage);for(var b=a.length,d=[],e=0;e<b;e++)d[e]=RegExp(a[e],"i");this._allowedOrigins=d}};
AdfDhtmlPage.prototype.__onLoad=function(){var a=this.getDomWindow(),b=AdfAgent.AGENT;try{this._perfProfileEnabled&&(a._afrTimingOnLoadEnd=(new Date).getTime());var d=AdfDhtmlPage._LOAD_CHECKPOINT.start(),e=this.getDomDocument(),f=this.createCallback(this._redistribute);b.addEventBubbles(e,f);this._redistributeEventsCallback=f;this._touchContextMenuManager=b.createContextMenuEventGenerator();b.addKeyEventListener(e,AdfDhtmlPage._keyEventCallback);this._onBeforeUnloadCallback=this.createCallback(this._handleBeforeUnload);
b.addBubbleEventListener(a,"beforeunload",this._onBeforeUnloadCallback);this._perfProfileEnabled&&(a._afrTimingResizeStart=(new Date).getTime());AdfDhtmlPage._doResizeNotify(this._resizeNotifyTree);this._perfProfileEnabled&&(a._afrTimingResizeEnd=(new Date).getTime());this._loadedCss=this._collectCss();this._preloadImages&&this._forcePreloadOfAllImages();this._replaceJsfAjaxFunctions();var g=this._onLoadCallback;if(g){var h=AdfDhtmlPage._CALLBACK_CHECKPOINT.start();g();AdfDhtmlPage._CALLBACK_CHECKPOINT.stop(h)}}finally{if(a=
b.getElementById("afr::Splash"))a.style.display="none";this.SetPhase(AdfPage.WAITING_FOR_USER_INPUT_PHASE)}this._initializationComplete=!0;this._startGlobalActiveData();this._inAppNavigationFlag=!1;AdfDhtmlPage._LOAD_CHECKPOINT.stop(d);this._restorePreviousUserActivityData();this._partialRequestRedirect=!1;AdfNavigationHistoryAgent.getInstance().startTrackingURI(this);this._onLoadPerfTimings();this._checkForHighContrastInBrowser();AdfLogger.LOGGER.getLogWriter().flush()};
AdfDhtmlPage.prototype.getFacesPath=function(){return this._facesPath};AdfDhtmlPage.prototype.setFacesPath=function(a){this._facesPath=a;AdfNavigationHistoryAgent.getInstance().setFacesPath(a)};AdfDhtmlPage.prototype.loadView=function(a,b,d,e){a=this._facesPath+a;null!=b&&(a+=b);b=null;null!=e&&(b={},b[AdfDhtmlPage._PAGE_STATE_ID]=e);this._blockUI(!0);this.getDataTransferService().sendRequest({_loadId:d},a,b,"_",[this])};
AdfDhtmlPage.prototype._onLoadPerfTimings=function(){if(this._perfProfileEnabled){var a=this.getDomWindow(),b=a._afrTimingPreLoadStart,d=(new Date).getTime(),e=a._afrTimingCoreLibraryPartitionLoadEnd-a._afrTimingCoreLibraryPartitionLoadStart,f=a._afrTimingBootstrapLibraryPartitionLoadEnd-a._afrTimingBootstrapLibraryPartitionLoadStart,g=a._afrTimingLibraryPartitionsLoadStart,h=a._afrTimingLibraryPartitionsLoadEnd-g,k=a._afrTimingSkinLoadEnd-a._afrTimingSkinLoadStart,l=a._afrTimingCoreLibraryLoadEnd-
a._afrTimingCoreLibraryLoadStart,m=a._afrTimingProfilerLibraryLoadEnd-a._afrTimingProfilerLibraryLoadStart,n=a._afrTimingPreludeEnd-a._afrTimingPreludeStart,p=a._afrTimingProfilerScriptLoadEnd-a._afrTimingProfilerScriptLoadStart,q=a._afrTimingTranslationsLoadEnd,r=q-a._afrTimingTranslationsLoadStart,s=a._afrTimingElementsAddedStart,u=a._afrTimingElementsAddedEnd-s,t=a._afrTimingRenderSkinPropertiesEnd-a._afrTimingRenderSkinPropertiesStart,v=a._afrTimingAddComponentsEnd-a._afrTimingAddComponentsStart,
w=a._afrTimingExtendedScriptsExecuteEnd-a._afrTimingExtendedScriptsExecuteStart,z=a._afrTimingLoadScriptLoadEnd-a._afrTimingLoadScriptLoadStart,y=a._afrTimingExtendedScriptsLoadEnd,A=y-a._afrTimingExtendedScriptsLoadStart,B=a._afrTimingPPRNavInitScriptEnd-a._afrTimingPPRNavInitScriptStart,C=a._afrTimingEncodeComponentsEnd-a._afrTimingEncodeComponentsStart-v,g=g-q,s=s-y,y=a._afrTimingOnLoadEnd-b,a=a._afrTimingResizeEnd-a._afrTimingResizeStart;AdfLogger.PROFILER_LOGGER.info("initial page load started;",
b);AdfLogger.PROFILER_LOGGER.info("CSS skin load time;;",k);AdfLogger.PROFILER_LOGGER.info("JS Trinidad library load time;;",l);AdfLogger.PROFILER_LOGGER.info("JS profiler library load time;;",m);AdfLogger.PROFILER_LOGGER.info("JS bootstrap library partition load time;;",f);AdfLogger.PROFILER_LOGGER.info("JS prelude script time;;",n);AdfLogger.PROFILER_LOGGER.info("JS profiler script load time;;",p);AdfLogger.PROFILER_LOGGER.info("JS core library partition load time;;",e);AdfLogger.PROFILER_LOGGER.info("JS translations library load time;;",
r);AdfLogger.PROFILER_LOGGER.info("HTML layout time;;",g);AdfLogger.PROFILER_LOGGER.info("JS library partitions load time;;",h);AdfLogger.PROFILER_LOGGER.info("JS load script time;;",z);AdfLogger.PROFILER_LOGGER.info("JS load extended scripts;;",A);AdfLogger.PROFILER_LOGGER.info("onload handler time;;",s);AdfLogger.PROFILER_LOGGER.info("JS elements added time;;",u);AdfLogger.PROFILER_LOGGER.info("JS render skin properties time;;",t);AdfLogger.PROFILER_LOGGER.info("JS create components time;;",C);
AdfLogger.PROFILER_LOGGER.info("JS add components time;;",v);AdfLogger.PROFILER_LOGGER.info("JS execute extended scripts time;;",w);AdfLogger.PROFILER_LOGGER.info("JS execute ppr init script time;;",B);AdfLogger.PROFILER_LOGGER.info("pre-load total time;;",y);AdfLogger.PROFILER_LOGGER.info("resize time;;",a);AdfLogger.PROFILER_LOGGER.info("initial page load done;",d,";",d-b);b=(new Date).getTime();this._logOffset=b-d;this._perfProfileLogClosed=!1}else this._perfProfileTimingEnabled&&(a=this.getDomWindow(),
b=a._afrTimingPreLoadTimingStart,d=(new Date).getTime(),AdfLogger.PROFILER_LOGGER.info("initial page load started;",b),AdfLogger.PROFILER_LOGGER.info("initial page load done;",d,";",d-b),b=(new Date).getTime(),this._logOffset=b-d,this._perfProfileLogClosed=!1)};
AdfDhtmlPage.prototype.__perfTimings=function(a,b,d,e,f){AdfAssert.assertBoolean(a);AdfAssert.assertBoolean(a,b);AdfAssert.assertBoolean(d);if(this._perfProfileEnabled||d&&this._perfProfileTimingEnabled){d=this.getDomWindow();var g=this._perfProfileEnabled?d._afrTimingPreLoadStart:d._afrTimingPreLoadTimingStart;f&&(e+=f);f=(new Date).getTime();void 0===this._logOffset&&(this._logOffset=0);var h=f-this._logOffset;if(a){a=AdfLogger.PROFILER_LOGGER.getLogWriter();var k=AdfClientFileLogWriter.prototype.isPrototypeOf(a);
k&&b?(a.closeRecord(),h=(new Date).getTime(),this._logOffset=0,AdfLogger.PROFILER_LOGGER.info(e,";",h),this._perfProfileLogClosed=!1):k&&!b&&(this._perfProfileLogClosed?AdfLogger.PROFILER_LOGGER.info(e,";",h):AdfLogger.PROFILER_LOGGER.info(e,";",h,";",h-g),a.closeRecord(),this._perfProfileLogClosed=!0,b=(new Date).getTime(),this._logOffset+=b-f);this._perfProfileEnabled?d._afrTimingPreLoadStart=h:d._afrTimingPreLoadTimingStart=h}else this._perfProfileLogClosed?(AdfLogger.PROFILER_LOGGER.info(e,";",
h),this._perfProfileEnabled?d._afrTimingPreLoadStart=h:d._afrTimingPreLoadTimingStart=h):AdfLogger.PROFILER_LOGGER.info(e,";",h,";",h-g),this._perfProfileLogClosed=!1}};
AdfDhtmlPage.prototype._checkForHighContrastInBrowser=function(){var a=this.getDomDocument(),b=a.createElement("div");b.setAttribute("id","hiContrastTestEl");a.body.appendChild(b);var d=window.getComputedStyle(b),e=d.backgroundImage,f=!1;(f=d.borderTopColor==d.borderRightColor||null!=e&&("none"==e||"url (invalid-url:)"==e))&&this.scheduleTimer(this,this.setHighContrast,!0,100);a.body.removeChild(b)};
AdfDhtmlPage.prototype.setHighContrast=function(a){var b=this.getDomDocument();this._isHighContrast=a;!0==a?AdfDomUtils.addCSSClassName(b.body,"p_AFHighContrast"):AdfDomUtils.removeCSSClassName(b.body,"p_AFHighContrast")};AdfDhtmlPage.prototype.isHighContrast=function(){return this._isHighContrast};AdfDhtmlPage._getFormElement=function(a){AdfAssert.assertPrototype(a,AdfUIComponent);return a.getPeer()?(a=AdfRichUIPeer.getDomNodeForComponent(a))?AdfDomUtils.getFormElement(a):null:null};
AdfDhtmlPage.prototype._getParameterElement=function(a,b){AdfAssert.assertString(b);var d=AdfAgent.AGENT.getFormElement(a,b);d||(d=this.getDomDocument().createElement("input"),d.type="hidden",d.name=b,a.appendChild(d));return d};AdfDhtmlPage.prototype._setParameter=function(a,b,d){this._getParameterElement(a,b).value=d};AdfDhtmlPage.prototype._appendParameter=function(a,b,d){a=this._getParameterElement(a,b);(b=a.value)&&(d=b+","+d);a.value=d};
AdfDhtmlPage._removeAllFormElements=function(a){AdfAssert.assert(a,"Invalid form;  cannot remove elements");if(a=a.elements)for(var b=null,d=a.length-1;0<=d;d--)(b=a.item(0))&&b.parentNode.removeChild(b)};AdfDhtmlPage.prototype._getPublicAncestor=function(a){for(;null!=a;)if(a.satisfiesUsage(AdfUIComponent.USAGE_PRIVATE_CHILD))a=a.getParent();else return a};
AdfDhtmlPage.prototype._redistribute=function(a){var b=this.getDnDContext();if(!b||!b.isDragging()){var d=AdfAgent.AGENT;d.getPlatform()==AdfAgent.GECKO_PLATFORM&&(a&&"keypress"==a.type&&27==a.keyCode)&&a.preventDefault();this.SetPhase(AdfPage.DELIVER_EVENTS_PHASE);try{a||(a=this.getDomWindow().event);var e=this.__getUserInactivityTimeoutHelper();e&&e.__resetTimeoutHandler(a);var f=this.__getSessionTimeoutHelper();f&&f.__recordUserActivity(a);this._lastDomEvent=a;var g=d.getEventTarget(a);if(!(null==
g||null==g.nodeType)){var h=this.getActiveComponent(),k=AdfRichUIPeer.getFirstAncestorComponent(g),l=a.type,m=d.mapNativeToComponentEventType(l);if("click"==l)this._fixupLinkOnClick(g);else if("focus"==m){if(this._blurTimer&&(this.cancelTimer(this._blurTimer),this._blurTimer=null),!this.__setActiveDomNodeInfo(g,k?k.getClientId():null)){d.eatEvent(a);return}}else"blur"==m&&(this._blurTimer=this.scheduleTimer(this,this._setActiveTimeout,{activeElement:document.activeElement},1,{isSynchronized:!0}));
if(null!=k){var n=k.getPeer();if(n){if(m==AdfComponentEvent.FOCUS_EVENT_TYPE||m==AdfComponentEvent.BLUR_EVENT_TYPE){if(n.needsFocusTargetStyleClass()){var p=this._getPublicAncestor(k);if(p){var q=AdfRichUIPeer.getDomContentElementForComponent(p);q&&(m==AdfComponentEvent.FOCUS_EVENT_TYPE?AdfDomUtils.addCSSClassName(q,AdfRichUIPeer.FOCUS_TARGET_STYLECLASS):AdfDomUtils.removeCSSClassName(q,AdfRichUIPeer.FOCUS_TARGET_STYLECLASS))}}}else if("mouseover"==l||"mouseout"==l)if(d.supportsTransientStyleClasses()&&
!d.isTouchFirstDevice()){if(p=this._getPublicAncestor(k)){p.getPeer().bind(p);var r=AdfRichUIPeer.getDomContentElementForComponent(p),s=this._activeHoverDomElement;if("mouseover"==l)r&&r!=s&&(s&&(delete this._activeHoverDomElement,AdfDomUtils.removeCSSClassName(s,AdfRichUIPeer.HOVER_TARGET_STYLECLASS)),this._activeHoverDomElement=r,AdfDomUtils.addCSSClassName(r,AdfRichUIPeer.HOVER_TARGET_STYLECLASS));else if("mouseout"==l&&s){var e=!0,u=d.getEventToElement(a);if(u&&null!=u.nodeType)if(s==u)e=!1;else{var t=
AdfRichUIPeer.getFirstAncestorComponent(u);if(t=this._getPublicAncestor(t)){var v=t.getPeer();v.bind(t);v.getDomElement()==s&&(e=!1)}}else e=!1;e&&(AdfDomUtils.removeCSSClassName(s,AdfRichUIPeer.HOVER_TARGET_STYLECLASS),delete this._activeHoverDomElement)}}}else AdfLogger.LOGGER.info("The skinning's hover-target pseudo class is not supported on this configuration.");n._dispatchDomEvent(d,k,a);var w=n.createComponentEvent(k,a,h);if(w){AdfAssert.assert(w.getSource()===k,"event generation can't change event source");
switch(w.getType()){case AdfComponentEvent.FOCUS_EVENT_TYPE:AdfLogger.LOGGER.fine("Focus: ",k);delete this._restorePprFocusIndex;this.__setActiveDomNodeInfo(g,k.getClientId());this._notifyComponentEventListeners(w);break;case AdfComponentEvent.BLUR_EVENT_TYPE:this._notifyComponentEventListeners(w)}b&&AdfUIInputEvent.prototype.isPrototypeOf(w)&&b.__handleInputEvent(w);k.queueEvent(w);var z=this._touchContextMenuManager.deriveContextMenuEvent(w);z&&k.queueEvent(z);this._eventLoopDeliverEvents()}this._descendantResizeNotifyQueue&&
this.getDataTransferService().getDTSState()==AdfDataTransferService.STATE_READY&&this.__doDescendantResizeNotify()}else AdfLogger.LOGGER.severe("Peer null during event redistribution for component id: "+k.getClientId())}}}finally{this.SetPhase(AdfPage.WAITING_FOR_USER_INPUT_PHASE),AdfLogger.LOGGER.getLogWriter().flush()}}};
AdfDhtmlPage.prototype._notifyComponentEventListeners=function(a){var b=this._clientListeners;if(null!=b){var d=a.getType(),b=b[d];null!=b&&AdfEventUtils.deliverEventToListeners(b,a)}};AdfDhtmlPage.prototype._setActiveTimeout=function(a){this._blurTimer=null;a=a.activeElement;var b=null;a==document.activeElement?(AdfAgent.AGENT.getNodeType(a)&&(b=AdfRichUIPeer.getFirstAncestorComponent(a)),a=b?b.getClientId():null,this.getActiveComponentId()!=a&&this._setActiveComponentId(a)):AdfLogger.LOGGER.fine("activeElement not equal document.activeElement in AdfDhtmlPage.prototype._setActiveTimeout")};
AdfDhtmlPage.prototype.createFloatingDiv=function(a,b,d){AdfAssert.assertDomElement(a);AdfAssert.assertNumber(b);AdfAssert.assertString(d);var e=a.ownerDocument,f=e.createElement("DIV"),g=f.style;g.zIndex=b;g.position="absolute";g.visibility="hidden";b=e.createElement("SPAN");b.style.display="block";b.className=d;f.appendChild(b);a.appendChild(f);return f};AdfDhtmlPage.prototype.showFloatingDiv=function(a,b){this._clearFloatingDiv(a);a.firstChild.appendChild(b);a.style.visibility="visible"};
AdfDhtmlPage.prototype.hideFloatingDiv=function(a){AdfAssert.assertDomElement(a);var b=a.style;b.visibility="hidden";b.top="-100px";b.left="-100px";this._clearFloatingDiv(a)};AdfDhtmlPage.prototype._clearFloatingDiv=function(a){AdfAssert.assertDomElement(a);a=a.firstChild;for(var b=a.firstChild,d;b;)d=b.nextSibling,a.removeChild(b),b=d};AdfDhtmlPage.prototype.prepareMaskingFrame=function(a){this.getZOrderManager().prepareMaskingFrame(a)};
AdfDhtmlPage.prototype.createMaskingFrame=function(a){var b=this.getZOrderManager().createMaskingFrame(a);this.moveMaskingFrame(a,b);return b};AdfDhtmlPage.prototype.moveMaskingFrame=function(a,b){var d=b.style,e=AdfAgent.AGENT.getElementPosition(a);d.top=e.y+"px";d.left=e.x+"px";d.width=a.offsetWidth+"px";d.height=a.offsetHeight+"px";d.visibility="visible"};AdfDhtmlPage.prototype.removeMaskingFrame=function(a){this.getZOrderManager().removeMaskingFrame(a)};AdfDhtmlPage.prototype.getDocument=function(){return this._document};
AdfDhtmlPage.prototype.getDomDocument=function(){return this._document};AdfDhtmlPage.prototype.getDomWindow=function(){return this._window};
AdfDhtmlPage.prototype.showGlassPane=function(a,b){AdfLogger.LOGGER.finest("Show glasspane");AdfAssert.assert(a);AdfAssert.assertString(b);var d=this.getGlassPane();this._positionGlassPane(!0);d.style.visibility="visible";var e=AdfAgent.AGENT;e.startMouseEventCapture(a);e.setCursor(d,e.getCursor(b));d=e.getPlatform()==AdfAgent.IE_PLATFORM?this._document.documentElement:d;this._keyCaptureState=e.startDocumentKeyEventCapture(a,d)};
AdfDhtmlPage.prototype.hideGlassPane=function(a){AdfAssert.assert(a);AdfLogger.LOGGER.finest("Hide glasspane");var b=AdfAgent.AGENT,d=this.getGlassPane();b.setCursor(d,"auto");b.stopMouseEventCapture(a);var e=b.getPlatform()==AdfAgent.IE_PLATFORM?this._document.documentElement:d;b.endDocumentKeyEventCapture(a,e,this._keyCaptureState);this._keyCaptureState=null;a=d.style;a.cursor="auto";a.visibility="hidden";a.height="1px";a.width="1px";b.forceCursorChange(this.getDomDocument())};
AdfDhtmlPage.prototype.getDnDContext=function(){var a=this._dndContext;void 0===a&&(this._dndContext=a=this.getDomWindow().AdfDhtmlDnDContext?new AdfDhtmlDnDContext:null);return a};AdfDhtmlPage.prototype.__clearDnDContext=function(){delete this._dndContext};AdfDhtmlPage.prototype.getGlassPane=function(){var a=this._glassPane;a||(this._glassPane=a=this._createGlassPane(this.getDomDocument()));return a};
AdfDhtmlPage.prototype._createGlassPane=function(a){var b=a.createElement("div");b.className="AFBlockingGlassPane";var d=b.style;d.position="absolute";d.left="0px";d.top="0px";AdfDhtmlZOrderManager&&(d.zIndex=AdfDhtmlZOrderManager.getMaxZIndex()+1);d.visibility="hidden";d.tabIndex=-1;d=AdfAgent.AGENT;d.getPlatform()==AdfAgent.OPERA_PLATFORM&&(b.onmousedown=function(){return!1});d.disableUserSelect(b);a.body.appendChild(b);d.setOpacity(b,0);return b};
AdfDhtmlPage.prototype._positionGlassPane=function(a){var b=this._glassPane;if(b&&(b=b.style,a||"visible"==b.visibility)){var d=this.getDomDocument().body;a=Math.max(d.offsetHeight,d.scrollHeight);d=Math.max(d.offsetWidth,d.scrollWidth);b.height=a+"px";b.width=d+"px"}};
AdfDhtmlPage.prototype._positionBlockingGlassPane=function(a){this.getDomDocument();var b=this.getGlassPane(),d=AdfAgent.AGENT;if(b){var e=b.style;if(a||"visible"==e.visibility){var f=d.getDomWindow();a=d.getWindowScrollHeight(f);d=d.getWindowScrollWidth(f);e.height=a+"px";e.width=d+"px";(e=this._uiMaskingFrame)&&this.moveMaskingFrame(b,e)}}};
AdfDhtmlPage.prototype._installBlockingHandler=function(a){var b=AdfAgent.AGENT,d=b.getPlatform()==AdfAgent.IE_PLATFORM,e=this.getGlassPane();e.onkeydown=AdfAgent.eatEventCallback;e.onkeyup=AdfAgent.eatEventCallback;e.onkeypress=AdfAgent.eatEventCallback;e.onmousedown=AdfAgent.eatEventCallback;e.onmouseup=AdfAgent.eatEventCallback;e.onmouseover=AdfAgent.eatEventCallback;e.onmouseout=AdfAgent.eatEventCallback;e.onclick=AdfAgent.eatEventCallback;b.disableBrowserContextMenu(e,!0);var f=this._uiMaskingFrame=
this.createMaskingFrame(e);AdfDomUtils.addCSSClassName(f,"AFBlockingMaskingFrame");var g=f.document;null!=g&&b.disableBrowserContextMenu(g,!0);d?AdfFocusUtils.focusElement(e):b.installKeyboardBlocker(a,!0);if(a=this.getActiveDomElement())this._activeIDBeforeBlocking=a.id;a=b.getDomWindow();b.addBubbleEventListener(a,"resize",this._positionBlockingGlassPaneCallback);b.setOpacity(e,AdfDhtmlPage._BLOCKING_OPACITY);b.setOpacity(f,AdfDhtmlPage._BLOCKING_OPACITY);b=e.style;this._positionBlockingGlassPane(!0);
b.visibility="visible"};
AdfDhtmlPage.prototype._removeBlockingHandler=function(a){var b=AdfAgent.AGENT;b.getPlatform();b.disableBrowserContextMenu(a,!1);var d=this._uiMaskingFrame;delete this._uiMaskingFrame;var e=d.document;null!=e&&b.disableBrowserContextMenu(e,!1);AdfDomUtils.removeCSSClassName(d,"AFBlockingMaskingFrame");this.removeMaskingFrame(d);d=this.getGlassPane();d.onkeydown=null;d.onkeyup=null;d.onkeypress=null;e=d.style;e.cursor="auto";e.visibility="hidden";e.height="0px";e.width="0px";var f=this._activeIDBeforeBlocking;
delete this._activeIDBeforeBlocking;f&&((e=this.getDomDocument().activeElement)||(e=this.getActiveDomElement()),((f=b.getDomDocument().getElementById(f))&&d==e||f&&!e)&&AdfFocusUtils.focusElement(f));(b.getPlatform()!=AdfAgent.IE_PLATFORM||b.getPlatform()==AdfAgent.IE_PLATFORM&&10<b.getVersion())&&b.installKeyboardBlocker(a,!1);a=b.getDomWindow();b.removeBubbleEventListener(a,"resize",this._positionBlockingGlassPaneCallback)};
AdfDhtmlPage.prototype._blockUI=function(a,b){b||(b=AdfDhtmlPage._UI_BLOCK_REASON_PPR);var d=AdfAgent.AGENT,e=this.getDomDocument();if(a)0==this._uiBlocks.length&&(this._installBlockingHandler(e),d.showBusyCursor(e,a),this._broadcastBusyStateEvent(!0)),this._uiBlocks.push(b);else{var f=AdfCollections.lastIndexOf(this._uiBlocks,b);AdfAssert.assert(-1<f);this._uiBlocks.splice(f,1);0==this._uiBlocks.length&&(d.showBusyCursor(e,a),this._broadcastBusyStateEvent(!1),this._removeBlockingHandler(e))}};
AdfDhtmlPage.prototype._isUIBlocked=function(a){var b=this._uiBlocks;return a?-1<AdfCollections.indexOf(b,a):0<b.length};
AdfDhtmlPage.prototype.showPageProcessingIndicator=function(a){null==this._pageProcessingIndicator&&(this._pageProcessingIndicator=AdfDhtmlPageProcessingIndicator.getInstance());this._pageProcessingIndicator.display(a,this.getDomDocument());a?(AdfAgent.AGENT.setOpacity(this._uiBlockingDiv,50),this._uiBlockingDiv.style.backgroundColor=this._pageProcessingIndicator.getBackgroundColor()):(AdfAgent.AGENT.setOpacity(this._uiBlockingDiv,0),this._uiBlockingDiv.style.backgroundColor="")};
AdfDhtmlPage.prototype.isProcessingIndicatorDisplayed=function(){return null!=this._pageProcessingIndicator&&this._pageProcessingIndicator.isDisplayed()};
AdfDhtmlPage.prototype.requestStatusChanged=function(a){if(a.getStatus()==AdfDataTransferRequestEvent.STATUS_COMPLETE){var b=a.getContext();if(b){var d=b.busyCounts,e=this._busyCounts,f;for(f in d){var g=e[f]-d[f];AdfAssert.assert(0<=g);0==g?(delete e[f],(g=this.findComponent(f))&&g.getPeer().setBusy(g,!1)):e[f]=g}}d=a.getResponseStatusCode();this._sendJsfAjaxEvent("complete",{context:b,event:a});if(200==d){var h;a.getResponseHeader&&(h=a.getResponseHeader("Adf-Window-Id"));h&&(AdfPage.PAGE.getDomWindow().name=
h);a.isRichResponse()?(this.__perfTimings(!1,!1,!0,"PPR response from server received"),d=a.getResponseXML(),d=this._handleRichResponse(d,b),this._richPostbackHasErrors?this._sendJsfAjaxEvent("error",{context:b,event:a}):this._sendJsfAjaxEvent("success",{context:b,event:a}),d&&(b&&b._noResponseExpected)&&(this._partialRequestRedirect=!1),h&&!d&&AdfPage.PAGE._startGlobalActiveData(),this.isUserActivityMonitoringOn()&&!d&&(prevActInfo=AdfUserActivityInfo.getInstance(AdfUserActivityInfo.PREVIOUS),prevActInfo.setClientEndTime((new Date).getTime().toString()),
AdfUserActivityInfo.saveToSessionStorageByType(AdfUserActivityInfo.PREVIOUS),AdfUserActivityInfo.removeFromSessionStorageByType(AdfUserActivityInfo.PRIMARY)),a=null,b&&(a=b.__checkPointId),a&&AdfDhtmlPage._POSTBACK_CHECKPOINT.stop(a),this.__perfTimings(!1,!1,!0,"PPR response processing done"),this._haveOutstandingPPRRequest=!1,this._isUIBlocked(AdfDhtmlPage._UI_BLOCK_REASON_PPR)&&this._blockUI(!1)):this._handleInvalidPprResponse(a.getResponseText(),b,a)}else this._handleInvalidPprResponse(null,b,
a)}};AdfDhtmlPage._keyEventCallback=function(a){AdfPage.PAGE._handleKey(a)};
AdfDhtmlPage.prototype.registerKeyStroke=function(a,b,d){AdfAssert.assertPrototype(a,AdfKeyStroke);AdfAssert.assertFunction(b);var e=null;d&&d.clientId&&(e=d.clientId);var f=a.toMarshalledString();if(f in this._keyStrokeToCallbackMap){var g=!0;e&&(f=this._keyStrokeToCallbackMap[f],f.multipleAllowed&&(g=!1,f.callbacks[e]=b,f.callbackContexts[e]=d,AdfLogger.LOGGER.finest("RP.registerKSAdditional, keystroke:callback:clientId ",a," : ",b," : ",e)));g&&AdfLogger.LOGGER.warning("Conflicting shortcut mapping: The keystroke ",
a," has already been registered on the RichPage.")}else e?(g={multipleAllowed:!0,callbacks:{},callbackContexts:{}},g.callbacks[e]=b,g.callbackContexts[e]=d,AdfLogger.LOGGER.finest("RP.registerKS, keystroke:callback:clientId ",a," : ",b," : ",e),this._keyStrokeToCallbackMap[f]=g):(AdfLogger.LOGGER.finest("RP.registerKS, keystroke:callback ",a," : ",b),this._keyStrokeToCallbackMap[f]=b,this._keyStrokeToCallbackContextMap[f]=d)};
AdfDhtmlPage.prototype.unregisterKeyStroke=function(a,b){AdfAssert.assertPrototype(a,AdfKeyStroke);var d=a.toMarshalledString();if(b){var e=this._keyStrokeToCallbackMap[d];e.callbacks&&1>=e.callbacks.length?delete this._keyStrokeToCallbackMap[d]:(delete e.callbacks[b],delete e.callbackContexts[b])}else delete this._keyStrokeToCallbackMap[d],delete this._keyStrokeToCallbackContextMap[d]};AdfDhtmlPage.prototype.pageIdNotSavedWithURI=function(){this._notSavingPageId=!0};
AdfDhtmlPage.prototype.setPageStateId=function(a){this._addPageStateIdField(a);this._pageStateId=a;!this.isPortlet()&&(!this._notSavingPageId&&!this._pprNavPending)&&AdfNavigationHistoryAgent.getInstance().setPageId(a)};AdfDhtmlPage.prototype.getPageStateId=function(){return this._pageStateId};
AdfDhtmlPage.prototype._addPageStateIdField=function(a){for(var b=this.getDomDocument(),d=b.forms.length,e=0;e<d;e++){var f=b.forms[e];AdfAssert.assertDomElement(f);if(this._isAdfForm(f)){var g=f.elements[AdfDhtmlPage._PAGE_STATE_ID],h=null==a?"":a;if(h!=(null==g?"":g.value))null==g&&(g=b.createElement("input"),g.id=g.name=AdfDhtmlPage._PAGE_STATE_ID,g.type="hidden",g.autocomplete="off",f.appendChild(g)),g.value=h}}};
AdfDhtmlPage.prototype._handleKey=function(a){var b=AdfAgent.AGENT,d=b.getKeyCode(a),e=a.shiftKey*AdfKeyStroke.SHIFT_MASK|a.ctrlKey*AdfKeyStroke.CTRL_MASK|a.altKey*AdfKeyStroke.ALT_MASK;a.metaKey&&(e|=AdfKeyStroke.META_MASK);var d=AdfKeyStroke.getKeyStroke(d,e),f=d.toMarshalledString(),e=this._keyStrokeToCallbackMap[f];if(null!=e){var g=f in AdfDhtmlPage._KEYSTROKE_OVERRIDES;if(g){var h=b.getEventTarget(a),k=b.getNodeName(h).toLowerCase();"textarea"!=k&&("input"==k?(g=h.type.toLowerCase(),g="text"==
g||"password"==g):g=!1)}if(!g){f=this._keyStrokeToCallbackContextMap[f];if(e.multipleAllowed){var g=e.callbacks,h=e.callbackContexts,e=null,k=!1,l=0;for(clientId in g)l++;if(1<l){var m=this.getDomDocument(),n=m.activeElement;n||(n=this.getActiveDomElement());n||(AdfLogger.LOGGER.finest("No known activeElement available for _handleKey."),n=m.documentElement);m=Number.POSITIVE_INFINITY;for(clientId in g){var p=this.findComponent(clientId);if(p)if(p=AdfRichUIPeer.getDomElementForComponent(p))if(p=AdfDomUtils.getNodeDistance(p,
n),0==p){k=!0;e=g[clientId];f=h[clientId];break}else p<m&&(m=p,k=!0,e=g[clientId],f=h[clientId]);else AdfLogger.LOGGER.warning("Unable to locate domElement for clientId \x3d "+clientId+" in _handleKey.");else AdfLogger.LOGGER.warning("Unable to locate component for clientId \x3d "+clientId+" in _handleKey.")}k||AdfLogger.LOGGER.warning("Unable to locate a match for clientId \x3d "+clientId+" in _handleKey.")}if(!k&&1==l)for(clientId in g)e=g[clientId],f=h[clientId]}!1!==e.call(f,d)&&b.eatEvent(a)}}};
AdfDhtmlPage.prototype._doFullPostback=function(a,b,d,e){(this._waitingForDocumentUnload=e)||(b["oracle.adf.view.rich.RESPONSE_EXPECTED"]="no");var f=this._newSessionURL;f&&(b["oracle.adf.view.rich.NEW_SESSION_URL"]=f);this._resetUncommittedIds();if(!a.target||0==a.target.length||"_self"==a.target)this._inAppNavigationFlag=!0,d&&this._blockUI(!0),e?this._disableUncommittedWarnings():this.scheduleTimer(this,this._resetPerformingFullSubmit,null,3E3);d={};this._collectProtectionKeys(d,a);AdfCollections.copyInto(d,
b);for(var g in d)this._setParameter(a,g,d[g]);AdfAgent.AGENT.autoCompleteForm(a);try{a.submit()}catch(h){null!=AdfDomUtils.getInputFileForm(a)&&AdfInputFileUtils.addUploadErrorMessage(),AdfLogger.LOGGER.logErrorAsInfo(h,"doFullPostback form.submit()")}a.action=a.action;for(g in b)b=this._getParameterElement(a,g),AdfAssert.assertDomElement(b),b.parentNode.removeChild(b)};
AdfDhtmlPage.prototype._doRichPostback=function(a,b,d,e,f,g){AdfAssert.assertDomElement(a,"FORM");AdfAssert.assertObject(b);this._sendJsfAjaxEvent("begin",{context:f});e&&this._blockUI(!0);e=AdfDhtmlPage._POSTBACK_CHECKPOINT.start();var h=AdfCollections.copyInto({},this._busyCounts);f||(f={});f.richPostback=!0;f.busyCounts=h;f.__checkPointId=e;f.retryParams=b;f.formId=a.id;e=this.getDataTransferService();var h=null,k=a;AdfDomUtils.isMultiPartForm(a)&&(h=AdfDomUtils.getInputFileForm(a))&&(k=h);var l=
{};this._collectProtectionKeys(l,null!=h?h:a);AdfCollections.copyInto(l,b);b=this._getPPRURL(k);null!=h?e.sendMultiPartRequest(f,b,d,h,l,[this],null):(g=this._getPostbackContent(a,l,g),AdfAgent.AGENT.autoCompleteForm(a),e.sendRequest(f,b,d,g,[this]))};AdfDhtmlPage.prototype._getDefaultPostbackURL=function(){var a=this.getDomDocument(),b=null,d=a.forms[0];d&&(b=this._getPPRURL(d));if(!b||-1!=b.indexOf("j_security_check"))b=a.location.href,a=b.indexOf("#"),0<a&&(b=b.substring(0,a));return b};
AdfDhtmlPage.prototype._appendResponseId=function(a){var b=a,d=this.getResponseIdentifier();null!=d&&(b+=0>a.indexOf("?")?"?":"\x26",b+=AdfDhtmlPage._ECID,b=b+"\x3d"+encodeURIComponent(d));return b};
AdfDhtmlPage.prototype._getPPRURL=function(a){var b=AdfAgent.AGENT.getAttribute(a,AdfDhtmlPage._CUSTOM_PPR_URL_EXPANDO);a=null!=b?b:a.action;if(!a||""==a)a=this.getDomDocument(),a=a[AdfDhtmlPage._CUSTOM_PPR_URL_EXPANDO]?a[AdfDhtmlPage._CUSTOM_PPR_URL_EXPANDO]:a.location.href;!this.isPortlet()&&this.shouldTracePPRRequestId()&&(a=this._appendResponseId(a));return a};
AdfDhtmlPage.prototype._getPostbackContent=function(a,b,d){AdfAssert.assertDomElementOrNull(a,"FORM");AdfAssert.assertObjectOrNull(b);a=this._collectPostbackParams(a,d);AdfCollections.copyInto(a,b);return this._toUrlEncodedForm(a)};
AdfDhtmlPage.prototype._collectPostbackParams=function(a,b){var d={},e=this._getEditableEventTargetComponents(b);if(null!=a){var f=a.elements;if(f)for(var g=0;g<f.length;g++){var h=f[g],k=h.name;if(h.name&&!h.disabled&&this._shouldPostbackValue(h,e)){if(h.options){d[h.name]=[];for(var l=0;l<h.options.length;l++){var m=h.options[l];if(m.selected){var n=m.attributes.value;d[k].push(null!=n&&null!=n.value?n.value:m.text)}}}else l=h.value,this._isUncheckedInput(h)&&(AdfAssert.assert(this._isTrackingDirtyData()),
l=""),d[k]=this._mergeFormParamValues(d[k],l);h=this._mapInputElementToComponent(h);if(!this._isDirtyDataRetainPPRDisabled()&&null!=h&&(l=h.getPeer()))l.bind(h),l.setLastSubmittedValue&&(m=d[k],AdfCollections.isArray(d[k])&&(m=h.getSubmittedValue()),l.setLastSubmittedValue(h,m))}}}return d};
AdfDhtmlPage.prototype._collectProtectionKeys=function(a,b){var d={};if(null!=b){var e=b.elements;if(e)for(var f=0;f<e.length;f++){var g=e[f],h=g.getAttribute("protectionKey");h&&(d[g.name]=h)}}AdfCollections.isEmpty(d)||(a["oracle.adf.view.rich.TOKENIZED"]=JSON.stringify(d))};
AdfDhtmlPage.prototype._getEditableEventTargetComponents=function(a){AdfAssert.assertArrayOrNull(a);var b=[];if(null!=a)for(var d=0;d<a.length;d++){var e=a[d];this._pushEditableComponent(b,e);var f=this._stripSubId(e);f!=e&&this._pushEditableComponent(b,f)}return b};AdfDhtmlPage.prototype._pushEditableComponent=function(a,b){var d=this.findComponent(b);d instanceof AdfUIEditableValue&&a.push(d)};
AdfDhtmlPage.prototype._mergeFormParamValues=function(a,b){if(null==a||""==a&&null!=b)return b;if(null==b||""==b)return a;var d=null;AdfCollections.isArray(a)?d=a:(d=[],d.push(a));d.push(b);return d};AdfDhtmlPage.prototype._toUrlEncodedForm=function(a){var b="",d;for(d in a){var e=a[d];if(AdfCollections.isArray(e))for(var f=0;f<e.length;f++)b=AdfDhtmlPage._appendUrlFormEncoded(b,d,e[f]);else void 0!=e&&(b=AdfDhtmlPage._appendUrlFormEncoded(b,d,e))}return b};
AdfDhtmlPage.prototype._isRichResponseDirty=function(){var a=this.getDomDocument().getElementById(AdfDhtmlPage._RICH_UPDATE_FLAG);return a&&"dirty"==a.value?!0:!1};AdfDhtmlPage.prototype._setRichResponseDirty=function(a){var b=this.getDomDocument().getElementById(AdfDhtmlPage._RICH_UPDATE_FLAG);b&&(b.value=a?"dirty":"")};AdfDhtmlPage.prototype._waitingForDescendantResize=function(){return this._inDescendentResizeNotify};
AdfDhtmlPage.prototype._waitingForIncompleteImages=function(){return null!=this._incompleteImageCount&&0<this._incompleteImageCount};AdfDhtmlPage.prototype._waitingForAnimation=function(){return null!=this._incompleteAnimationCount&&0<this._incompleteAnimationCount};AdfDhtmlPage.prototype.incrementPendingAnimation=function(){null==this._incompleteAnimationCount&&(this._incompleteAnimationCount=0);++this._incompleteAnimationCount};
AdfDhtmlPage.prototype.decrementPendingAnimation=function(){null==this._incompleteAnimationCount?AdfAssert.assert(!1,"Unable to decrement the pending animation count when it was never incremented in the first place"):(--this._incompleteAnimationCount,AdfAssert.assert(0<=this._incompleteAnimationCount,"More pending animation decrements than increments"))};
AdfDhtmlPage.prototype._prepareForIncompleteImages=function(){for(var a=this.getDocument().getElementsByTagName("img"),b=a.length,d=0,e=0;e<b;e++){var f=a[e];if(f&&!f.complete){var g=AdfAgent.AGENT.getComputedStyle(f),h=g.width,g=g.height;if("0px"==h||"auto"==h||"0px"==g||"auto"==g)AdfLogger.LOGGER.finer("An incompletly-loaded image was detected with src \x3d ",f.src,f),d++,AdfDomUtils.addCSSClassName(f,AdfDhtmlPage._INCOMPLETE_IMAGE_CLASS_NAME)}AdfLogger.LOGGER.getLevel()==AdfLogger.FINEST&&null!=
f&&AdfLogger.LOGGER.finest("Image load details:",f,f.getAttribute("src"),", w\x3d",f.width,", h\x3d",f.height,", sW\x3d",f.style.width,", sH\x3d",f.style.height,", cmpW\x3d",h,", cmpH\x3d",g,f.complete?", COMPLETE":", INCOMPLETE",", className\x3d",f.className)}0<d&&(AdfLogger.LOGGER.fine("Number of incomplete images: ",d),null!=this._incompleteImageTimer&&this.cancelTimer(this._incompleteImageTimer),this._incompleteImageTimerAttempts=1,this._incompleteImageTimer=this.scheduleTimer(this,this._attemptToRelayoutForNewlyCompleteImages,
null,500));this._incompleteImageCount=d};
AdfDhtmlPage.prototype._attemptToRelayoutForNewlyCompleteImages=function(){this._incompleteImageTimer=null;var a=[],b=AdfAgent.AGENT,d=this.getDocument();if(b.getPlatform()!=AdfAgent.IE_PLATFORM&&d.getElementsByClassName)a=AdfCollections.cloneArray(d.getElementsByClassName(AdfDhtmlPage._INCOMPLETE_IMAGE_CLASS_NAME));else for(var b=d.getElementsByTagName("img"),d=b.length,e=0;e<d;e++){var f=b[e];AdfDomUtils.containsCSSClassName(f,AdfDhtmlPage._INCOMPLETE_IMAGE_CLASS_NAME)&&a.push(f)}for(d=b=0;d<a.length;d++)if((e=
a[d])&&e.complete){AdfDomUtils.removeCSSClassName(e,AdfDhtmlPage._INCOMPLETE_IMAGE_CLASS_NAME);f=AdfRichUIPeer.getFirstAncestorComponent(e);if(null!=f){this.__queueDescendantResizeNotifySource(f);var g=f.getPeer();g&&g.__preferredSizeChangeNotify&&g.__preferredSizeChangeNotify(f)}AdfLogger.LOGGER.finer("A previously incompletly-loaded image is now complete with src \x3d ",e.src,", nearestClientComponent \x3d ",f,", imgElement \x3d ",e)}else b++;AdfLogger.LOGGER.fine("Number of remaining incomplete images (at attempt #",
this._incompleteImageTimerAttempts,"): ",b);0<b&&10>this._incompleteImageTimerAttempts?(this._incompleteImageTimerAttempts++,this._incompleteImageTimer=this.scheduleTimer(this,this._attemptToRelayoutForNewlyCompleteImages,null,500),this._incompleteImageCount=b):(0<b&&AdfLogger.LOGGER.fine("Gave up trying to wait for images to load."),this.__doDescendantResizeNotify(),this._incompleteImageCount=0)};
AdfDhtmlPage.prototype._handleRichResponse=function(a,b){this._inHandleRichResponse=!0;try{var d=a.documentElement;AdfAssert.assert("partial-response"==AdfAgent.AGENT.getNodeName(d));var e=AdfDomUtils.getFirstChildElement(d);AdfAssert.assert(null!=e&&1==e.nodeType);var f=this._applyRichResponse(e,!1,!1,b);this._resetPendingStreamingIDs();if(f)this._handleRedirect(a);else if(this.__doDescendantResizeNotify(),this.flushToAssistiveTechnology(),b&&b._responseAnnounced){var g=this.getLookAndFeel().getTranslatedString("AFResponseCompleteStatus");
this.announceToAssistiveTechnology(g)}}finally{this._inHandleRichResponse=!1}return f};
AdfDhtmlPage.prototype._handleRedirect=function(a){var b=AdfAgent.AGENT;a=AdfDomUtils.getFirstDescendentElement(a.documentElement,"changes");if(null!=a&&(a=AdfDomUtils.getFirstDescendentElement(a,"extension"),null!=a&&"adf-redirect-ext"==a.getAttribute("id"))){a=a.childNodes;for(var d=0;d<a.length;d++){var e=a[d],f=b.getNodeName(e);if("contextId"==f){if(this.isUserActivityMonitoringOn()&&(e=b.getTextContent(e)))AdfUserActivityInfo.getInstance(AdfUserActivityInfo.PREVIOUS).setContextId(e),AdfUserActivityInfo.saveToSessionStorage()}else if("redirectCookie"==
f&&(e=b.getTextContent(e))){f=new Date;f.setTime(f.getTime()+3E4);e=e.replace(/\$exp\$/g,f.toUTCString());e=e.split("$$");for(c=0;c<e.length;c++)this.getDomDocument().cookie=e[c]}}}};AdfDhtmlPage.prototype._richResponseComplete=function(a){this._getScriptLoadingService().addCallbackScript(this,this._richResponseCompleteCallback,a)};
AdfDhtmlPage.prototype._richResponseCompleteCallback=function(a){this._resetPendingStreamingIDs();this.__doDescendantResizeNotify();this.flushToAssistiveTechnology();a&&a._responseAnnounced&&(a=this.getLookAndFeel().getTranslatedString("AFResponseCompleteStatus"),this.announceToAssistiveTechnology(a))};AdfDhtmlPage.prototype._getFocusPath=function(){var a=this._activeDomNode,b=[];if(null!=a)for(;a;){var d=a.id;d&&(b[d]=b.push(a)-1);a=a.parentNode}return b};
AdfDhtmlPage.prototype._restoreFocusPath=function(a,b){AdfAssert.assertArray(a);AdfAssert.assertNumberOrNull(b);var d=a.length;b>=d&&(b=d-1);for(var d=AdfAgent.AGENT,e={},f=0;f<=b;f++){var g=d.getElementById(a[f].id);if(null!=g){var h=AdfDomUtils.getFirstFilteredElement(g,!1,AdfFocusUtils.acceptFocusableNode,e);h||(h=AdfDomUtils.getNextFilteredElement(g,g.parentNode,!0,AdfFocusUtils.acceptFocusableNode,e))||(h=AdfDomUtils.getPreviousFilteredElement(g,g.parentNode,AdfFocusUtils.acceptFocusableNode,
e));if(h){AdfFocusUtils.focusElement(h);break}}}};AdfDhtmlPage.prototype._getProcessedRootsInfo=function(a){var b;if((a=AdfDomUtils.getFirstDescendentElement(a,"extension"))&&"adf-processed-roots-ext"===a.getAttribute("id")){b={processedClientIds:null,immediateOnly:!1};if(void 0===a.hasAttribute||a.hasAttribute&&a.hasAttribute("processed")){var d=a.getAttribute("processed");d&&(b.processedClientIds=d.split(" "))}a=a.getAttribute("immediateOnly");b.immediateOnly="true"===a}return b};
AdfDhtmlPage.prototype._removeProcessedRootsFromDirtyValues=function(a,b,d,e){var f=AdfAgent.AGENT,g;for(g in d){var h=f.getElementById(g);if(h){if(!AdfUIUtils.compareValues(e[g],AdfPage.PAGE.findComponent(g).getSubmittedValue())&&(!b||this._isImmediateEditableValueComponent(g)))if(a)for(var k=a.length,l=0;l<k;l++){var m=a[l];""!=m&&this._isAncestorOrSelf(m,h)&&delete d[g]}else delete d[g]}else delete d[g]}};
AdfDhtmlPage.prototype._isAncestorOrSelf=function(a,b){var d=!1,e=this._poppedUpComponentInfo[a];if(e)for(var f in e){if(d=AdfDhtmlPopupWindow.isAncestorOrSelf(e[f].contentDom,b))return!0}else d=AdfAgent.AGENT.getElementById(a),d=AdfDomUtils.isAncestorOrSelf(d,b);!d&&0==b.id.indexOf(a)&&(f=AdfPage.PAGE,e=f.findComponent(a),f=f.findComponent(b.id),e&&f&&(d=f.isDescendant(e)));return d};
AdfDhtmlPage.prototype._applyRichResponse=function(a,b,d,e){var f=this._getProcessedRootsInfo(a);this._isTrackingDirtyData()&&(this._trackErrors=!0);var g=this._richPostbackHasErrors=!1;try{var h;this.isScreenReaderMode()&&this.isActiveDataSupported()&&(h={},AdfCollections.copyInto(h,this.getActiveDataSupport().getActiveComponents()));var k=AdfAgent.AGENT,l=k.getNodeName(a);if("changes"==l){var m=null,l=[],n=[],p=this._getFocusPath(),q=a.childNodes,r=q.length,s,u;null!=e&&(u=e._clientEventsSet);u&&
u[AdfPollEvent.POLL_EVENT_TYPE]&&(this._componentsUpdatedByPollEvent=[]);a={};u={};for(var t={},v=0;v<r;v++){var w=q[v],z=k.getNodeName(w);if("update"==z){var y=this._handleRichResponseFragment(w,l,n,b,p,d,a,t,u);if(null!=y){var A=k.getDomWindow().AdfSafariMobileAgent&&k instanceof AdfSafariMobileAgent&&k.getOS()!=AdfAgent.ANDROID_OS;null!=y.restoreFocusIndex&&!A&&(this._restorePprFocusIndex=y.restoreFocusIndex);null!=y.pprNavParams&&(m=y.pprNavParams,this._pprNavPending=!0);y.pendingEditableSubtree&&
(s||(s=[]),s.push(y.pendingEditableSubtree))}}else"eval"==z?this._handleRichResponseScript(w):"extension"==z&&"adf-script-library"==w.getAttribute("id")&&this._handleRichResponseLibrary(w,"true"===w.getAttribute("background"))}if(this._isTrackingDirtyData()&&f){var B=f.processedClientIds;this._isDirtyDataRetainPPRDisabled()||this._removeProcessedRootsFromDirtyValues(B,f.immediateOnly,a,t);this._setProcessedRoots(B?B:[],f.immediateOnly)}this._richUpdateComplete(l,n,m,e,p,s,h,a,u)}else if("redirect"==
l)n=a.getAttribute("url"),AdfAssert.assert(n,"Could not get redirect URL"),g=!0,this._disableUncommittedWarnings(),this.__perfTimings(!0,!0,!0,"redirect to ",n),t=this.findComponent(this._documentClientId),this._partialRequestRedirect=!0,(new AdfRedirectEvent(t,n,e?e._noNavigation:!1)).queue(!1);else if("error"==l){this._richPostbackHasErrors=!0;b=null;for(d=0;d<a.childNodes.length;d++)if(m=a.childNodes[d],"error-message"==k.getNodeName(m)){b=k.getTextContent(m);break}if(null==b||0==b.length)b="Unknown error during PPR";
alert(b);"true"==a.getAttribute("redirect")&&(this._disableUncommittedWarnings(),document.location.href=this._getDefaultPostbackURL())}else if("noop"!=l)if("retry"==l){var v=e.formId,C;v&&(C=Agent.AGENT.getElementById(v));C||(C=this.getDomDocument().forms[0]);this._doFullPostback(C,e.retryParams,!1,!0)}else AdfAssert.assert(!1,"invalid root node in rich response")}finally{this._trackErrors=!1}return g};AdfDhtmlPage.prototype.getDocumentClientId=function(){return this._documentClientId};
AdfDhtmlPage.prototype._richUpdateComplete=function(a,b,d,e,f,g,h,k,l){var m={};m.resizeDomNodes=a;m.domReplacedIds=b;m.pprNavParams=d;m.reqContext=e;m.savedFocusPath=f;m.pendingEditableSubtrees=g;m.oldActiveComponents=h;m.replacedDirtyValues=k;m.replacedTableState=l;this._getScriptLoadingService().addCallbackScript(this,this._richUpdateCompleteCallback,m)};
AdfDhtmlPage.prototype._richUpdateCompleteCallback=function(a){var b=a.resizeDomNodes,d=a.domReplacedIds,e=a.pprNavParams,f=a.reqContext,g=a.savedFocusPath,h=a.pendingEditableSubtrees,k=a.replacedDirtyValues;a=a.replacedTableState;this._isDirtyDataRetainPPRDisabled()||(this._restoreDirtyValues(k),this._restoreScrollPositionsForTable(a));this._restoreHeaderFocusForTables(a);k=AdfAgent.AGENT;k.getPlatform()==AdfAgent.IE_PLATFORM&&8>=Math.floor(k.getVersion())?this.scheduleTimer(this,this._prepareForIncompleteImages,
null,10):this._prepareForIncompleteImages();0<b.length&&(this._doResizeNotify(b),this._checkResizeNotifyDelayed());0<d.length&&(b=(b=this._clientListeners)?b[AdfDomReplacedEvent.EVENT_TYPE]:null,null!=b&&AdfEventUtils.deliverEventToListeners(b,new AdfDomReplacedEvent(this,d)));if(null!=e){this._pprNavPending=!1;if(d=AdfNavigationHistoryAgent.getInstance())d.setCurrentPage(e.viewId,e.queryParams,f?f._loadId:null),this._notSavingPageId||d.setPageId(this._pageStateId);this._restorePreviousUserActivityData()}void 0!=
this._restorePprFocusIndex&&(this._restoreFocusPath(g,this._restorePprFocusIndex),delete this._restorePprFocusIndex);this._reattachInlineEditing(h);this._replaceJsfAjaxFunctions()};AdfDhtmlPage.prototype._reattachInlineEditing=function(a){if(a)for(;0<a.length;){this._filterEditableSubtree(a[0],this._editableCallback,this._editableCallbackContext);break}};AdfDhtmlPage.prototype.addEventListener=function(a,b,d){this._clientListeners=AdfEventUtils.addEventListener(this._clientListeners,a,b,d)};
AdfDhtmlPage.prototype.removeEventListener=function(a,b,d){this._clientListeners=AdfEventUtils.removeEventListener(this._clientListeners,a,b,d)};AdfDhtmlPage.prototype.setDocumentClientId=function(a){this._documentClientId=a};
AdfDhtmlPage.prototype.doRedirect=function(a,b){AdfLogger.LOGGER.info("Redirecting to : ",a);var d=this.getDomWindow();if(void 0!=d.adfpp_handleLocationChange)d.adfpp_handleLocationChange(a);else{var d=d.location,e=d.href,f=null,g=e.indexOf("#");0<=g&&(f=e.substring(g),e=e.substring(0,g));var h=a,k=null,g=h.indexOf("#");0<=g&&(k=h.substring(g),h=h.substring(0,g));h==e&&null!=k?(f!=k&&(b?d.replace(k):d.href=k),d.reload(!0)):b?d.replace(a):d.href=a}};
AdfDhtmlPage.prototype.streamingResponseComplete=function(){this._resetPendingStreamingIDs();this.getDataTransferService().notifyStreamingRequestComplete();if(this.isUserActivityMonitoringOn()){var a=(new Date).getTime().toString();AdfUserActivityInfo.getInstance(AdfUserActivityInfo.PREVIOUS).setClientEndTime(a);AdfUserActivityInfo.saveToSessionStorageByType(AdfUserActivityInfo.PREVIOUS);AdfUserActivityInfo.getInstance(AdfUserActivityInfo.SECONDARY).setClientEndTime(a);AdfUserActivityInfo.removeFromSessionStorageByType(AdfUserActivityInfo.PRIMARY);
AdfUserActivityInfo.removeFromSessionStorageByType(AdfUserActivityInfo.SECONDARY)}this._addDelayedMessages(!0);this._streamingStatus==AdfDhtmlPage._STREAMING_REQUEST_SENT?this._handleInvalidPprResponse(null,null,null):this._streamingStatus==AdfDhtmlPage._STREAMING_COMPLETE?this.scheduleTimer(this,this._startGlobalActiveData,null,500):(a=this.getLookAndFeel(),alert(a.getTranslatedString("af_document.UNKNOWN_STREAMING_ERROR")))};
AdfDhtmlPage.prototype.streamingResponseWritten=function(){this.__perfTimings(!1,!1,!0,"streaming response processing done");this._streamingStatus=AdfDhtmlPage._STREAMING_COMPLETE;this.isUserActivityMonitoringOn()&&AdfUserActivityInfo.setResponseReceivedTime(AdfUserActivityInfo.SECONDARY)};
AdfDhtmlPage.prototype.streamingResponseStarted=function(){if(this._perfProfileEnabled||this._perfProfileTimingEnabled)AdfLogger.PROFILER_LOGGER.info("streaming request sent;",this.getDomWindow()._afrTimingStreamingRequestStart),this.__perfTimings(!1,!1,!0,"streaming response received. The ECID is: ",AdfDhtmlPage._ECID);this._streamingStatus=AdfDhtmlPage._STREAMING_STARTED};AdfDhtmlPage.prototype._resetPendingStreamingIDs=function(){this._pendingStreamingIDs={}};
AdfDhtmlPage.prototype.handleStreamingResponse=function(a,b,d){this._perfProfileEnabled&&this.__perfTimings(!1,!1,!1,"streaming response segment received");a=a.getElementById(b);AdfAssert.assert(a);this._applyRichResponse(a.firstChild,d,!0,null);this._perfProfileEnabled&&this.__perfTimings(!1,!1,!1,"streaming response segment processed")};
AdfDhtmlPage.prototype.updateStreamingViewState=function(a,b){var d=a.getElementById(b);AdfAssert.assert(d);d=d.getElementsByTagName("input")[0];AdfAssert.assert(d);var e=this.getDomDocument().forms[0];AdfAssert.assertDomElement(e);e=e.elements[AdfDhtmlPage._STATE_PARAM_NAME];AdfAssert.assertDomElement(e);e.parentNode.innerHTML="\x3cinput type\x3d'hidden' name\x3d'"+AdfDhtmlPage._STATE_PARAM_NAME+"' value\x3d'"+d.getAttribute("value")+"' /\x3e"};
AdfDhtmlPage.prototype.__handleReload=function(){this._partialRequestRedirect=!0;var a=this._getDefaultPostbackURL();this.getDomWindow().location.replace(a)};AdfDhtmlPage.prototype.__validateWindowId=function(a){try{var b=this.getDomWindow();if(b===parent&&!b.name){var d=sessionStorage.getItem("Adf-Window-Id");d===a&&(b.name=d)}}catch(e){}return a!=this.getDomWindow().name?(this.__handleReload(),!1):!0};
AdfDhtmlPage.prototype.__handleRichResponseAction=function(a,b){if(a){var d=this.getDomDocument();d.forms[0].action=a}b&&AdfAgent.AGENT.setAttribute(d.forms[0],AdfDhtmlPage._CUSTOM_PPR_URL_EXPANDO,b)};AdfDhtmlPage.prototype.__loadJavaScriptInBackground=function(a){var b=arguments.length;if(0<b){this._getScriptLoadingService();for(var d=0;d<b;++d)this._loadBackgroundScript(arguments[d])}};
AdfDhtmlPage.prototype._saveDirtyValueForComponent=function(a,b,d){if(a instanceof AdfUIEditableValue){var e=a.getClientId(),f=a.getSubmittedValue();null!=f&&(b[e]=f,a=a.getPeer().getLastSubmittedValue(a),d[e]=a)}};AdfDhtmlPage.prototype._saveValuesOfDirtyComponentsBeingReplaced=function(a,b,d){a=this._dirtyStateService.getDirtyComponentsForElement(a);for(var e=a.length,f=0;f<e;f++)this._saveDirtyValueForComponent(a[f],b,d)};
AdfDhtmlPage.prototype._saveTableState=function(a,b){var d=this.findComponent(a.id);if(d&&"oracle.adf.RichTable"==d.getComponentType()){var e=d.getProperty("scrollLeft"),f=d.getProperty("scrollTop"),d=d.getProperty("currentlySelectedHeaderId"),g={};g.scrollLeft=e;g.scrollTop=f;g.selectedHeader=d;b[a.id]=g}};
AdfDhtmlPage.prototype._restoreHeaderFocusForTables=function(a){for(var b in a){var d=this.findComponent(b);if(d&&"oracle.adf.RichTable"==d.getComponentType()){var e=AdfAgent.AGENT.getElementById(a[b].selectedHeader);(d=d.getPeer())&&e&&d._setHeaderCellFocus(e)}}};
AdfDhtmlPage.prototype._restoreScrollPositionsForTable=function(a){for(var b in a){var d=this.findComponent(b);if(d&&"oracle.adf.RichTable"==d.getComponentType()){var e=a[b];d.setProperty("scrollLeft",e.scrollLeft,!0,AdfUIComponent.PROPAGATE_NEVER);d.setProperty("scrollTop",e.scrollTop,!0,AdfUIComponent.PROPAGATE_NEVER)}}};
AdfDhtmlPage.prototype._restoreDirtyValues=function(a){for(var b in a){var d=this.findComponent(b);if(d){this.clearMessages(d.getClientId());var e=a[b],f=d.getPeer();if(f instanceof AdfDhtmlEditableValuePeer)try{AdfDhtmlEditableValuePeer.__restoreDisplayValue(d,f,e)}catch(g){AdfLogger.LOGGER.fine("component does not support SetDisplayValue")}}}};
AdfDhtmlPage.prototype._handleRichResponseFragment=function(a,b,d,e,f,g,h,k,l){if(a.getAttribute("id")==AdfDhtmlPage._STATE_PARAM_NAME)return this._updateViewState(a),null;a=this._getFirstElementFromFragment(a,e);if(null==a)return AdfLogger.LOGGER.warning('Unable to locate content in partial page response fragment.  If you are adding a partial target programmatically, try setting clientComponent\x3d"true" on the partial target component.'),null;e={restoreFocusIndex:null,pprNavParams:null,pendingEditableSubtree:null};
var m=a.getAttribute("id");AdfAssert.assert(null!=m,"null id in response fragment");null!=this._componentsUpdatedByPollEvent&&this._componentsUpdatedByPollEvent.push(m);var n=AdfAgent.AGENT,p=n.getElementById(m);if(null==p)AdfLogger.LOGGER.severe("unable to locate target node: "+m);else{if("true"==a.getAttribute(AdfDhtmlPage._DOCUMENT_STYLE_HOLDER)){var q=this.getDomDocument().body,r=a.getAttribute("theme");q.setAttribute("theme",r?r:"");a.removeAttribute("theme");r=a.className;r!=q.className&&(q.className=
r?r:"",this.setHighContrast(this._isHighContrast));a.className="";r=a.style.cssText;q.style.cssText=r?r:"";a.style.cssText=""}var q=this._getQueryParamsFromActionUrl(),s=f[m],m=(f=AdfRichUIPeer.getFirstAncestorComponent(p.parentNode))?f.getPeer():null;(r=a.id==AdfDhtmlPage._NAVIGATION_WRAPPER_ID)&&this._navResetPage();this._saveValuesOfDirtyComponentsBeingReplaced(p,h,k);this._saveTableState(p,l);null!=m?(m.replaceDomElement(f,a,p),d.push(f.getClientId())):this.__replaceDomElement(a,p);null!=s&&!r&&
(e.restoreFocusIndex=s);d=null;f?(d=m.domReplaceNotify(f,a),this.__queueDescendantResizeNotifySource(f)):d=a;d&&b.push(d);r?(b=n.getAttribute(a,AdfDhtmlPage._NAVIGATION_VIEW_ROOT),g=n.getAttribute(a,AdfDhtmlPage._NAVIGATION_QUERY_PARAMS),e.pprNavParams={viewId:b,queryParams:null!=g?g:q}):g||this._setRichResponseDirty(!0);if(b=this._editableSubtreeId){b=this._getEditableSubtrees(b,!0);for(g=0;g<b.length;g++)if(AdfDhtmlPopupWindow.isAncestorOrSelf(b[g],a)){e.pendingEditableSubtree=a;break}}}return e};
AdfDhtmlPage.prototype._restorePreviousUserActivityData=function(){if(this.isUserActivityMonitoringOn()){var a=null;if((a=AdfUserActivityInfo.getInstance(AdfUserActivityInfo.PREVIOUS))&&null!=a.getContextId())AdfUserActivityInfo.restoreFromSessionStorage(),a.setClientEndTime((new Date).getTime().toString())}};
AdfDhtmlPage.prototype.__replaceDomElement=function(a,b){var d=AdfAgent.AGENT;this.removeComponentsInSubtree(b);var e=b.id==AdfDhtmlPage._NAVIGATION_WRAPPER_ID;e||d.elementsRemoved(b);b.parentNode.replaceChild(a,b);e&&d.allElementsRemoved();d.getPlatform()==AdfAgent.IE_PLATFORM&&(e=d.getElementById(AdfDhtmlPage._PARSER_DIV_ID),e.appendChild(b),e.innerHTML="");d.elementsAdded(a)};
AdfDhtmlPage.prototype._getFirstElementFromFragment=function(a,b){var d=a.childNodes,e=d.length;AdfAssert.assert(1<=e,"invalid fragment child count");if(1<e){for(var f=Array(e),g=0;g<e;g++){var h=d[g];AdfAssert.assert(4==h.nodeType,"invalid fragment content");AdfAssert.assert(h.data,"null fragment content");f.push(h.data)}d=f.join("")}else h=d[0],AdfAssert.assert(4==h.nodeType,"invalid fragment content"),AdfAssert.assert(h.data,"null fragment content"),d=h.data;b&&(d=d.replace(/__AFR_XML_ELEM/g,"xml"));
e=this.getDomDocument();f=null;g=AdfAgent.AGENT;f=g.getElementById(AdfDhtmlPage._PARSER_DIV_ID);f||(f=e.createElement("div"),f.style.display="none",f.id=AdfDhtmlPage._PARSER_DIV_ID,e.body.appendChild(f),g.elementsAdded(f));g.getPlatform()==AdfAgent.IE_PLATFORM?(f.innerHTML="\x3cdiv\x3eie\x3c/div\x3e"+d,f.removeChild(f.firstChild)):f.innerHTML=d;(d=AdfDhtmlPage._getFirstElementWithId(f))&&d.parentNode.removeChild(d);return d};
AdfDhtmlPage._getFirstElementWithId=function(a){a=a.childNodes;for(var b=a.length,d=0;d<b;d++){var e=a[d];if(1==e.nodeType)return e.id?e:AdfDhtmlPage._getFirstElementWithId(e)}return null};AdfDhtmlPage.prototype._loadScript=function(a){this._getScriptLoadingService().addLibraryScript(a,AdfScriptLoadingService.METHOD_ANY)};AdfDhtmlPage.prototype._loadSynchronousScript=function(a){this._getScriptLoadingService().addLibraryScript(a,AdfScriptLoadingService.METHOD_SYNCHRONOUS)};
AdfDhtmlPage.prototype._loadBackgroundScript=function(a){this._getScriptLoadingService().addLibraryScript(a,AdfScriptLoadingService.METHOD_BACKGROUND)};AdfDhtmlPage.prototype.setScriptLoadingPolicy=function(a){this._scriptLoadingPolicy=a};
AdfDhtmlPage.prototype._getScriptLoadingService=function(){var a=this._scriptLoadingService;if(null==a){var a=this.getDomWindow(),b=this.getDomDocument(),a=new AdfScriptLoadingService(a,b,this._scriptLoadingPolicy),b=this.createCallback(this._scriptLoadingStatusChange);a.addLoadListener(b);this._scriptLoadingService=a;this._scriptLoadingListener=b}return a};
AdfDhtmlPage.prototype._scriptLoadingStatusChange=function(a){var b=AdfDhtmlPage._UI_BLOCK_REASON_SCRIPT_LOADING,d=this.getDataTransferService();a==AdfScriptLoadingService.STATUS_LOADING?(d.suspend(),this._blockUI(!0,b)):(this._blockUI(!1,b),d.resume())};AdfDhtmlPage.prototype._createStyle=function(a){return AdfAgent.AGENT.createStyle(a)};AdfDhtmlPage.prototype._nodeListToArray=function(a){if(a){for(var b=a.length,d=Array(b),e=0;e<b;e++)d[e]=a[e];return d}return nodelist};
AdfDhtmlPage.prototype._getHead=function(){return AdfDomUtils.getFirstDescendentElement(this.getDocument().documentElement,"HEAD")};AdfDhtmlPage.prototype._getLinkChildren=function(a){return a?this._nodeListToArray(a.getElementsByTagName("LINK")):[]};
AdfDhtmlPage.prototype._loadCss=function(a){var b=this._loadedCss;AdfAssert.assert(null!=b,"Unexpected loadedCss ",b);var d=this._getHead();if(b[a])for(var b=this._getLinkChildren(d),e=b.length-1;0<=e;--e){var f=b[e];if(f.getAttribute("href")==a)return f}else b[a]=!0;a=this._createLink(a);d.appendChild(a);return a};
AdfDhtmlPage.prototype._createLink=function(a,b){var d=this.getDocument().createElement("link");d.setAttribute("type","text/css");d.setAttribute("rel","stylesheet");d.setAttribute("href",a);if(b)for(var e in b)d.setAttribute(e,b[e]);return d};AdfDhtmlPage.prototype._handleRichResponseScript=function(a){var b=a.getAttribute("src");b?this._loadScript(b):(a=AdfAgent.AGENT.getTextContent(a))&&this._getScriptLoadingService().addInlineScript(a)};
AdfDhtmlPage.prototype._handleRichResponseLibrary=function(a,b){var d=AdfAgent.AGENT.getTextContent(a);b?this._loadBackgroundScript(d):this._loadScript(d)};AdfDhtmlPage.prototype._doResizeNotify=function(a){for(var b=0;b<a.length;b++)this.doResizeNotifyDom(a[b],!0)};AdfDhtmlPage.prototype._forcePreloadOfAllImages=function(){for(var a=document.getElementsByTagName("IMG"),b=0;b<a.length;b++)(new Image(1,1)).src=a[b].getAttribute("src")};
AdfDhtmlPage.prototype.__setWindowDetectionStrategy=function(a){this._windowDetectionStrategy=a};
AdfDhtmlPage.prototype.notifyWindowUnloaded=function(){var a=this._windowDetectionStrategy;if("none"!==a){var b=this.getDomWindow().name;if(b&&!this.isPerformingFullSubmit()&&!this._partialRequestRedirect&&!this._isPrintablePage()&&!this._returnFromDialog&&!this.isAttachmentMode())if(-1!=navigator.userAgent.indexOf("Chrome")&&73<=AdfAgent.AGENT.getVersion()?this._synchronousUnloadedNotify=!1:this._synchronousUnloadedNotify="aggressive"==a,this._getAndClearDeltas(!1))a=this._windowEventHeaderMap,a||
(a=this._windowEventHeaderMap={}),a["Adf-Window-Unloaded"]="with-property-delta",a["Adf-Window-Id"]=b,this._notifyOfUnloadUrl&&(a["Adf-Window-Url"]=this._notifyOfUnloadUrl),this._deliverQueuedServerEvents(!0,!0);else{a=AdfDhtmlPage._appendUrlFormEncoded("","Adf-Window-Id",b);null!=this._pageStateId&&""!==this._pageStateId&&(a=AdfDhtmlPage._appendUrlFormEncoded(a,AdfDhtmlPage._PAGE_STATE_ID,this._pageStateId));var d=this._getDefaultPostbackURL(),e=new AdfXMLRequest;e.setSynchronous(this._synchronousUnloadedNotify);
delete this._synchronousUnloadedNotify;e.setRequestHeader("Content-Type","application/x-www-form-urlencoded");e.setRequestHeader("Adf-Window-Unloaded",!0);e.setRequestHeader("Adf-Window-Id",b);this._notifyOfUnloadUrl&&e.setRequestHeader("Adf-Window-Url",this._notifyOfUnloadUrl);e.send(d,a);e.cleanup();delete e}}};
AdfDhtmlPage.prototype.__notifyWindowClose=function(a){if("none"!==this._windowDetectionStrategy){var b=this._windowEventHeaderMap;b||(b=this._windowEventHeaderMap={});b["Adf-Window-Closed"]="joined";b["Adf-Window-Id"]=this.getWindowId();b["Adf-Dialog-Return-Id"]=b["Adf-Dialog-Return-Id"]?b["Adf-Dialog-Return-Id"]+(","+a):a}};
AdfDhtmlPage.prototype.__notifyWindowCloseImmediately=function(a,b){if(!1==this._inAppNavigationFlag){var d=this._windowDetectionStrategy;if("none"!==d){var e=new AdfXMLRequest;e.setSynchronous("aggressive"==d);a?(e.setRequestHeader("Adf-Window-Closed","discrete"),e.setRequestHeader("Adf-Window-Id",this.getWindowId()),e.setRequestHeader("Adf-Dialog-Return-Id",b)):(e.setRequestHeader("Adf-Window-Unregistered","true"),e.setRequestHeader("Adf-Window-Unregistered-Id",this.getWindowId()),e.setRequestHeader("Adf-Page-Unregistered-Id",
this.getPageId()));null!=this._pageStateId&&""!==this._pageStateId&&e.setRequestHeader(AdfDhtmlPage._PAGE_STATE_ID,this._pageStateId);d=this._getDefaultPostbackURL();e.send(d,"windowClosed")}}};AdfDhtmlPage.prototype.__ensureCoreBackgroundLoaded=function(){this._checkCoreBackgroundLoaded(!0)};AdfDhtmlPage.prototype.isCoreBackgroundScriptLoaded=function(){return null!=this.getDomWindow().AdfDhtmlPopupWindow};
AdfDhtmlPage.prototype._checkCoreBackgroundLoaded=function(a){var b=this.isCoreBackgroundScriptLoaded();a&&!b&&(a=this._coreBackgroundURI,AdfAssert.assert(null!=a,"Unxexpected null coreBackgroundURI"),this._loadSynchronousScript(a));return b};AdfDhtmlPage.prototype.__loadCoreBackgroundScript=function(a){this._coreBackgroundURI=a;this._loadBackgroundScript(a)};
AdfDhtmlPage._doResizeNotify=function(a,b,d){if(a){var e=a.component;if(e){var f=AdfRichUIPeer.getDomElementForComponent(e),g=f.clientWidth,f=f.clientHeight,h=a.clientWidth,k=a.clientHeight;if(0==g||0==f||g==h&&f==k&&!b){if(a.clientWidth=g,a.clientHeight=f,!d)return}else a.clientWidth=g,a.clientHeight=f,e.resizeNotify(h,k,g,f)}if(a=a.children){b=a.length;for(e=0;e<b;e++)AdfDhtmlPage._doResizeNotify(a[e],!1,d)}}};
AdfDhtmlPage.prototype._checkResizeNotifyDelayed=function(){var a=this._checkResizeNotifyTimer;a?this.rescheduleTimer(a,500):this._checkResizeNotifyTimer=this.scheduleTimer(this,this._checkResizeNotifyCallback,null,500)};AdfDhtmlPage.prototype._checkResizeNotifyCallback=function(){this._checkResizeNotifyTimer=null;this.__perfTimings(!1,!0,!1,"_checkResizeNotifyCallback","(start)");AdfDhtmlPage._doResizeNotify(this._resizeNotifyTree,!1,!0);this.__perfTimings(!1,!1,!1,"_checkResizeNotifyCallback","(end)")};
AdfDhtmlPage._appendUrlFormEncoded=function(a,b,d){0<a.length&&(a+="\x26");return a+b+"\x3d"+encodeURIComponent(d).replace(/\'/g,"%27").replace(/%20/g,"+")};
AdfDhtmlPage.prototype._setSelectedEditingComponents=function(a){AdfAssert.assertArrayOrNull(a);var b=this.getSelectedEditingComponents();if(a!=b){var d;if(null!=b){var e=b.length;for(d=0;d<e;d++)AdfDomUtils.removeCSSClassName(AdfRichUIPeer.getDomContentElementForComponent(b[d]),"p_AFInlineSelected")}var e=a?a.length:0,f;if(e){f=[];for(d=0;d<e;d++)f.push(a[d].getClientId())}else f=null;this._selectedEditingComponents=f;if(e)for(d=0;d<e;d++)AdfDomUtils.addCSSClassName(AdfRichUIPeer.getDomContentElementForComponent(a[d]),
"p_AFInlineSelected");(d=this.getEditedComponent())&&-1==AdfCollections.indexOf(a,d)&&this.setEditedComponent(null);AdfEventUtils.firePropertyChangeEvent(this._propertyChangeListeners,this,AdfPage.SELECTED_EDITING_COMPONENTS_PROPERTY,b,a)}};AdfDhtmlPage.prototype._isAncestorComponentOrSelf=function(a,b){return a===b?!0:this._isAncestorComponent(a,b)};
AdfDhtmlPage.prototype._isAncestorComponent=function(a,b){AdfAssert.assertPrototype(a,AdfUIComponent);AdfAssert.assertPrototype(b,AdfUIComponent);for(var d=AdfRichUIPeer.getDomContentElementForComponent(a),e=AdfRichUIPeer.getDomNodeForComponent(b).parentNode;e;){if(e===d)return!0;e=e.parentNode}return!1};
AdfDhtmlPage.prototype._intersectSelectionWithEditableSubtree=function(a,b){AdfAssert.assertPrototypeOrNull(a,AdfUIComponent);AdfAssert.assertArrayOrNull(b);return null==a?null:this._intersectSelectionWithEditableSubtreeDom(a.getPeer().getDomNode(),b)};
AdfDhtmlPage.prototype._intersectSelectionWithEditableSubtreeDom=function(a,b){if(null==a)return null;AdfAssert.assertDomNode(a);AdfAssert.assertArrayOrNull(b);var d=null!=b?b.length:0;if(0==d)return null;for(var e=[],f=0;f<d;f++){var g=b[f],h=g.getPeer();h.bind(g);h=h.getDomNode();AdfDhtmlPopupWindow.isAncestorOrSelf(a,h)&&e.push(g)}e.length==d&&(e=b);return e};
AdfDhtmlPage.prototype._isComponentInlineSelectable=function(a){return AdfDomUtils.containsCSSClassName(a,AdfDhtmlPage._EDITABLE_STYLE)||AdfDomUtils.containsCSSClassName(a,AdfDhtmlPage._SELECTABLE_STYLE)};
AdfDhtmlPage.prototype._inlineSelectionListener=function(a){var b=AdfAgent.AGENT,d=a.type,e=!0,f="mousemove"===d;if(f||"mouseover"==d||"mousedown"==d||"mouseout"==d){if(f||"mousedown"==d)if(e=!b.isChromeEvent(a),!e)return;if(!f){for(var f=b.getEventTarget(a),f=AdfRichUIPeer.getFirstAncestorComponent(f),g=this.getEditableSubtree(),h;null!=f&&!(h=AdfRichUIPeer.getDomContentElementForComponent(f),this._isComponentInlineSelectable(h));)f=f!=g?f.getParent():null;if(f&&("mouseover"==d||"mouseout"==d)){var g=
b.getPlatform()==AdfAgent.IE_PLATFORM,k=AdfPage.PAGE.getLocaleContext().isRightToLeft();if(!g||!k)if(g=AdfRichUIPeer.HOVER_TARGET_STYLECLASS,"mouseover"==d)d=this._hoverComponentId,f=f.getClientId(),d!==f&&(d&&this._removeStyleFromComponent(d,g),this._hoverComponentId=f,AdfDomUtils.addCSSClassName(h,g));else{if("mouseout"==d&&(d=this._hoverComponentId))this._removeStyleFromComponent(d,g),this._hoverComponentId=null}else AdfLogger.LOGGER.info("Due to a bug in IE, skinning's hover-target pseudo class not supported on IE in right to left mode.")}else if(f&&
"mousedown"==d){d=this._editableCallback;g=this._editableCallbackContext;if(!this._getFilterResult(f,d,g)){h=h.previousSibling;for(f=null;h;){k=h.nodeType;if(8==k){if((k=this._getComponentFromComment(h))&&this._getFilterResult(k,d,g)){f=k;break}}else if(1==k)break;h=h.previousSibling}}f&&this.setEditedComponent(f,a)}}}f=this._inlineEditor;null!=f&&f.handleEvent(a);e?b.eatEvent(a):b.stopPropagation(a)};
AdfDhtmlPage.prototype._removeStyleFromComponent=function(a,b){var d=this.findComponent(a);return d?(d=AdfRichUIPeer.getDomContentElementForComponent(d),AdfDomUtils.removeCSSClassName(d,b)):!1};AdfDhtmlPage._inlineSelectionStub=function(a){AdfPage.PAGE._inlineSelectionListener(a)};AdfDhtmlPage.prototype.setDefaultMessageHandlerComponentId=function(a,b){null!=a&&(this._defaultMessageKey=a);this._messageSlaveKey=b};AdfDhtmlPage.prototype.getDefaultMessageHandlerComponentId=function(){return this._defaultMessageKey};
AdfDhtmlPage.prototype.getMessageHandlerSlaveComponentId=function(){return this._messageSlaveKey};
AdfDhtmlPage.prototype.addMessage=function(a,b,d){var e=this._resolveMessageComponentId(a,!1);if(null==this.findComponent(e)){for(var f in this._pendingStreamingIDs)if(0==e.indexOf(f)){this._delayMessageForComponent(e,b,d);AdfLogger.LOGGER.info("A message for client id '"+e+"' is being added as delayed messages");return}AdfAssert.DEBUG&&AdfAssert.assert(!1,"A message for client id '"+e+"' is being added. No client component with that id can be found. ")}e=this._resolveMessageComponentId(a,!0);f=this._messages[e];
f||(f=[],f.sorted=[],f.maxType=0,f.compId=e,f.title=d,this._messages[e]=f);d=AdfFacesMessage.getTypeFromMessage(b);this._trackErrors&&d>=AdfFacesMessage.TYPE_ERROR&&(this._richPostbackHasErrors=!0);f.sorted[d]||(f.sorted[d]=[]);f.push(b);f.sorted[d].push(b);d>f.maxType&&(f.maxType=d);b=this.getMessageHandlerSlaveComponentId();b=this.findComponent(null!=b?b:this.getDefaultMessageHandlerComponentId());b=b.getGlobalOnly?b.getGlobalOnly():!1;var g=this._global_max_msg_type;if(!g||d>g)if(null==d)delete this._global_max_msg_type;
else if(g=this._resolveMessageComponentId(null,!1),(a=null==a||a==g)||!a&&!b)this._global_max_msg_type=d;this._notifyComponentMessaging(e,f)};AdfDhtmlPage.prototype.showMessages=function(a){a=this._resolveMessageComponentId(a,!0);var b=this.getAllMessages()[a];a=this.findComponent(a);if(null!=a){var d=a.getPeer();d.bind(a);null!=b?d.messageShow(a,b.maxType,b):d.messageShow(a)}};AdfDhtmlPage.prototype.getMessages=function(a){a=this._resolveMessageComponentId(a,!0);return this._messages[a]};
AdfDhtmlPage.prototype.getAllMessages=function(){var a=this._messages,b=this.getDefaultMessageHandlerComponentId(),d={};for(messageId in a){var e=this.findComponent(messageId);if(null==e)AdfLogger.LOGGER.info("AdfDhtmlPage.getAllMessages: ignoring messages for non-existing component: ",e);else if(b==messageId)d[messageId]=a[messageId];else{var f=AdfRichUIPeer.getDomElementForComponent(e);AdfDomUtils.isInVisibleSubtree(f)?d[messageId]=a[messageId]:AdfLogger.LOGGER.info("AdfDhtmlPage.getAllMessages: ignoring messages for hidden component: ",
e)}}return d};AdfDhtmlPage.prototype.getClientIdsWithMessages=function(a){var b=[],d=this._messages,e=this._defaultMessageKey,f;null!=a&&(f=this._getSubtreeRootNode(a));for(var g in d)!f&&g==e?b.push(null):(d=this.findComponent(g),null!=d&&(d=AdfRichUIPeer.getDomElementForComponent(d),AdfDomUtils.isInVisibleSubtree(d)&&(null==f||a==g||AdfDomUtils.isAncestor(f,d))&&b.push(g)));return b};AdfDhtmlPage.prototype.__setGlobalMessagesResetStrategy=function(a){this._globalMessagesResetStrategy=a};
AdfDhtmlPage.prototype.clearMessages=function(a){a=this._resolveMessageComponentId(a,!1);null!=this._messages[a]&&(delete this._messages[a],delete this._global_max_msg_type,this._notifyComponentMessaging(a,null));this._clearDelayedMessages(a)};AdfDhtmlPage.prototype.clearAllMessages=function(){var a=[],b;for(b in this._messages)a.push(b);this._messages={};this._messages={dirtyComponentsToRender:[]};delete this._global_max_msg_type;for(var d in a)this._notifyComponentMessaging(a[d],null);this._clearAllDelayedMessages()};
AdfDhtmlPage.prototype.hasMessages=function(a){return null!=this.getMessages(a)};AdfDhtmlPage.prototype._getSubtreeRootNode=function(a){var b=AdfPage.PAGE.findComponent(a);return b&&b instanceof AdfRichPopup?AdfDhtmlPopupPeer.getContentDom(b):AdfAgent.AGENT.getElementById(a)};
AdfDhtmlPage.prototype.clearSubtreeMessages=function(a){var b=this.getClientIdsWithMessages();if(b){var d=AdfAgent.AGENT,e=this._getSubtreeRootNode(a);if(e)for(var f=0;f<b.length;f++){var g=b[f];if(null!=g){var h=d.getElementById(g);(!h||a==g||AdfDomUtils.isAncestor(e,h))&&this.clearMessages(g)}}}};
AdfDhtmlPage.prototype._resolveMessageComponentId=function(a,b){return!b?null==a?this.getDefaultMessageHandlerComponentId():a:null!=a&&(this.findComponent(a)instanceof AdfUIEditableValue||null!=AdfAgent.AGENT.getElementById(AdfDhtmlPage._FOR_CONTAINER_PREFIX+a))?a:this._defaultMessageKey};
AdfDhtmlPage.prototype._getMaxType=function(){var a=this._global_max_msg_type;if(!a){var b=this.getDefaultMessageHandlerComponentId(),d=this.getMessageHandlerSlaveComponentId(),b=this.findComponent(null!=d?d:b),b=b.getGlobalOnly?b.getGlobalOnly():!1,d=this._resolveMessageComponentId(null,!1),e;for(e in this._messages)if(!(b&&e!=d)){var f=this._messages[e];if(null!=f&&(null==a||f.maxType>a))a=f.maxType}null!=a&&(this._global_max_msg_type=a)}return a};
AdfDhtmlPage.prototype._notifyComponentMessaging=function(a){var b=this._messages[a];if(a!=this._defaultMessageKey){if(null!=AdfAgent.AGENT.getElementById(AdfDhtmlPage._FOR_CONTAINER_PREFIX+a)){null!=b&&(b.overridden=!0);var d=this._messages.dirtyComponentsToRender;0>d.indexOf(a)&&d.push(a);this._messageNotifyTimeOut||(this._messageNotifyTimeOut=this.scheduleTimer(this,this._flushMessageComponentNotifications,null,200,{isSynchronized:!0}))}a=this.findComponent(a);if(null!=a){d=a.getPeer();d.bind(a);
null!=b?d.messageNotify(a,b.maxType,b):d.messageNotify(a);d=!a.dontPropagateDescendantMessageChanges();for(a=a.getParent();a&&d;)(d=a.getPeer())&&d.descendantMessageChanged(a),d=!a.dontPropagateDescendantMessageChanges(),a=a.getParent()}}this._updateCombinedMessageHandler(b)};AdfDhtmlPage.prototype._updateCombinedMessageHandler=function(a){var b=this.findComponent(this._defaultMessageKey);null!=b&&(peer=b.getPeer(),peer.bind(b),peer.messageNotify(b,this._getMaxType(),a))};
AdfDhtmlPage.prototype._flushMessageComponentNotifications=function(){for(var a=this._messages.dirtyComponentsToRender,b=a&&a.length||0,d=0;d<b;d++){var e=a[d],f=this._messages&&this._messages[e]||null;if(e=AdfAgent.AGENT.getElementById(AdfDhtmlPage._FOR_CONTAINER_PREFIX+e))null==f?AdfDomUtils.removeAllNodes(e):(AdfDomUtils.removeAllNodes(e),AdfMessageUtils.appendComponentMessageInlineDom(e,f))}this._messages.dirtyComponentsToRender=[];delete this._messageNotifyTimeOut};
AdfDhtmlPage.prototype._addDelayedMessages=function(a){var b=this._delayedMessages,d=!1,e;for(e in b)if(null!=this.findComponent(e)){for(var f=b[e],g=f.length,h=0;h<g;h++){var k=f[h],d=k.pop(),k=k.pop();this.addMessage(e,k,d);d=!0}this._clearDelayedMessages(e)}a&&d&&this.showMessages()};AdfDhtmlPage.prototype._delayMessageForComponent=function(a,b,d){var e=this._delayedMessages[a];e||(e=[],this._delayedMessages[a]=e);a=[];a.push(b);a.push(d);e.push(a)};
AdfDhtmlPage.prototype._clearDelayedMessages=function(a){null!=this._delayedMessages[a]&&delete this._delayedMessages[a]};AdfDhtmlPage.prototype._clearAllDelayedMessages=function(){this._delayedMessages={}};AdfDhtmlPage.prototype.getActiveDataSupport=function(){null==this._ads&&(this._ads=new AdfDhtmlActiveData);return this._ads};AdfDhtmlPage.prototype.isActiveDataSupported=function(){return null==this._ads?!1:!0};
AdfDhtmlPage.prototype.updateStartActiveDataStateChange=function(a,b){var d=this._startADSClientIds,e=this._stopADSClientIds,f=e.hasOwnProperty(b);f&&(delete e[b],AdfCollections.removeArrayValue(e,b));if(a||!f)d[b]=!0,this._startADSClientIdCount++,AdfLogger.LOGGER.fine("Request start of active data on ",b," startRefCount:",this._canReceiveActiveDataCount),0<this._canReceiveActiveDataCount&&this._updateDeliveryTimer()};
AdfDhtmlPage.prototype.__restartAllADSComponents=function(){this._restartAllADSComponents=!0;0<this._canReceiveActiveDataCount&&this._updateDeliveryTimer()};AdfDhtmlPage.prototype.updateStopActiveDataStateChange=function(a){var b=this._startADSClientIds;a in b?(delete b[a],this._startADSClientIdCount--):(b=this._stopADSClientIds,a in b||(AdfLogger.LOGGER.fine("Queue ADS stop on clientID:",a),b[a]=!0,b.push(a),this._updateDeliveryTimer()))};
AdfDhtmlPage.prototype._startGlobalActiveData=function(){this._canReceiveActiveDataCount++;1==this._canReceiveActiveDataCount&&this.isActiveDataSupported()&&(this.getActiveDataSupport().initActivePage(),this._updateDeliveryTimer())};AdfDhtmlPage.prototype._stopGlobalActiveData=function(){this._canReceiveActiveDataCount--};AdfDhtmlPage.prototype.stopActiveData=function(){};AdfDhtmlPage.prototype.startActiveData=function(){};AdfDhtmlPage.PushChannelStates={CONNECTED:0,CONNECTING:1,DISCONNECTED:2,RECONNECTING:3};
AdfDhtmlPage.prototype.getWindowId=function(){if(null==this._windowId)try{this._windowId=this.getDomWindow().name}catch(a){AdfLogger.LOGGER.logErrorAsInfo(a,"Could not get the window Id.")}return this._windowId};AdfDhtmlPage.prototype.setWindowId=function(a){this._windowId=a};AdfDhtmlPage.prototype.getPageId=function(){return this._pageId};AdfDhtmlPage.prototype.setPageId=function(a){this._pageId=a};
AdfDhtmlPage.prototype.updateAutoPPRComponents=function(a,b){this.setPageId(a);for(var d=this._autoPPRComponents,e=arguments.length,f=this._stopADSClientIds,g=1;g<e;g++){var h=arguments[g];AdfAssert.assertString(h);h in f&&(delete f[h],AdfCollections.removeArrayValue(f,h));d[h]=!0}};AdfDhtmlPage.prototype._stopAutoPPR=function(a){AdfAssert.assertString(a);delete this._autoPPRComponents[a];AdfLogger.LOGGER.fine("Stop autoPPR active data on ",a);this.updateStopActiveDataStateChange(a,null)};
AdfDhtmlPage.prototype._handleBeforeUnload=function(a){AdfLogger.LOGGER.getLogWriter().flush();if(!this.isPerformingFullSubmit()||this._waitingForDocumentUnload){var b=!1,d=void 0,e=this.findComponent(this._documentClientId);e&&(d=new AdfBeforeUnloadEvent(e),e.broadcast(d),d=d.getWarningMessage(),void 0!==d&&(b=!0));var e=AdfDhtmlRichDialogService.hasModalDialogsOpen(),f=this._isTrackingRegionUncommittedData();if(!b&&(this._isTrackingDocumentUncommittedData()||f||this._checkDirtyDataComponents()||
e)){if(!this._dirtyStateService.__isPotentiallyDirty()&&void 0!=this.getDomWindow().AdfDhtmlInputBasePeer){var f=null,g=this.getActiveComponent();g&&(f=g.getPeer());f&&f instanceof AdfDhtmlInputBasePeer&&f.__simulateBlur(g)}g=!1;f=this._isTrackingDocumentUncommittedData()&&(this._dataDirty||this._dirtyStateService.__isPotentiallyDirty())||this._checkDirtyDataComponents();f||(g=this._getDirtyRegionIds(),g=null!=g&&0<g.length);if(f||g||e)b=!0,d=this.getLookAndFeel().getTranslatedString(!e?"af_document.MSG_UNCOMMITTED_DATA":
"af_document.MSG_DEPENDENT_DIALOGS"),a.returnValue=d}this._beforeUnloadDelayed=!1;if(b){this._beforeUnloadDelayed=!0;if(this.isActiveDataSupported()){var h=this;window.setTimeout(function(){window.setTimeout(function(){h.getActiveDataSupport().__checkAdsConnection()},1E3)},1)}return a.returnValue=d}this._unloading=!0;this.notifyWindowUnloaded();if(this.isActiveDataSupported())this.getActiveDataSupport().onBeforeUnload();this.isUserActivityMonitoringOn()&&this._partialRequestRedirect&&AdfUserActivityInfo.saveToSessionStorage()}};
AdfDhtmlPage.prototype._fixupLinkOnClick=function(a){for(delete this._notifyOfUnloadUrl;null!=a&&"A"!=a.nodeName;)a=a.parentNode;if(null!=a){var b=a.href;null!=b&&(a=a.getAttribute("href"),a&&0==a.indexOf("#")||(this._notifyOfUnloadUrl=b))}};AdfDhtmlPage.prototype.setStreamingDisabled=function(a){this._streamingDisabled=a};AdfDhtmlPage.prototype.isStreamingDisabled=function(){return this._streamingDisabled};
AdfDhtmlPage.prototype.sendStreamingRequest=function(a,b){var d=this.getDomDocument().forms[0];AdfAssert.assert(d,"No form found;  cannot stream data. Make sure that data components are placed within a form");var e=this._getPPRURL(d),f={};this._addPendingStreamingIDs(b,f);null!=a&&(f[AdfDhtmlPage._PAGE_STATE_ID]=a);AdfDhtmlPage._addStateParameter(d,f);this._streamingStatus=AdfDhtmlPage._STREAMING_REQUEST_SENT;this._stopGlobalActiveData();this.isUserActivityMonitoringOn()&&(AdfUserActivityInfo.getInstance(AdfUserActivityInfo.SECONDARY).setClientStartTime((new Date).getTime().toString()),
AdfUserActivityInfo.saveToSessionStorageByType(AdfUserActivityInfo.SECONDARY));this.getDataTransferService().sendStreamingRequest(e,f);if(this._perfProfileEnabled||this._perfProfileTimingEnabled)this.getDomWindow()._afrTimingStreamingRequestStart=(new Date).getTime()};AdfDhtmlPage._addStateParameter=function(a,b){var d=AdfDhtmlPage._STATE_PARAM_NAME,e=a.elements[d];AdfAssert.assert(e,"No view state token for postback");b[d]=e.value};
AdfDhtmlPage._addPageStateIdParameter=function(a,b){var d=AdfDhtmlPage._PAGE_STATE_ID,e=a.elements[d];null!=e&&""!==e.value&&(b[d]=e.value)};
AdfDhtmlPage.prototype.getLazyFetchURI=function(a){AdfAssert.assertString(a,"invalid Id for the lazy fetch URI");var b=this.getDomDocument().forms[0];AdfAssert.assert(b,"No form found;  cannot perform lazy fetch");var d=b.action,d=-1==d.indexOf("?")?d+"?unique\x3d":d+"\x26unique\x3d",d=d+(new Date).getTime(),e=AdfDhtmlPage._STATE_PARAM_NAME,d=d+("\x26"+e+"\x3d"),e=b[e];AdfAssert.assert(e,"No view state token for lazy fetch");d+=e.value;e=AdfDhtmlPage._PAGE_STATE_ID;b=b.elements[e];null!=b&&""!==b.value&&
(d+="\x26"+e+"\x3d"+b.value);d+="\x26"+AdfDhtmlPage._LAZY_FETCH_ID_PARAM+"\x3d"+a;return d+=AdfXmlHttpDataTransferService.__encodeWindowIdOnUrl(d,this.getWindowId())};AdfDhtmlPage.prototype.isStreamingRequestPending=function(a){return this._pendingStreamingIDs[a]};
AdfDhtmlPage.prototype._addPendingStreamingIDs=function(a,b){for(var d="",e=[],f=[],g=0;g<a.length;g++){var h=a[g],k=this.getDomDocument().getElementById(h);AdfDomUtils.isInVisibleSubtree(k)?(this._pendingStreamingIDs[h]=!0,e.push(h)):f.push(h)}0<e.length&&(d=e.join(","));b[AdfDhtmlPage._STREAMING_IDS_PARAM]=d;0<f.length&&(b[AdfDhtmlPage._REMOVED_STREAMING_IDS_PARAM]=f.join(","))};
AdfDhtmlPage._getCookie=function(a,b){if(0<a.cookie.length){var d=a.cookie.indexOf(b+"\x3d");if(-1!=d){var e=a.cookie.indexOf(";",d);-1==e&&(e=a.cookie.length);return a.cookie.substring(d+b.length+1,e)}}return null};AdfDhtmlPage._setCookie=function(a,b,d,e,f){AdfAssert.assertNumeric(e);var g="";e&&(g=new Date,g.setTime(g.getTime()+e),g="expires\x3d"+g.toGMTString()+";");a.cookie=b+"\x3d"+d+";"+g+(f?"path\x3d"+f+";":"path\x3d/;")};AdfDhtmlPage._eraseCookie=function(a,b){this.setCookie(a,b,"",-99999)};
AdfDhtmlPage.prototype._dtsStateChanged=function(){var a=this.getDataTransferService().getDTSState()!=AdfDataTransferService.STATE_READY;this._serverBusy!=a&&(this._serverBusy=a,AdfAgent.AGENT.showBusyCursor(this.getDomDocument(),a),this._broadcastBusyStateEvent(a));a||this._deliverQueuedServerEvents()};AdfDhtmlPage.prototype.setLastFocusedElement=function(a){this._lastFocusedElement=a};AdfDhtmlPage.prototype.getLastFocusedElement=function(a){return this._lastFocusedElement};
AdfDhtmlPage.prototype.setPPRNavigationOptions=function(a){this._pprNavOptions=a};AdfDhtmlPage.prototype.getPPRNavigationOptions=function(){return void 0!=this._pprNavOptions?this._pprNavOptions:0};AdfDhtmlPage.prototype._collectCss=function(){for(var a={},b=document.getElementsByTagName("link"),d=0,e=b.length;d<e;++d){var f=b[d].getAttribute("href");f&&(a[f]=!0)}return a};
AdfDhtmlPage.prototype.flushToAssistiveTechnology=function(){var a=AdfAgent.AGENT.getElementById("afr::ATFlush");a&&(a.value="1"==a.value?"0":"1")};AdfDhtmlPage.prototype.announceToAssistiveTechnology=function(a,b){var d=AdfAgent.AGENT.getElementById("afr::ATStatus");d&&!(b&&a==this._lastStatusMessage)&&(this._lastStatusMessage=d.innerHTML=a,(d=this._clearStatusMessageTimer)?this.rescheduleTimer(d,2E3):this._clearStatusMessageTimer=this.scheduleTimer(this,this._clearStatusRegion,null,2E3))};
AdfDhtmlPage.prototype._clearStatusRegion=function(){var a=AdfAgent.AGENT.getElementById("afr::ATStatus");a&&(a.innerHTML="",this.flushToAssistiveTechnology());this._clearStatusMessageTimer=null};AdfDhtmlPage.prototype.setDataDirty=function(a){this._dataDirty=a};AdfDhtmlPage.prototype.registerDirtyDataComponent=function(a,b){this._dirtyStateService.__registerDirtyDataComponent(a,b)};AdfDhtmlPage.prototype._checkDirtyDataComponents=function(){return this._dirtyStateService.__alwaysDisplayDirtyDataWarning()};
AdfDhtmlPage.prototype._setProcessedRoots=function(a,b){this._richPostbackHasErrors||this._dirtyStateService.__dataCommitted(a,!0===b)};AdfDhtmlPage.prototype.confirmNavigation=function(a,b){var d=this._displayUncommittedDataWarning(null),e={};e["oracle.adfinternal.view.faces.rich.navigationToken"]=a;e["oracle.adfinternal.view.faces.rich.confirmNavigation"]=d;this._sendRichPayload(e,{_noNavigation:!b})};
AdfDhtmlPage.prototype._navResetPage=function(){AdfDhtmlRichDialogService.getInstance().cancelAll();this._pageProperties={};this._setRichResponseDirty(!1);this._resizeNotifyMap={};this._resizeNotifyTree={};this._descendantResizeNotifyList=[];this._serverQueue=new AdfServerEventQueue;this._partialTargets=null;this._autoPPRComponents={};this.isActiveDataSupported()&&(this._canReceiveActiveDataCount=1,this.getActiveDataSupport().reset());this._trackedRegions=this._dirtyServerRegions=null;this._dirtyStateService.__resetState()};
AdfDhtmlPage._removeResourcesByTagName=function(a,b){for(var d=b.getElementsByTagName(a),e=d.length-1;0<=e;--e){var f=d[e];f.hasAttribute("afrres")&&b.removeChild(f)}};AdfDhtmlPage.prototype.removePageResources=function(){var a=this._getHead();AdfDhtmlPage._removeResourcesByTagName("LINK",a);AdfDhtmlPage._removeResourcesByTagName("STYLE",a)};
AdfDhtmlPage.prototype._handleInvalidPprResponse=function(a,b,d){if(a){var e=AdfDhtmlPage._extractInstructionXML(a,"partial-response");if(e&&e.documentElement&&e.documentElement.firstChild){var f=AdfAgent.AGENT.getNodeName(e.documentElement.firstChild);if("error"==f){this._handleRichResponse(e,null);b&&this._sendJsfAjaxEvent("error",{context:b,responseCode:d.getResponseStatusCode(),responseText:a,responseXML:e});return}if("redirect"==f){this._handleRichResponse(e,null);return}}}else b&&this._sendJsfAjaxEvent("error",
{context:b,event:d});AdfAssert.DEBUG?AdfLogger.LOGGER.severe("Unexpected non-rich response"):AdfLogger.LOGGER.warning("Unexpected non-rich response");this._unloading||this.getDomWindow().location.reload(!0)};AdfDhtmlPage._extractInstructionXML=function(a,b){var d=a.length;if(1>=d||"\x3e"!=a.charAt(d-1))return null;var e=null,f="\x3c/"+b,g=f.length;d>g+1&&f==a.substr(d-g-1,g)&&(d=a.lastIndexOf("\x3c?xml"),0<=d&&(e=AdfAgent.AGENT.parseXML(a.substring(d))));return e};
AdfDhtmlPage.prototype.__initUncommittedDataWarningForDocument=function(a){this._warnUncommitted=a;this._resetUncommittedIds()};AdfDhtmlPage.prototype.__enableDirtyPostbackPayloads=function(){this._dirtyPostbackPayloads=!0;this._resetUncommittedIds()};AdfDhtmlPage.prototype.__isDirtyPostbackPayloadsEnabled=function(){return this._dirtyPostbackPayloads};AdfDhtmlPage.prototype._isTrackingDirtyData=function(){return!0};
AdfDhtmlPage.prototype._shouldPostbackValue=function(a,b){if(this._dirtyPostbackPayloads){var d=this._mapInputElementToComponent(a);return null==d||null!=d.getProperty("_afrFullPost")||!(d instanceof AdfUIEditableValue)||!d.isConvertible()||!d.getValid()||this._dirtyStateService.isDirty(d)||this._dirtyStateService.__isInputValueDirty(this,d,a)||-1<AdfCollections.indexOf(b,d)}return!this._isUncheckedInput(a)};
AdfDhtmlPage.prototype.__disableDirtyDataRetainPPR=function(){this._disableDirtyDataRetainPPR=!0};AdfDhtmlPage.prototype._isDirtyDataRetainPPRDisabled=function(){return this._disableDirtyDataRetainPPR};AdfDhtmlPage.prototype._mapInputElementToComponent=function(a){var b=AdfRichUIPeer.getFirstAncestorComponent(a);if(!b)return null;var d=b.getClientId();return d==this._stripSubId(a.name)||d==this._stripSubId(a.id)?b:null};
AdfDhtmlPage.prototype._stripSubId=function(a){var b=null==a?-1:a.lastIndexOf("::");return-1<b?a.substr(0,b):a};AdfDhtmlPage.prototype._resetUncommittedIds=function(){this._dirtyStateService.__resetState()};AdfDhtmlPage.prototype._isUncheckedInput=function(a){return("checkbox"==a.type||"radio"==a.type)&&!a.checked};AdfDhtmlPage.prototype._disableUncommittedWarnings=function(){this._warnUncommitted=!1;this._dirtyServerRegions=this._trackedRegions=null};
AdfDhtmlPage.prototype._isTrackingDocumentUncommittedData=function(){return this._warnUncommitted};AdfDhtmlPage.prototype._isTrackingRegionClientUncommittedData=function(){return null==this._trackedRegions?!1:!AdfCollections.isEmpty(this._trackedRegions)};AdfDhtmlPage.prototype._isTrackingRegionUncommittedData=function(){return null!=this._dirtyServerRegions?!0:this._isTrackingRegionClientUncommittedData()};
AdfDhtmlPage.prototype._getDirtyRegionIds=function(){var a=null;if(null!=this._dirtyServerRegions){var a=[],b;for(b in this._dirtyServerRegions)a.push(b)}if(this._isTrackingRegionClientUncommittedData())for(var d in this._trackedRegions)!(null!=this._dirtyServerRegions&&this._dirtyServerRegions[d])&&this._dirtyStateService.isNamingContainerDirty(d)&&(null==a&&(a=[]),a.push(d));return a};
AdfDhtmlPage.prototype.__initializeSessionTimeoutTimer=function(a,b,d){var e=this.isActiveDataSupported()?AdfCollections.isEmpty(this.getActiveDataSupport().getActiveComponents()):!0,f=this.__getUserInactivityTimeoutHelper();e||f&&f.hasTimedOut()?(this._sessionTimeoutHelper||(this._sessionTimeoutHelper=new AdfSessionTimeoutHelper),this._sessionTimeoutHelper.__initializeSessionTimeoutTimer(a,b,d)):this._sessionTimeoutHelper&&this._sessionTimeoutHelper.__cancelSessionTimeoutTimer()};
AdfDhtmlPage.prototype.__getSessionTimeoutHelper=function(){return this._sessionTimeoutHelper};AdfDhtmlPage.prototype.__initUserInactivityTimeout=function(a){var b=this.__getUserInactivityTimeoutHelper();b&&b.initializeTimeout(a)};AdfDhtmlPage.prototype.__getUserInactivityTimeoutHelper=function(){var a=this._userInactivityTimeoutHelper;if(!a){var b=this.getDomWindow().AdfUserInactivityTimeoutHelper;b&&(this._userInactivityTimeoutHelper=a=new b)}return a};
AdfDhtmlPage.prototype.getComponentIdsUpdatedByPollEvent=function(){return this._componentsUpdatedByPollEvent};
AdfDhtmlPage.prototype.__handleNavigation=function(a,b){AdfAssert.assertNonEmptyString(a);this._registerGetRequestNavigationTracking();var d=this.getDomWindow(),e=AdfDhtmlPage._getTargetWindow(b,d),f=this.isPPRNavigationEnabled(),g=!1;f&&"_blank"!=b&&(g=this._isDestinationLocal(a));!f||!g||!e||!e.AdfPage||!e.AdfPage.PAGE?e==self?e.location.href=a:((d=d.open(a,b))&&d.focus(),delete this._inGetRequestNavigation):e.AdfPage.PAGE.localNavigate(a)};
AdfDhtmlPage._getTargetWindow=function(a,b){return!a||"null"==a||"_self"==a?self:"_blank"==a?null:"_top"==a?top:"_parent"==a?parent:b.frames[a]};
AdfDhtmlPage.prototype._isDestinationLocal=function(a){var b=this.getFacesPath();if(0<a.indexOf("org.apache.myfaces.trinidad.agent.email\x3dtrue"))a=!1;else if(-1!=a.indexOf(":")){var d=document.location,e=d.origin;e||(e=d.href,e=e.slice(0,e.length-(d.pathname.length+d.search.length+d.hash.length)));a=0==a.indexOf(e+b)?!0:!1}else a="/"==a.charAt(0)?0==a.indexOf(b)?!0:!1:!0;return a};
AdfDhtmlPage.prototype._sendJsfAjaxEvent=function(a,b){if(!(!0!==this._jsfAjaxInit||null==b.context||null==b.context._discreteEvent||!(b.context._discreteEvent instanceof AdfJsfAjaxRequestEvent))){var d=b.context._discreteEvent._options["error"==a?"onerror":"onevent"],e={type:"event",status:a,source:b.context._discreteEvent._sourceElement};if("begin"!=a&&(b.event?(e.responseCode=b.event.getResponseStatusCode(),e.responseXML=b.event.getResponseXML(),e.responseText=b.event.getResponseText()):(e.responseCode=
b.responseCode,e.responseXML=b.responseXML,e.responseText=b.responseText),"error"==a)){e.description=null;e.errorName=null;e.errorMessage=null;var f=this.getLookAndFeel();if(null==e.responseXML||null==e.responseXML.documentElement)e.description=f.getTranslatedString("AFPprEmptyResponse");else{var g=e.responseXML.getElementsByTagName("parsererror");e.description=0<g.length?AdfAgent.AGENT.getTextContent(g[0]):f.getTranslatedString("AFPprUnknownError")}e.responseXML&&(e.responseXML.documentElement&&
"partial-response"==e.responseXML.documentElement.tagName&&e.responseXML.documentElement.firstChild&&"error"==e.responseXML.documentElement.firstChild.tagName)&&(f=e.responseXML.documentElement.firstChild,e.errorName=f.firstChild.firstChild.nodeValue,e.errorMessage=f.firstChild.nextSibling.firstChild.nodeValue)}for(var f=this._jsfAjaxListeners["error"==a?"error":"event"],g=0,h=f.length;g<h;++g){var k=f[g];try{k(e)}catch(l){AdfLogger.LOGGER.severe("AJAX listener threw exception:",l)}}if(d)try{d(e)}catch(m){AdfLogger.LOGGER.severe("AJAX listener threw exception:",
m)}}};AdfDhtmlPage.prototype._jsfAjaxRequest=function(a,b,d){AdfJsfAjaxRequestEvent.queue(a,b,d)};AdfDhtmlPage.prototype._jsfAjaxAddOnEvent=function(a){this._jsfAjaxListeners.event.push(a)};AdfDhtmlPage.prototype._jsfAjaxAddOnError=function(a){this._jsfAjaxListeners.error.push(a)};
AdfDhtmlPage.prototype._replaceJsfAjaxFunctions=function(){if(!this._jsfAjaxInit&&!("undefined"==typeof this._window.jsf||"undefined"==typeof this._window.jsf.ajax)){var a=jsf.ajax;a._origRequest=a.request;a._origAddOnEvent=a.addOnEvent;a._origAddOnError=a.addOnError;this._jsfAjaxListeners={event:[],error:[]};a.request=this.createCallback(this._jsfAjaxRequest);a.addOnEvent=this.createCallback(this._jsfAjaxAddOnEvent);a.addOnError=this.createCallback(this._jsfAjaxAddOnError);this._jsfAjaxInit=!0}};
AdfDhtmlPage.prototype.__confirm=function(a,b,d,e,f){AdfAssert.assertString(a,"confirm title");AdfAssert.assertString(b,"confirm message");AdfAssert.assertFunction(d,"confirm callback");e&&AdfAssert.assertNumber(e,"confirm timeout");var g=this.findComponent(this._documentClientId),h=g.getPeer();h.bind(g);return h.__showAlertConfirm(f,a,b,d,e)};
AdfDhtmlPage.prototype.__alert=function(a,b,d){AdfAssert.assertString(a,"alert title");AdfAssert.assertString(b,"alert message");AdfAssert.assertFunction(d,"alert callback");var e=this.findComponent(this._documentClientId),f=e.getPeer();f.bind(e);return f.__showAlertConfirm(!0,a,b,d)};
AdfDhtmlPage.prototype._updateViewState=function(a){var b=this.getDomDocument(),d=AdfAgent.AGENT,e=b.forms.length;AdfAssert.assert(0<e);for(var f=0;f<e;f++){var g=b.forms[f];AdfAssert.assertDomElement(g);if(1==e||this._isAdfForm(g)){var h=d.getTextContent(a),k=g.elements[AdfDhtmlPage._STATE_PARAM_NAME];k?k.value=h:(k=b.createElement("span"),k.innerHTML="\x3cinput type\x3d'hidden' name\x3d'"+AdfDhtmlPage._STATE_PARAM_NAME+"' value\x3d'"+h+"' /\x3e",g.appendChild(k))}}};
AdfDhtmlPage.prototype._isAdfForm=function(a){a=a.id;return null!=a?null!=AdfAgent.AGENT.getElementById(a+AdfDhtmlPage._POSTSCRIPT_ID_SUFFIX):!1};AdfDhtmlPage.prototype._displayUncommittedDataWarning=function(a){null==a&&(a=this.getLookAndFeel().getTranslatedString("af_document.MSG_CONFIRM_NAVIGATION"));return confirm(a)};AdfDhtmlPage.prototype._displayRegionUncommittedDataWarning=function(a){null==a&&(a=this.getLookAndFeel().getTranslatedString("af_region.MSG_CONFIRM_CLOSE"));return confirm(a)};
AdfDhtmlPage.prototype._logAsGlobalError=function(a){void 0!=window.onerror&&this.__handleGlobalError(a.message,a.fileName,a.lineNumber)};AdfDhtmlPage.prototype.logAsGlobalError=function(a){this._logAsGlobalError(a)};
AdfDhtmlPage.prototype.__handleGlobalError=function(a,b,d){this._savedErrors||(this._savedErrors=[]);var e=!1;"setting a property that has only a getter"==a&&(""==b&&0==d)&&(e=!0);AdfAgent.AGENT.getPlatform()==AdfAgent.GECKO_PLATFORM&&void 0!=a&&(""==b&&0==d&&a.match(/Permission denied for </)&&a.match(/> to call method Location.toString on </)?e=!0:""!=b&&a.match(/Permission denied to get property Location.toString/)&&(e=!0));if(e)return!1;this._savedErrors.push({msg:a,url:b,line:d});return!1};
AdfDhtmlPage.prototype._throwSavedErrors=function(){if(this._savedErrors&&0<this._savedErrors.length){for(var a="Javascript error(s): ",b=0;b<this._savedErrors.length;b++){0<b&&(a+=";");var d=this._savedErrors[b],a=a+d.msg;d.url&&(a+=" in "+d.url);void 0!==d.line&&null!==d.line&&(a+=":"+d.line)}throw a;}};AdfDhtmlPage.prototype._getQueryParamsFromActionUrl=function(){var a=null,b=this.getDomDocument().forms[0].action,d=b.indexOf("?");0<=d&&(a=b.substring(d));return a};
AdfDhtmlPage.prototype._isPrintablePage=function(){var a=this.getDomDocument().body;return AdfDomUtils.containsCSSClassName(a,AdfDhtmlPage._PRINTABLE_STATE)};AdfDhtmlPage.prototype.__setDirtyRegions=function(){this._dirtyServerRegions=null;0<arguments.length&&(this._dirtyServerRegions={});for(var a=0;a<arguments.length;a++)this._dirtyServerRegions[arguments[a]]=!0};
AdfDhtmlPage.prototype.__registerRegionClientUncommittedDataTracking=function(a){null==this._trackedRegions&&(this._trackedRegions={});this._trackedRegions[a]=!0};AdfDhtmlPage.prototype.__unregisterRegionClientUncommittedDataTracking=function(a){null!=this._trackedRegions&&null!=this._trackedRegions[a]&&delete this._trackedRegions[a]};
AdfDhtmlPage.prototype._registerGetRequestNavigationTracking=function(){this._inGetRequestNavigation=!0;this.scheduleTimer(this,this._unregisterGetRequestNavigationTracking,null,500)};AdfDhtmlPage.prototype._unregisterGetRequestNavigationTracking=function(){delete this._inGetRequestNavigation};AdfDhtmlPage.prototype.__markSeleniumRC=function(){this._seleniumRC||(this._seleniumRC=!0)};AdfDhtmlPage.prototype.__isSeleniumRC=function(){return this._seleniumRC};
AdfDhtmlPage.prototype._detectSeleniumRC=function(){for(var a=this.getDomWindow();a;){if(this._isSeleniumRCWindow(a))return!0;if(a==a.parent&&a==a.opener)break;a=a.parent==a?a.opener:a.parent}return!1};AdfDhtmlPage.prototype._isSeleniumRCWindow=function(a){var b;try{b=a.name}catch(d){return!1}return b&&0==b.indexOf("selenium")};
AdfDhtmlPage.prototype._throwAndClearSavedErrors=function(){if(this._savedErrors&&0<this._savedErrors.length){for(var a="Javascript error(s): ",b=0;b<this._savedErrors.length;b++)0<b&&(a+=";"),a+=AdfAutomationHelper.errorToString(this._savedErrors[b]);this._savedErrors=[];throw a;}};
AdfDhtmlPage.prototype.simulateMouse=function(a,b){var d=a,e,f=a.indexOf("#");-1<f&&(d=a.substring(0,f),e=a.substring(f+1));AdfLogger.LOGGER.fine("SimulateMouse, locator: "+a+", compLocator: "+d+", subId: "+e);(d=this.findComponentByAbsoluteLocator(d))?d.simulateMouse(e,b):AdfLogger.LOGGER.warning("During simulateMouse, unable to find a component for the provided locator: "+a)};
AdfDhtmlPage.prototype.simulateDomMouse=function(a,b){var d=AdfAgent.AGENT;null==b&&(b={});null==b.type&&(b.type="click");null==b.canBubble&&(b.canBubble=!0);null==b.cancelable&&(b.cancelable=!0);null==b.view&&(b.view=window);null==b.detail&&(b.detail=1);null==b.screenX&&(b.screenX=0);null==b.screenY&&(b.screenY=0);null==b.clientX&&(b.clientX=d.getElementLeft(a)+(0<a.offsetWidth?a.offsetWidth/2:0));null==b.clientY&&(b.clientY=d.getElementTop(a)+(0<a.offsetHeight?a.offsetHeight/2:0));null==b.ctrlKey&&
(b.ctrlKey=!1);null==b.altKey&&(b.altKey=!1);null==b.shiftKey&&(b.shiftKey=!1);null==b.metaKey&&(b.metaKey=!1);null==b.button&&(b.button=0);null==b.relatedTarget&&(b.relatedTarget=null);AdfLogger.LOGGER.fine("simulateDomMouse, domElement id: "+a.id+", type: "+b.type);AdfDhtmlTestEngine.getEngine().simulateDomMouse(a,b)};