function HB(a){arguments.length&&this.Init(a)}m("AdfTreeUtils",HB);r.v(HB);
HB.ga=function(){this.w_a="_afrCxtPop";this.DEa="_afrShwTop";this.pAa="_afrCpsBlw";this.uBa="_afrXpdBlw";this.wBa="_afrXpdItm";this.P5a="_afrSrtAsc";this.Q5a="_afrSrtDsc";this.qga="_afrSelId";this.p2="_afrSelPop";this.hza="_afrSelImg";m("AdfTreeUtils.SELECTOR_IMAGE_ATTR",HB.hza);this.$Ba="_afrSelRow";this.I0a=1;this.l1a=2;this.m1a=4;var a=this.Ada={},b=HB.prototype;a[this.DEa]=b.fva;a[this.wBa]=b.Rqa;a[this.P5a]=b.ova;a[this.Q5a]=b.qva;a[this.uBa]=b.Sqa;a[this.pAa]=b.vqa};
m("AdfTreeUtils.InitClass",HB.ga);HB.prototype.Init=function(a){HB.h.Init.call(this);this.nb=a};r.a("AdfTreeUtils.prototype.Init",{Init:HB.prototype.Init});HB.prototype.ova=function(a){this.nb.g3(a,!0)};r.a("AdfTreeUtils.prototype.sortAscendingAction",{ova:HB.prototype.ova});HB.prototype.qva=function(a){this.nb.g3(a,!1)};r.a("AdfTreeUtils.prototype.sortDescendingAction",{qva:HB.prototype.qva});HB.prototype.fva=function(){var a=this.nb;Nb.F(a.f(),a.mL())};
r.a("AdfTreeUtils.prototype.showAsTopAction",{fva:HB.prototype.fva});HB.prototype.Rqa=function(){var a=this.nb,b=a.f(),a=a.mL();b.ws(a)?b.Km(a,!1):b.Km(a,!0)};r.a("AdfTreeUtils.prototype.expandAction",{Rqa:HB.prototype.Rqa});HB.prototype.Sqa=function(){var a=this.nb;a.f();var b=a.mL();a.gC(b,!0)};r.a("AdfTreeUtils.prototype.expandAllBelowAction",{Sqa:HB.prototype.Sqa});HB.prototype.vqa=function(){var a=this.nb;a.f();var b=a.mL();a.gC(b,!1)};r.a("AdfTreeUtils.prototype.collapseAllBelowAction",{vqa:HB.prototype.vqa});
HB.prototype.bva=function(a,b,d,e,f){var g=this.nb.f(),h=g.g(),l=g.getContextMenuSelect();this.Waa(a,b,d,e,l,f);this.a8();a=this.tH(h,HB.w_a);return g.m(a)};r.a("AdfTreeUtils.prototype.setupDefaultRowContextMenu",{bva:HB.prototype.bva});HB.prototype.tH=function(a,b){return(a+"_"+b).replace(/:/g,"_")};r.a("AdfTreeUtils.prototype.createComponentSubId",{tH:HB.prototype.tH});HB.prototype.tqa=function(){this.zaa()&&(this.dja=null)};r.a("AdfTreeUtils.prototype.clearCachedContextMenuItems",{tqa:HB.prototype.tqa});
HB.prototype.BY=function(){if(!this.dja){var a=this.Zqa();if(a){var b=this.nb.f().g(),d={};d.expandItem=a.m(this.tH(b,HB.wBa));d.expandAllBelowItem=a.m(this.tH(b,HB.uBa));d.collapseAllBelowItem=a.m(this.tH(b,HB.pAa));d.showAsTopItem=a.m(this.tH(b,HB.DEa));this.dja=d}}return this.dja};r.a("AdfTreeUtils.prototype.findContextMenuItems",{BY:HB.prototype.BY});
HB.prototype.Waa=function(a,b,d,e,f,g){var h;if(f){f=this.nb.f().getSelectedRowKeys();var l=0;for(h in f)l++;h=l}else h=1;if(f=this.BY()){if(l=f.J8)l.setProperty("disabled",a||1<h),l.setSelected(!b);f.zY&&f.zY.setProperty("disabled",a||1<h);f.sY&&f.sY.setProperty("disabled",a||!b||1<h);f.h_&&f.h_.setProperty("disabled",g||!this.GC()||a||1<h||!e&&0==d)}};r.a("AdfTreeUtils.prototype.updateContextMenu",{Waa:HB.prototype.Waa});
HB.prototype.Zqa=function(){var a=this.nb.f(),b=a.getContextMenuId();return null!=b?a.m(b):a};r.a("AdfTreeUtils.prototype.findMenuItemContainer",{Zqa:HB.prototype.Zqa});HB.prototype.a8=function(){var a=this.nb.f();this.zaa()&&this.N$(a);if(!this.j4){var a=this.j4=this.D(this.Vfb),b=this.BY();b&&(b.h_&&b.h_.addEventListener(ab.ed,a),b.J8&&b.J8.addEventListener(ab.ed,a),b.zY&&b.zY.addEventListener(ab.ed,a),b.sY&&b.sY.addEventListener(ab.ed,a))}};
r.a("AdfTreeUtils.prototype.addContextMenuEventListeners",{a8:HB.prototype.a8});HB.prototype.N$=function(){var a=this.j4;if(a){var b=this.BY();b&&(b.h_&&b.h_.removeEventListener(ab.ed,a),b.J8&&b.J8.removeEventListener(ab.ed,a),b.zY&&b.zY.removeEventListener(ab.ed,a),b.sY&&b.sY.removeEventListener(ab.ed,a));this.j4=null}};r.a("AdfTreeUtils.prototype.removeContextMenuEventListeners",{N$:HB.prototype.N$});
HB.prototype.zaa=function(){if(void 0==this.XOa){var a=this.nb.f(),b=a.getContextMenuId();b&&(a=a.m(b),null==a&&(a=A.c.m(b)),a&&(this.XOa=!0))}return this.XOa};r.a("AdfTreeUtils.prototype.shouldResetMenuEventListeners",{zaa:HB.prototype.zaa});HB.prototype.Vfb=function(a){var b=a.getSource().g(),d=HB.Ada,e;for(e in d)if(0<=b.indexOf(e)){d[e].call(this,a);a.cancel();break}};HB.prototype.SP=function(){return this.i7};r.a("AdfTreeUtils.prototype.isSelectorPopupVisible",{SP:HB.prototype.SP});
HB.prototype.W9=function(){var a=this.nb.f();this.i7&&a.m(HB.p2).Tb()};r.a("AdfTreeUtils.prototype.hideSelectorPopup",{W9:HB.prototype.W9});HB.prototype.Gaa=function(){if(!this.i7){var a=this.nb,b=a.f(),d=b.g(),b=b.m(HB.p2);this.h7||(this.h7=this.D(this.Egb),b.addEventListener(Xb.Hl,this.h7));var e={};e[AdfRichPopup.Ed]=AdfRichPopup.dD;d=I.j(d,HB.qga);e[AdfRichPopup.Jf]=d;A.c.Kc(a.f());this.i7=!0;b.show(e)}};r.a("AdfTreeUtils.prototype.showSelectorPopup",{Gaa:HB.prototype.Gaa});
HB.prototype.Egb=function(a){a=a.getSource();this.i7=!1;a.removeEventListener(Xb.Hl,this.h7);this.h7=null};HB.prototype.psa=function(a,b,d){for(var e=q.b,f=null,g=this.nb.i();!f&&a&&a!=g.parent&&1==a.nodeType;)e.getAttribute(a,b)==d?f=a:a=a.parentNode;return f};r.a("AdfTreeUtils.prototype.getParentWithAttribute",{psa:HB.prototype.psa});
HB.prototype.wra=function(a,b,d,e){u.u(b);a=b;b=q.oa();if(null==a||1!=a.nodeType)return null;for(var f=b.getAttribute(a,e);null==f;){if(null==a||a==d)return null;a=a.parentNode;if(null==a||1!=a.nodeType)return null;f=b.getAttribute(a,e)}return f};r.a("AdfTreeUtils.prototype.getCurrencyFromDomElement",{wra:HB.prototype.wra});
HB.prototype.$qa=function(a){var b=[],d=q.b;a=a.getElementsByTagName("TABLE");0<a.length&&(a=a[0].rows[0].cells,a=a[a.length-1].firstChild)&&(d=d.getAttribute(a,HB.$Ba))&&(b[0]=d,b[1]=a);return b};r.a("AdfTreeUtils.prototype.findSelectorItemAndRowKey",{$qa:HB.prototype.$qa});
HB.prototype.zsa=function(){var a=null,b=this.nb.f().g()+":"+HB.p2,b=I.j(b,"db");if(b=q.b.getElementById(b))for(var b=b.childNodes,d=b.length,e=0;e<d;e++){var f=b[e];if(0<=f.className.indexOf(yB.Nf)&&(f=this.$qa(f),0<f.length)){a=f[0];break}}return a};r.a("AdfTreeUtils.prototype.getSelectorSelectedRowKey",{zsa:HB.prototype.zsa});
HB.prototype.W$=function(a){var b=this.nb.f().g()+":"+HB.p2,b=I.j(b,"db");if(b=q.b.getElementById(b))for(var d=b.childNodes,e=d.length,f=0;f<e;f++)if(b=d[f],0<=b.className.indexOf(yB.Nf))if(a){if(f<e-1){a=d[f+1];C.O(b,S.Nf);C.w(a,S.Nf);(a=a.getElementsByTagName("A"))&&a[0].focus();break}}else if(0<f){a=d[f-1];C.O(b,S.Nf);C.w(a,S.Nf);(a=a.getElementsByTagName("A"))&&a[0].focus();break}};r.a("AdfTreeUtils.prototype.selectSelectorPopupItem",{W$:HB.prototype.W$});
HB.prototype.ysa=function(a,b){var d=this.nb,e=q.b;"A"==b.tagName&&e.getAttribute(b,"_afrSelRw")&&(b=b.firstChild);return this.wra(a,b,d.i(),HB.$Ba)};r.a("AdfTreeUtils.prototype.getSelectorItemRowKey",{ysa:HB.prototype.ysa});HB.prototype.Ly=function(){return this.nb.f().K(yB.sda)&HB.l1a};r.a("AdfTreeUtils.prototype.isMultiRoot",{Ly:HB.prototype.Ly});HB.prototype.GC=function(){return this.nb.f().K(yB.sda)&HB.I0a};r.a("AdfTreeUtils.prototype.hasPathStamp",{GC:HB.prototype.GC});
HB.prototype.VSa=function(){var a=this.nb.f().g(),a=I.j(a,HB.qga);return document.getElementById(a)};r.a("AdfTreeUtils.prototype.getSelectorIcon",{VSa:HB.prototype.VSa});HB.prototype.aI=function(){return this.nb.f().K(yB.sda)&HB.m1a};r.a("AdfTreeUtils.prototype.isSelectorIconVisible",{aI:HB.prototype.aI});
HB.prototype.Fua=function(a,b){var d=this.nb,e=d.lJ();if(e&&1!=d.PLa){var d=e.o(),f=E.OZ(b,a),g=E.OZ(a,b),h=e.getDisclosedRowKeys(),l={};E.Rb(l,h);for(var n in f)delete l[n];for(n in g)l[n]=!0;try{d.PLa=!0;e.setDisclosedRowKeys(l);var t=gc.dC(e,fc.Tz,b,a);t&&t.F()}finally{d.PLa=!1}}};r.a("AdfTreeUtils.prototype.setAssociatedDisclosedRowKeys",{Fua:HB.prototype.Fua});