function Dz(a){arguments.length&&this.Init(a)}v("AdfTreeUtils",Dz);z.l(Dz);
Dz.da=function(){this.gJa="_afrCxtPop";this.Lqa="_afrShwTop";this.fna="_afrCpsBlw";this.$na="_afrXpdBlw";this.boa="_afrXpdItm";this.sOa="_afrSrtAsc";this.tOa="_afrSrtDsc";this.h7a="_afrSrt";this.p7="_afrSelId";this.bV="_afrSelPop";this.gma="_afrSelImg";v("AdfTreeUtils.SELECTOR_IMAGE_ATTR",Dz.gma);this.Eoa="_afrSelRow";this.lKa=1;this.MKa=2;this.NKa=4;var a=this.O4={},b=Dz.prototype;a[this.Lqa]=b.Lia;a[this.boa]=b.jfa;a[this.sOa]=b.Tia;a[this.tOa]=b.Via;a[this.$na]=b.kfa;a[this.fna]=b.Pea};
v("AdfTreeUtils.InitClass",Dz.da);Dz.prototype.Init=function(a){Dz.f.Init.call(this);this.mb=a};z.a("AdfTreeUtils.prototype.Init",{Init:Dz.prototype.Init});Dz.prototype.Tia=function(a){this.mb.IV(a,l)};z.a("AdfTreeUtils.prototype.sortAscendingAction",{Tia:Dz.prototype.Tia});Dz.prototype.Via=function(a){this.mb.IV(a,p)};z.a("AdfTreeUtils.prototype.sortDescendingAction",{Via:Dz.prototype.Via});Dz.prototype.Lia=function(){var a=this.mb;Gb.v(a.d(),a.LF())};
z.a("AdfTreeUtils.prototype.showAsTopAction",{Lia:Dz.prototype.Lia});Dz.prototype.jfa=function(){var a=this.mb,b=a.d(),a=a.LF();b.Np(a)?b.Wk(a,p):b.Wk(a,l)};z.a("AdfTreeUtils.prototype.expandAction",{jfa:Dz.prototype.jfa});Dz.prototype.kfa=function(){var a=this.mb;a.d();var b=a.LF();a.ay(b,l)};z.a("AdfTreeUtils.prototype.expandAllBelowAction",{kfa:Dz.prototype.kfa});Dz.prototype.Pea=function(){var a=this.mb;a.d();var b=a.LF();a.ay(b,p)};z.a("AdfTreeUtils.prototype.collapseAllBelowAction",{Pea:Dz.prototype.Pea});
Dz.prototype.Iia=function(a,b,d,e,f){var g=this.mb.d(),h=g.e(),m=g.getContextMenuSelect();this.v2(a,b,d,e,m,f);this.f_();a=this.wC(h,Dz.gJa);return g.j(a)};z.a("AdfTreeUtils.prototype.setupDefaultRowContextMenu",{Iia:Dz.prototype.Iia});Dz.prototype.wC=function(a,b){return(a+"_"+b).replace(/:/g,"_")};z.a("AdfTreeUtils.prototype.createComponentSubId",{wC:Dz.prototype.wC});Dz.prototype.Nea=function(){this.W1()&&(this.B9=n)};z.a("AdfTreeUtils.prototype.clearCachedContextMenuItems",{Nea:Dz.prototype.Nea});
Dz.prototype.SQ=function(){if(!this.B9){var a=this.qfa();if(a){var b=this.mb.d().e(),d={};d.expandItem=a.j(this.wC(b,Dz.boa));d.expandAllBelowItem=a.j(this.wC(b,Dz.$na));d.collapseAllBelowItem=a.j(this.wC(b,Dz.fna));d.showAsTopItem=a.j(this.wC(b,Dz.Lqa));this.B9=d}}return this.B9};z.a("AdfTreeUtils.prototype.findContextMenuItems",{SQ:Dz.prototype.SQ});
Dz.prototype.v2=function(a,b,d,e,f,g){var h;if(f){f=this.mb.d().getSelectedRowKeys();var m=0;for(h in f)m++;h=m}else h=1;if(f=this.SQ()){if(m=f.I_)m.setProperty("disabled",a||1<h),m.setSelected(!b);f.QQ&&f.QQ.setProperty("disabled",a||1<h);f.LQ&&f.LQ.setProperty("disabled",a||!b||1<h);f.oS&&f.oS.setProperty("disabled",g||!this.Ay()||a||1<h||!e&&0==d)}};z.a("AdfTreeUtils.prototype.updateContextMenu",{v2:Dz.prototype.v2});
Dz.prototype.qfa=function(){var a=this.mb.d(),b=a.getContextMenuId();return b!=n?a.j(b):a};z.a("AdfTreeUtils.prototype.findMenuItemContainer",{qfa:Dz.prototype.qfa});Dz.prototype.f_=function(){var a=this.mb.d();this.W1()&&this.l1(a);if(!this.EW){var a=this.EW=this.o(this.rWa),b=this.SQ();b&&(b.oS&&b.oS.addEventListener(bb.Lc,a),b.I_&&b.I_.addEventListener(bb.Lc,a),b.QQ&&b.QQ.addEventListener(bb.Lc,a),b.LQ&&b.LQ.addEventListener(bb.Lc,a))}};
z.a("AdfTreeUtils.prototype.addContextMenuEventListeners",{f_:Dz.prototype.f_});Dz.prototype.l1=function(){var a=this.EW;if(a){var b=this.SQ();b&&(b.oS&&b.oS.removeEventListener(bb.Lc,a),b.I_&&b.I_.removeEventListener(bb.Lc,a),b.QQ&&b.QQ.removeEventListener(bb.Lc,a),b.LQ&&b.LQ.removeEventListener(bb.Lc,a));this.EW=n}};z.a("AdfTreeUtils.prototype.removeContextMenuEventListeners",{l1:Dz.prototype.l1});
Dz.prototype.W1=function(){if(this.hza==k){var a=this.mb.d(),b=a.getContextMenuId();b&&(a=a.j(b),a==n&&(a=F.c.j(b)),a&&(this.hza=l))}return this.hza};z.a("AdfTreeUtils.prototype.shouldResetMenuEventListeners",{W1:Dz.prototype.W1});Dz.prototype.rWa=function(a){var b=a.getSource().e(),d=Dz.O4,e;for(e in d)if(0<=b.indexOf(e)){d[e].call(this,a);a.cancel();break}};Dz.prototype.IJ=r("qZ");z.a("AdfTreeUtils.prototype.isSelectorPopupVisible",{IJ:Dz.prototype.IJ});
Dz.prototype.D0=function(){var a=this.mb.d();this.qZ&&(a=a.j(Dz.bV),this.W8a=p,a.rb())};z.a("AdfTreeUtils.prototype.hideSelectorPopup",{D0:Dz.prototype.D0});Dz.prototype.d2=function(){if(!this.qZ){var a=this.mb,b=a.d(),d=b.e(),b=b.j(Dz.bV);this.pZ||(this.pZ=this.o(this.ZWa),b.addEventListener(Rb.qo,this.pZ));var e={};e[AdfRichPopup.fd]=AdfRichPopup.DD;d=M.g(d,Dz.p7);e[AdfRichPopup.pf]=d;F.c.jc(a.d());this.qZ=l;b.show(e)}};z.a("AdfTreeUtils.prototype.showSelectorPopup",{d2:Dz.prototype.d2});
Dz.prototype.ZWa=function(a){a=a.getSource();this.qZ=p;a.removeEventListener(Rb.qo,this.pZ);this.pZ=n};Dz.prototype.sga=function(a,b,d){for(var e=w.b,f=n,g=this.mb.h();!f&&a&&a!=g.parent&&1==a.nodeType;)e.getAttribute(a,b)==d?f=a:a=a.parentNode;return f};z.a("AdfTreeUtils.prototype.getParentWithAttribute",{sga:Dz.prototype.sga});
Dz.prototype.Ifa=function(a,b,d,e){B.p(b);a=b;b=w.fa();if(a==n||1!=a.nodeType)return n;for(var f=b.getAttribute(a,e);f==n;){if(a==n||a==d)return n;a=a.parentNode;if(a==n||1!=a.nodeType)return n;f=b.getAttribute(a,e)}return f};z.a("AdfTreeUtils.prototype.getCurrencyFromDomElement",{Ifa:Dz.prototype.Ifa});Dz.prototype.rfa=function(a){var b=[],d=w.b;a=a.getElementsByTagName("TABLE");if(0<a.length&&(a=a[0].rows[0].cells,a=a[a.length-1].firstChild))if(d=d.getAttribute(a,Dz.Eoa))b[0]=d,b[1]=a;return b};
z.a("AdfTreeUtils.prototype.findSelectorItemAndRowKey",{rfa:Dz.prototype.rfa});Dz.prototype.Aga=function(){var a=n,b=this.mb.d().e()+":"+Dz.bV,b=M.g(b,"db");if(b=w.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(uz.Xe)&&(f=this.rfa(f),0<f.length)){a=f[0];break}}return a};z.a("AdfTreeUtils.prototype.getSelectorSelectedRowKey",{Aga:Dz.prototype.Aga});
Dz.prototype.u1=function(a){var b=this.mb.d().e()+":"+Dz.bV,b=M.g(b,"db");if(b=w.b.getElementById(b))for(var d=b.childNodes,e=d.length,f=0;f<e;f++)if(b=d[f],0<=b.className.indexOf(uz.Xe))if(a){if(f<e-1){a=d[f+1];H.F(b,V.Xe);H.n(a,V.Xe);(a=a.getElementsByTagName("A"))&&a[0].focus();break}}else if(0<f){a=d[f-1];H.F(b,V.Xe);H.n(a,V.Xe);(a=a.getElementsByTagName("A"))&&a[0].focus();break}};z.a("AdfTreeUtils.prototype.selectSelectorPopupItem",{u1:Dz.prototype.u1});
Dz.prototype.zga=function(a,b){var d=this.mb,e=w.b;"A"==b.tagName&&e.getAttribute(b,"_afrSelRw")&&(b=b.firstChild);return this.Ifa(a,b,d.h(),Dz.Eoa)};z.a("AdfTreeUtils.prototype.getSelectorItemRowKey",{zga:Dz.prototype.zga});Dz.prototype.av=function(){return this.mb.d().r(uz.I4)&Dz.MKa};z.a("AdfTreeUtils.prototype.isMultiRoot",{av:Dz.prototype.av});Dz.prototype.Ay=function(){return this.mb.d().r(uz.I4)&Dz.lKa};z.a("AdfTreeUtils.prototype.hasPathStamp",{Ay:Dz.prototype.Ay});
Dz.prototype.ACa=function(){var a=this.mb.d().e(),a=M.g(a,Dz.p7);return document.getElementById(a)};z.a("AdfTreeUtils.prototype.getSelectorIcon",{ACa:Dz.prototype.ACa});Dz.prototype.aD=function(){return this.mb.d().r(uz.I4)&Dz.NKa};z.a("AdfTreeUtils.prototype.isSelectorIconVisible",{aD:Dz.prototype.aD});
Dz.prototype.kia=function(a,b){var d=this.mb,e=d.$D();if(e&&l!=d.wwa){var d=e.k(),f=ya.TR(b,a),g=ya.TR(a,b),h=e.getDisclosedRowKeys(),m={};ya.qb(m,h);for(var q in f)delete m[q];for(q in g)m[q]=l;try{d.wwa=l;e.setDisclosedRowKeys(m);var s=dc.Xx(e,cc.cw,b,a);s&&s.v()}finally{d.wwa=p}}};z.a("AdfTreeUtils.prototype.setAssociatedDisclosedRowKeys",{kia:Dz.prototype.kia});