var Z=I.ea(tu,"AdfDhtmlQueryPeer",!1);m("AdfDhtmlQueryPeer",Z);Z.FE=I.uH(Ft,"InnerQueryShowDetailPeer","_afrDscl");InnerQueryShowDetailPeer.C=function(){Tq.Vs(this,{l_:"af|query::disclosed-icon-style",r_:"af|query::undisclosed-icon-style"})};InnerQueryShowDetailPeer.prototype.Oh=function(a){return InnerQueryShowDetailPeer.h.Oh.call(this,a)?this.Ri.qn(a):!1};InnerQueryShowDetailPeer.prototype.Hz=function(){return this.f().K("headerText")};
Z.prototype.Init=function(a){Z.h.Init.call(this,a);Gv(a)||(this.wg=new Z.FE(a,this))};r.a("AdfDhtmlQueryPeer.prototype.Init",{Init:Z.prototype.Init});Z.prototype.Qa=function(a){Z.h.Qa.call(this,a);this.wg&&this.wg.Qa(a)};r.a("AdfDhtmlQueryPeer.prototype.initialize",{Qa:Z.prototype.Qa});
Z.C=function(){I.ra(this,Za.ua,D.wb,ab.ed,lc.Bt,D.Ad,D.Bc,D.hh,Jb.ua,$b.XJ);I.sb(this,"disclosed");this.yz="content";this.xAa="conj";this.gDa="oper";this.C2a="mode";this.W4a="reset";this.i5a="save";this.o5a="search";this.z2="saveSrch";this.wS="val";this.wXa="fldsM";this.vXa="adFldGrpMenu";this.xXa="fldItem";this.uXa="adFldGrpAddAllItem";this.ega="PSSPop";this.Ow="PSSD";this.SK="PSS_Srchs";this.bga="PSS_name";this.GDa="PSS_autoEx";this.dga="PSS_SiL";this.cga="PSS_def";this.Oza="apply";this.OAa="delete";
this.DAa="crtn";this.Z_a="duplicate";this.aga="dlgPSS";this.NEa="dlgSS";this.TDa="reorder";this.UDa="REDlg";this.S4a="RETree";this.RDa="move-top";this.SDa="move-up";this.QDa="move-down";this.PDa="move-bottom";this.O4a="TOP";this.P4a="UP";this.N4a="DOWN";this.M4a="BOTTOM";this.QAa="DWPop";this.PAa="DWD";this.A_a="DWDMsg";this.U2a="af_query.MSG_SAVED_SEARCH_DELETE_WARNING";this.lDa="OWPop";this.kDa="OWD";this.M3a="OWDMsg";this.W2a="af_query.MSG_SAVED_SEARCH_OVERRIDE_WARNING";this.jDa="OEPop";this.iDa=
"OED";this.L3a="OEDMsg";this.V2a="af_query.MSG_SAVED_SEARCH_OVERRIDE_ERROR";this.HAa="SSPop";this.uE="SSD";this.q1="SS_name";this.h_a="SS_SL";this.FAa="SS_autoEx";this.GAa="SS_def";this.e4a="pzSSearch_key";this.zEa="SEPARATOR";this.Ae=":";this.g1a="_afrIndexed";this.I7a="autoExecute";this.J7a="default";this.K7a="name";this.L7a="showInList";this.HDa="_afrPSSVisibleStatus";this.df="_busy";var a=A.c.H();this.MPa=parseInt(a.qa("af|query-tr-visible-items"));"undefined"!=typeof a.qa("af|query-tr-button-type")&&
(this.Ep="old"!=a.qa("af|query-tr-button-type"));this.TQa="old"!=a.qa("af|dialog-tr-button-type")};m("AdfDhtmlQueryPeer.InitSubclass",Z.C);Z.prototype.Co=function(a,b,d,e){return this.bB()?this.wg.Co(a,b,d,e):!1};r.a("AdfDhtmlQueryPeer.prototype.ComponentDisclosedChanged",{Co:Z.prototype.Co});Z.prototype.bB=function(){return this.i().childNodes[1]};Z.prototype.G=function(a,b){Z.h.G.call(this,a,b);return A.c.ta(this,this.mmb,a,0,{isSynchronized:!0})};
r.a("AdfDhtmlQueryPeer.prototype.InitDomElement",{G:Z.prototype.G});Z.prototype.vd=function(a){var b=this.f();b&&b.setProperty(Z.df,a,!1,G.ud)};r.a("AdfDhtmlQueryPeer.prototype.SetBusy",{vd:Z.prototype.vd});Z.prototype.Sa=function(a,b,d,e){Gv(this.f())||Z.h.Sa.call(this,a,b,d,e)};r.a("AdfDhtmlQueryPeer.prototype.ResizeNotify",{Sa:Z.prototype.Sa});Z.prototype.qn=function(a){var b=this.bB();return b?(b.style.display=a?"":"none",!0):!1};
r.a("AdfDhtmlQueryPeer.prototype.__handleClientSideDisclosure",{qn:Z.prototype.qn});Z.prototype.Ak=function(a){this.wg.Ak(a)};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentDisclosure",{Ak:Z.prototype.Ak});Z.prototype.M=function(a){var b=this.f().K(Z.df);a.Aa()||!a.ec()||b||Hv(this,a);this.wg&&this.wg.M(a)};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentClick",{M:Z.prototype.M});
Z.prototype.za=function(a){if(a.na()==w.gd){var b=Hv(this,a);if(!b){var d=Iv(this,a);d&&(this.f().g(),nh.F(this.f(),nh.Hca,d,!0),b=!0)}if(b){a.cancel();return}}if(b=this.eG(a))b=q.oa(),d=a.U(),b=b.ca(d),b=!(Jv(this,b,Z.z2)||Jv(this,b,Z.SK)||Kv(this,b,Z.gDa));b&&this.yJa==a.X()&&(this.t_()&&this.bX(this.f()),a.cancel());this.wg&&this.wg.za(a);this.yJa=null};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyUp",{za:Z.prototype.za});
Z.prototype.ma=function(a){this.i().setAttribute("tabindex",-1);this.eG(a)&&(this.yJa=a.X(),a.wc(),q.b.stopPropagation(a.U()))};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyDown",{ma:Z.prototype.ma});Z.prototype.Yb=function(a){this.eG(a)&&a.cancel()};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyPress",{Yb:Z.prototype.Yb});Z.prototype.Jo=function(a){a=a.getSource();var b=this.f().g();a.g()==I.j(b,Z.ega)&&(a=Lv(b,!0),this.f().setProperty(Z.HDa,a.g(),!0,G.ld))};
r.a("AdfDhtmlQueryPeer.prototype.HandleComponentPopupOpening",{Jo:Z.prototype.Jo});function Mv(a,b){var d=I.j(b,Z.dga),d=A.c.m(d).getValue(),e=I.j(b,Z.cga);return A.c.m(e).getValue()&&!d?(Nv(a,"af_query.LABEL_PERSONALIZE_SAVED_SEARCHES_SHOWINLIST","af_query.LABEL_PERSONALIZE_SAVED_SEARCHES_SHOWINLIST_DETAIL"),!0):!1}
Z.prototype.dg=function(a){var b=this.f(),d=b.g(),e=I.j(d,Z.Oza),f=I.j(d,Z.OAa),g=I.j(d,Z.TDa),h=d+Z.Ae+Z.SDa,l=d+Z.Ae+Z.RDa,n=d+Z.Ae+Z.QDa,t=d+Z.Ae+Z.PDa,y=d+Z.Ae+Z.xXa,z=d+Z.Ae+Z.uXa,B=a.getSource().g(),F=A.c.m(B);if(B==e)Ov(b,!0)?(B=A.c.m(d+Z.Ae+Z.aga),Mv(B,d)?a.cancel():Pv(b,!0)&&(value=Qv(b,Z.Ow),nh.F(b,nh.CR,value,!0))):a.cancel();else if(B==g||B==h||B==l||B==n||B==t)a.cancel();else if(B==f)a.cancel();else if(-1!=B.indexOf(y)||-1!=B.indexOf(z))d={},d.Mwb=B,d.Ewb=F.K("selectedText"),bc.F(b,bc.Aya,
d,!0),a.wc(),a.cancel()};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentAction",{dg:Z.prototype.dg});
Z.prototype.eg=function(a){var b=this.f(),d=b.g(),e,f,g=I.j(d,Z.PAa),h=I.j(d,Z.kDa),l=I.j(d,Z.iDa),n=a.getSource().g();Z.TQa?(f=d+Z.Ae+Z.aga,e=d+Z.Ae+Z.NEa):(e=I.j(d,Z.uE),f=I.j(d,Z.Ow));f=n==f;e=n==e;g=n==g;h=n==h;l=n==l;if(e||f){g=!0;if(a.ll()==Za.Zm)if(g=Ov(b,f))if(l=Qv(b,f?Z.Ow:Z.uE),e)bc.F(b,bc.Bya,l,!0);else{if(Mv(b,d)){a.cancel();return}(selectedSearch=Pv(b,!0))?bc.F(b,bc.CR,l,!0):nh.F(b,nh.Mo,!0,!0)}else{if(e){b=Rv(b);d=!1;f=Z.Esa();b=xa.trim(b.toLowerCase());for(g=0;g<f.length;g++)if(xa.trim(f[g].toLowerCase())==
b){d=!0;break}d?Sv(this,!1,!1):Sv(this,!1,!0);a.cancel();return}}else nh.F(b,nh.Mo,f,!0);a.cancel();g&&this.i0(d,f)}else if(g||h||l)n=!1,(n=a.ll()==Za.w0)&&!l&&(e=g?bc.nt:bc.Fya,(l=Qv(b,g?Z.Ow:Z.uE))?bc.F(b,e,l,!0):(b=I.j(d,Z.SK),b=A.c.m(b),Nv(b,"af_query.MSG_SAVED_SEARCH_DELDUP_CONSTRAINT","af_query.MSG_SAVED_SEARCH_DELETE_CONSTRAINT_DETAIL"))),a.cancel(),(a=Tv(this,g,h))&&a.Tb(),h&&n&&this.i0(d,f);else if(n==d+Z.Ae+Z.Ae+Z.UDa||n==d+Z.Ae+Z.UDa)a.ll()==Za.Zm?(bc.F(b,bc.Iya,null,!0),a.cancel(),(popupComp=
a.getSource().getParent())&&popupComp.Tb()):a.ll()==Za.No&&nh.F(b,nh.Gya,null,!0)};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentDialog",{eg:Z.prototype.eg});Z.prototype.El=function(a){var b=a.getSource().g();if(b){var d=A.c.m(b),e=this.f(),f=e.g(),g=I.j(f,Z.z2),f=I.j(f,Z.SK);b==g?(b=d.getValue())&&""!=b?b==Z.e4a?nh.F(e,nh.Ica,!0,!0):b!=Z.zEa&&bc.F(e,bc.AR,b,!0):a.cancel():b==f&&((b=d.getValue())&&b!=Z.zEa?nh.F(e,nh.AR,b,!0):a.cancel())}};
r.a("AdfDhtmlQueryPeer.prototype.HandleComponentValueChange",{El:Z.prototype.El});Z.prototype.i0=function(a,b){var d=Lv(a,b);d&&(b&&this.f().setProperty(Z.HDa,null,!0,G.ld),d.Tb())};r.a("AdfDhtmlQueryPeer.prototype.HidePopupDialog",{i0:Z.prototype.i0});
Z.prototype.ob=function(a,b){Z.h.ob.call(this,a,b);var d=a.g(),e=I.j(d,Z.HAa),f=I.j(d,Z.ega),g=I.j(d,Z.QAa),h=I.j(d,Z.lDa),l=I.j(d,Z.jDa),e=q.b.getElementById(e),f=q.b.getElementById(f),g=q.b.getElementById(g),h=q.b.getElementById(h),l=q.b.getElementById(l),n,t,y=I.j(d,Z.PAa),z=I.j(d,Z.kDa),B=I.j(d,Z.iDa);Z.TQa?(t=d+Z.Ae+Z.aga,n=d+Z.Ae+Z.NEa):(n=I.j(d,Z.uE),t=I.j(d,Z.Ow));b.id==n?e.appendChild(b):b.id==t?f.appendChild(b):b.id==y?g.appendChild(b):b.id==z?h.appendChild(b):b.id==B&&l.appendChild(b)};
r.a("AdfDhtmlQueryPeer.prototype.PopupClosed",{ob:Z.prototype.ob});Z.pqb=function(){return Z.dTa().concat(Z.Esa())};m("AdfDhtmlQueryPeer.getSavedSearchNames",Z.pqb);Z.dsb=function(a){this.bdb=a};m("AdfDhtmlQueryPeer.setUserSavedSearchNames",Z.dsb);Z.dTa=function(){var a=this.bdb;return a?a:[]};m("AdfDhtmlQueryPeer.getUserSavedSearchNames",Z.dTa);Z.csb=function(a){this.adb=a};m("AdfDhtmlQueryPeer.setSystemSavedSearchNames",Z.csb);Z.Esa=function(){var a=this.adb;return a?a:[]};
m("AdfDhtmlQueryPeer.getSystemSavedSearchNames",Z.Esa);function Gv(a){u.assert(null!=a,"AdfDhtmlQueryPeer.prototype._isHeaderless, component cannot be null!");a=a.getDisplayMode();return"simple"==a||"design"==a}
function Qv(a,b){var d=null,e=null,f=null,g=null,h=null,l=a.g();b==Z.uE?(d=I.j(I.j(l,Z.q1),Z.yz),e=I.j(I.j(l,Z.FAa),Z.yz),f=I.j(I.j(l,Z.GAa),Z.yz),h=Pv(a,!1)):b==Z.Ow&&(d=I.j(I.j(l,Z.bga),Z.yz),e=I.j(I.j(l,Z.GDa),Z.yz),g=I.j(I.j(l,Z.dga),Z.yz),f=I.j(I.j(l,Z.cga),Z.yz),h=Pv(a,!0));l={};h&&(l.selectedSearch=h);if(d=q.b.getElementById(d))l[Z.K7a]=d.value;e=q.b.getElementById(e);l[Z.I7a]=e?e.checked:!0;f=q.b.getElementById(f);l[Z.J7a]=f?f.checked:!1;g&&(g=q.b.getElementById(g),l[Z.L7a]=g?g.checked:!1);
return l}function Lv(a,b){var d=null,d=null,d=b?Z.ega:Z.HAa,d=I.j(a,d);return d=A.c.m(d)}function Tv(a,b,d){a=a.f().g();b=I.j(a,b?Z.QAa:d?Z.lDa:Z.jDa);return A.c.m(b)}function Uv(a,b){var d=a.f().g();return Z.Ep?d+":_"+b:I.j(d,b)}
function Hv(a,b){var d=a.f(),e=d.g(),f=Uv(a,Z.C2a),g=Uv(a,Z.o5a),h=Uv(a,Z.W4a),l=Uv(a,Z.i5a),n=e+Z.Ae+Z.TDa,e=q.oa(),t=b.U(),t=e.ca(t),e=!1,y=null;if(Z.Ep){var z=I.Cf(t);z instanceof AdfRichButton&&(y=z.g(),1==z.getDisabled()&&(e=!0))}else y=t.id,1==t.disabled&&(e=!0);if(!e)if(y==g&&a.t_())a.bX(d),e=!0;else if(y==f)(new bc(d,bc.Eya,null)).F(!0);else if(y==h){if(f=d.Cd())for(g=A.c.pm(),h=0;h<f.length;h++)l=f[h],(n=l.g())&&0<=n.indexOf(Z.wS)&&g[n]&&l.setValue();bc.F(d,bc.Jya,!1,!0)}else if(y==l)nh.F(d,
nh.Ica,!1,!0);else if(Kv(a,t,Z.xAa))g=d.g()+Z.Ae+Z.xAa,(f=A.c.m(g))?(g=q.b.getElementById(g),h=f.o(),f.setProperty("value",g.value),h.M(b),(l=f.getValue())&&h.Ba(f,g,l),nh.F(d,nh.Lya,l,!0)):b.cancel();else if(y==n)nh.F(d,nh.Hya,null,!0);else if(d=a.f(),f=d.g(),g=I.j(f,Z.OAa),h=I.j(f,Z.Z_a),l=I.j(f,Z.Oza),n=b.getSource().g(),n==g)Sv(a,!0,!1);else if(n==h)(g=Qv(d,Z.Ow))?bc.F(d,bc.Cya,g,!0):(d=I.j(f,Z.SK),d=A.c.m(d),Nv(d,"af_query.MSG_SAVED_SEARCH_DELDUP_CONSTRAINT","af_query.MSG_SAVED_SEARCH_DUPLICATE_CONSTRAINT_DETAIL"),
b.cancel());else if(n==l)b.cancel();else if(Vv(a,b,Z.Ow,n))Wv(b,n);else if(Vv(a,b,Z.uE,n))Wv(b,n);else if(d=Iv(a,b))a.f().g(),nh.F(a.f(),nh.Hca,d,!0);e&&(b.cancel(),b.wc());return e}function Sv(a,b,d){var e=a.f(),f=e.g(),g=I.j(f,b?Z.A_a:d?Z.M3a:Z.L3a);if(g=A.c.m(g))e=b?Pv(e,!0):Rv(e),e=A.c.H().Z(b?Z.U2a:d?Z.W2a:Z.V2a,e),g.setValue(e);a=Tv(a,b,d);b=I.j(f,b?Z.bga:Z.q1);a.show({align:AdfRichPopup.qf,alignId:b})}
function Rv(a){a=a.g();u.dc(!1);var b=null,b=I.j(a,Z.q1);return(a=A.c.m(b))?a.getValue():null}function Pv(a,b){var d=a.g(),e=null,e=b?I.j(d,Z.SK):I.j(d,Z.z2);return(d=A.c.m(e))?d.getValue():null}function Wv(a,b){var d=A.c.m(b),e=q.b.getElementById(b);if(d){var f=d.o();f.M(a);var g=d.getValue();g&&f.Ba(d,e,g)}}function Iv(a,b){var d=q.oa(),e=b.U(),d=d.ca(e);return Kv(a,d,Z.RDa)?Z.O4a:Kv(a,d,Z.SDa)?Z.P4a:Kv(a,d,Z.QDa)?Z.N4a:Kv(a,d,Z.PDa)?Z.M4a:!1}
function Vv(a,b,d,e){b=b.getSource().K("readOnly");if("true"==b||1==b)return!1;a=a.f().g();return d==Z.Ow?(d=I.j(a,Z.GDa),b=I.j(a,Z.cga),a=I.j(a,Z.dga),e==d||e==b||e==a):d==Z.uE?(d=I.j(a,Z.FAa),b=I.j(a,Z.GAa),a=I.j(a,Z.h_a),e==d||e==b||e==a):!1}function Jv(a,b,d){a=a.f().g();d=I.j(a,d);b=b.id;return b==d||0<=b.indexOf(d)?!0:!1}function Kv(a,b,d){a=a.f().g()+Z.Ae+d;return b&&0<=b.id.indexOf(a)?!0:b.parentNode&&b.parentNode.id&&0<=b.parentNode.id.indexOf(a)?!0:!1}
function Ov(a,b){var d=!0,e=a.g(),f=I.j(e,b?Z.bga:Z.q1);if(f=A.c.m(f)){if(f.getDisabled())return!0;var g=f.getValue();if(f.Pb(g))return Nv(f,"af_query.MSG_SAVED_SEARCH_NAME_NOTNULL_CONSTRAINT","af_query.MSG_SAVED_SEARCH_NAME_NOTNULL_CONSTRAINT_DETAIL"),!1;if(b){var h=Pv(a,b);if(g==h)return!0}e=I.j(e,b?Z.SK:Z.z2);e=A.c.m(e).zy();g=xa.trim(g.toLowerCase());for(h=0;h<e.length;h++)if(xa.trim(e[h].getValue().toLowerCase())==g&&!e[h].cq()){d=!1;b&&Nv(f,"af_query.MSG_SAVED_SEARCH_NAME_UNIQUE_CONSTRAINT",
"af_query.MSG_SAVED_SEARCH_NAME_UNIQUE_CONSTRAINT_DETAIL");break}}return d}function Nv(a,b,d,e){u.J(b);u.ae(d);e?(b=TrMessageFactory.getString(b),d=TrMessageFactory.getString(d)):(e=A.c.H(),b=e.Z(b),d=e.Z(d));d=new Ba(Ba.hg,b,d);b=A.c;a?(e=a.g(),b.Oe(e),b.bo(e,d),a.focus()):b.bo(null,d)}Z.prototype.eG=function(a){return a.Aa()||a.na()!=w.jb||null==So.vT(a,!1)?!1:!0};
Z.prototype.t_=function(){var a=this.f(),b=a.Cd();if(b){for(var d=!0,e=[],f=0,g=!0,h=!0,l=!0,n=0;n<b.length;n++){var t=b[n],y=t.getId(),z=I.Fb(t);y&&0<=y.indexOf(Z.wS)&&z&&C.Iy(z)&&(0==t.getValid()&&(g=!1),t.getShowRequired&&t.getShowRequired()&&g&&(z=t.getValue(),z&&""!=z||0===z||(Nv(t,"org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED","org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED_detail",!0),h=!1)),y=y.substring(Z.wS.length,y.length-1))&&(y=a.g()+Z.Ae+Z.DAa+y,(y=q.oa().getElementById(y))&&
y.getAttribute(Z.g1a)&&(z=t.getValue(),e[f++]=t,d=z&&""!=z||0===z?!1:d&&!0))}if(d&&0<f){for(a=0;a<f;a++)Nv(e[a],"af_query.MSG_SELECTIVELY_REQUIRED_CONSTRAINT","af_query.MSG_SELECTIVELY_REQUIRED_CONSTRAINT_DETAIL",!1);l=!1}else for(a=0;a<f;a++)b=e[a],d=b.g(),A.c.Oe(d),b.Xi(),0==b.getValid()&&(g=!1);g||A.c.sq();return l&&h&&g}return!0};r.a("AdfDhtmlQueryPeer.prototype.validateCriterionFields",{t_:Z.prototype.t_});Z.prototype.X4=function(a){var b=this.f().g(),d;(b=A.c.Qe(b))&&(d=b[a]);return d};
Z.prototype.TG=function(a,b){var d=this.f().g(),e=A.c,f=e.Qe(d);f||(f={},e.Df(d,f));f[a]=b};Z.prototype.mmb=function(a){a=a.g()+Z.Ae+Z.wXa;a=A.c.m(a);if(null!=a&&(a.o().vaa(Z.MPa),a=a.Cd()))for(var b=0;b<a.length;b++){var d=a[b],e=d.g();e&&0<=e.indexOf(Z.vXa)&&d.o().vaa(Z.MPa)}};Z.prototype.bX=function(a){Xv.$ta(a);if(-1==a.g().indexOf("_afrLovInternalQueryId")){var b=a.getResultComponentId();b&&(a=a.m(b))&&nh.F(a,nh.Kya,null,!0)}};