var O={};v("AdfFocusUtils",O);O.Vl=function(a){for(var b=F.c.Qc;b!=n;){if(b==a)return l;b=b.parentNode}return p};v("AdfFocusUtils.containsFocus",O.Vl);O.ra=function(a){B.p(a);Gg.scope(a);O.eva(a)};O.focusElement=O.ra;v("AdfFocusUtils.focusElement",O.ra);O.P0=function(){return O.P9!=n};v("AdfFocusUtils.isFocusChangePending",O.P0);O.ufa=function(){var a=O.Re(F.c.mc.body,l);a!=n&&0>a.offsetTop&&(a=O.bJ(a));a!=n&&O.ra(a);return a};v("AdfFocusUtils.focusFirstDocumentTabStop",O.ufa);
O.Sj=function(a,b){B.p(a);var d=O.Re(a,b);d!=n&&O.ra(d);return d};O.focusFirstTabStop=O.Sj;v("AdfFocusUtils.focusFirstTabStop",O.Sj);O.ABa=function(a,b){B.p(a);var d=O.WI(a,b);d!=n&&O.ra(d);return d};v("AdfFocusUtils.focusLastTabStop",O.ABa);O.Ud=function(a,b,d){d=O.bJ(a,b,d);d||(b||(b=a.ownerDocument.documentElement),d=O.Re(b,l));d&&O.ra(d);return d};v("AdfFocusUtils.focusNextTabStop",O.Ud);O.Qh=function(a,b){var d=O.vCa(a,b);d||(b||(b=a.ownerDocument.documentElement),d=O.WI(b,l));d&&O.ra(d);return d};
v("AdfFocusUtils.focusPreviousTabStop",O.Qh);O.Re=function(a,b){return H.Lu(a,b,O.cD)};v("AdfFocusUtils.getFirstTabStop",O.Re);O.WI=function(a,b){return H.e0(a,b,O.cD)};v("AdfFocusUtils.getLastTabStop",O.WI);O.bJ=function(a,b,d){return H.l0(a,b,d,O.cD)};O.getNextTabStop=O.bJ;v("AdfFocusUtils.getNextTabStop",O.bJ);O.vCa=function(a,b){return H.vga(a,b,O.cD)};v("AdfFocusUtils.getPreviousTabStop",O.vCa);O.cD=function(a){return a!=n&&-1<a.tabIndex&&O.Lp(a)};v("AdfFocusUtils.isTabStop",O.cD);
O.Lp=function(a,b){return O.AQ(a,b)==H.bl};v("AdfFocusUtils.isFocusable",O.Lp);O.AQ=function(a,b){if(a==n||1!=a.nodeType||a.disabled||-1>H.Fga(a))return H.gk;if(!O.XXa(a))return H.Ps;O.M0a(b);return O.FR(a,b)?H.bl:H.gk};v("AdfFocusUtils.acceptFocusableNode",O.AQ);O.M0a=function(a){if(a&&!a.Iha){var b=(new Date).getTime();a.Iha="y"+b;a.tDa="n"+b}};O.bBa=function(a,b,d){if(b&&a&&d){a=w.b.getAttribute(a,d);if(a==b.Iha)return l;if(a==b.tDa)return p}};v("AdfFocusUtils.calculateCachedValue",O.bBa);
O.w1=function(a,b,d,e){b&&(a&&d&&e!=k)&&w.b.Gg(a,d,e?b.Iha:b.tDa)};v("AdfFocusUtils.setCacheValue",O.w1);O.FR=function(a,b){B.p(a);var d=w.b.w().documentElement,e=O.bBa(a,b,"_afrFoc");if(e!=k)return e;if(!O.kYa(a))return O.w1(a,b,"_afrFoc",p),p;if(a==d)return O.w1(a,b,"_afrFoc",l),l;d=a.parentNode==n||1!=a.parentNode.nodeType?p:O.FR(a.parentNode,b);O.w1(a,b,"_afrFoc",d);return d};v("AdfFocusUtils.isConnectedAndVisible",O.FR);
O.kYa=function(a){var b;b||(b=w.b.getComputedStyle(a));return O.Saa(a,b)?p:!O.Xwa(a,b)};O.Xwa=function(a,b){b||(b=w.b.getComputedStyle(a));return"hidden"==b.visibility};O.Saa=function(a,b){b||(b=w.b.getComputedStyle(a));return"none"==b.display&&("none"==a.style.display||!Gg.gDa(a)||!Gg.aDa(a))?l:p};
O.XXa=function(a){B.p(a);var b=H.Fga(a);switch(a.nodeName.toLowerCase()){case "a":if(!a.href&&b==k)return p;case "input":if("hidden"==a.type&&a.isContentEditable!=l)return p;case "area":case "body":case "button":case "frame":case "iframe":case "isindex":case "object":case "select":case "textarea":return l;default:return-1<=b?l:p}};O.EC=function(a,b){B.p(a);B.Ea(b);var d=F.c,e=O.P9;e&&d.ac(e);O.P9=d.oa(n,O.$Ua,a,b)};v("AdfFocusUtils.focusElementDelayed",O.EC);O.$Ua=function(a){O.P9=n;O.eva(a)};
O.eva=function(a){try{var b=w.b,d=b.R();a.setActive&&11>b.nb()&&a.setActive();a.focus();d.gj&&b instanceof ee||"text"==a.type&&"INPUT"==a.tagName&&a.setSelectionRange(0,a.value.length)}catch(e){D.i.error(e)}};O.BI=function(a,b,d){B.p(a);B.p(b);var e=O.aJ(a,b);if(!e)if(d)e=O.Zl(a);else return e;e&&e!=b&&(b.setAttribute("tabIndex","-1"),e.setAttribute("tabIndex","0"),O.ra(e));return e};v("AdfFocusUtils.focusNextActiveDescendant",O.BI);
O.CI=function(a,b,d){B.p(a);B.p(b);var e=O.nR(a,b);if(!e)if(d)e=O.KC(a);else return e;e&&e!=b&&(b.setAttribute("tabIndex","-1"),e.setAttribute("tabIndex","0"),O.ra(e));return e};v("AdfFocusUtils.focusPreviousActiveDescendant",O.CI);O.pD=function(a,b){B.p(a);var d=O.Zl(a,b);d&&d.setAttribute("tabIndex","0");return d};v("AdfFocusUtils.setFirstActiveDescendant",O.pD);O.wEa=function(a){B.p(a);for(var b={F0:l,E0:p,RCa:l},d=O.Zl(a,b);d;)d.setAttribute("tabIndex","-1"),d=O.aJ(a,d,b);return O.pD(a)};
v("AdfFocusUtils.setupCompositeWidget",O.wEa);O.Zl=function(a,b){B.p(a);return H.UI(a,p,O.AJ,b)};v("AdfFocusUtils.getFirstFocusableDescendant",O.Zl);O.KC=function(a,b){B.p(a);return H.f0(a,p,O.AJ,b)};v("AdfFocusUtils.getLastFocusableDescendant",O.KC);O.aJ=function(a,b,d){B.p(a);B.p(b);return H.oga(b,a,l,O.AJ,d)};v("AdfFocusUtils.getNextFocusableDescendant",O.aJ);O.nR=function(a,b,d){B.p(a);B.p(b);return H.wga(b,a,O.AJ,d)};v("AdfFocusUtils.getPreviousFocusableDescendant",O.nR);
O.bCa=function(a){B.p(a);return H.UI(a,p,O.kDa)};v("AdfFocusUtils.getFirstUnmarkedTabstop",O.bCa);
O.kDa=function(a){var b=D.i;if(a==n||1!=a.nodeType)return b.xd(D.FINE)&&b.fine("isUnmarkedTabstop: Null or not element node type"),H.gk;var d=O.Saa(a);if(d)return b.xd(D.FINE)&&b.fine("isUnmarkedTabstop: Node display none: "+d+", node tree: "+a.id+" "+a.nodeName),H.gk;if(a.attributes[O.Jg])return b.xd(D.FINE)&&b.fine("isUnmarkedTabstop: Node is a marked tabstop: "+a.id+" "+a.nodeName),H.gk;if(O.cD(a))return b.xd(D.FINE)&&b.fine("isUnmarkedTabstop: Found node that is an unmarked tabstop: "+a.id+" "+
a.nodeName),H.bl;b.xd(D.FINE)&&b.fine("isUnmarkedTabstop: Node not a tabstop: "+a.id+" "+a.nodeName);return H.Ps};v("AdfFocusUtils.isUnmarkedTabstop",O.kDa);
O.AJ=function(a,b){var d=D.i;b=b==n?{F0:p,E0:p,RCa:p}:b;if(a==n||1!=a.nodeType)return d.xd(D.FINE)&&d.fine("isFocusableDescendant? Skip and reject tree: Null or not element node type"),H.gk;var e=w.b.getComputedStyle(a);if(O.Xwa(a,e)&&!Boolean(b.F0))return d.xd(D.FINE)&&d.fine("isFocusableDescendant? Skip and reject tree, Node is visibility hidden, node: "+a.id+" "+a.nodeName),H.gk;if(O.Saa(a,e)&&!Boolean(b.E0))return d.xd(D.FINE)&&d.fine("isFocusableDescendant? Skip and reject tree, Node is display none, node: "+
a.id+" "+a.nodeName),H.gk;e=a.attributes[O.Jg];if(!e)return d.xd(D.FINE)&&d.fine("isFocusableDescendant? Skip, node not focusable, node: "+a.id+" "+a.nodeName),H.Ps;if("true"==e.value)return d.xd(D.FINE)&&d.fine("isFocusableDescendant? Accept, node focusable TRUE, node: "+a.id+" "+a.nodeName),H.bl;if("false"==e.value)return d.xd(D.FINE)&&d.fine("isFocusableDescendant? Node focusable FALSE, node: "+a.id+" "+a.nodeName),Boolean(b.RCa)?H.bl:H.gk;d.xd(D.FINE)&&d.fine("isFocusableDescendant? Skip, invalid value found: "+
e.name+" "+e.value);return H.Ps};v("AdfFocusUtils.isFocusableDescendant",O.AJ);O.Jg="data-afr-fcs";v("AdfFocusUtils.DESCENDANT_FOCUSABLE",O.Jg);