var Au=M.U(yu,"AdfDhtmlSelectManyChoicePeer");v("AdfDhtmlSelectManyChoicePeer",Au);
Au.m=function(){M.$b(this,AdfUIEditableValue.SUBMITTED_VALUE,AdfUISelectMany.Dq,AdfRichSelectManyChoice.LABEL);M.hb(this,AdfRichSelectManyChoice.LABEL);M.ha(this,I.jb,I.Xc,I.Xf,I.ec,I.Wf);w.b.G()==w.aa&&M.ha(this,I.tc,I.Dd);this.sU="drop";this.rf="pop";this.rA="popWrap";this.y7="sp";this.VKa="lazy";this.Ic="_afrSelectManyPopupPanel";this.We="_afrItemValue";this.C6a="_afrDisable";this.$6a="_afrSelectedItemId";this.JPa="_adfTrueVal";this.tt="p_AFHighlighted";this.ii="p_AFSelected";this.sJa="disabled";
this.UJa="fetchWrap";this.TJa="fetchPop";this.VJa="fetchSp";this.rt="_afrSelectManyFetchingPopupPanel";this.x6="contentLoaded";this.Roa="noContent";this.y6="fetching"};v("AdfDhtmlSelectManyChoicePeer.InitSubclass",Au.m);Au.prototype.Mn=t(l);z.a("AdfDhtmlSelectManyChoicePeer.prototype.needsFocusTargetStyleClass",{Mn:Au.prototype.Mn});
Au.prototype.qa=function(a){var b=a.getSource(),d=this.h();a=a.Q();var d=U.W(b,d),e=a==Bu(b),f=Bu(b);if(!d.disabled&&(e||a==d))f.parentNode.parentNode.setAttribute("aria-expanded","true"),this.Qa(b,Au.rt)?this.ob(b,Au.rt):this.Qa(b,Au.Ic)?(this.ob(b,Au.Ic),f.parentNode.parentNode.setAttribute("aria-expanded","false"),this.sm(b)):(a=this.gx(),a==Au.Roa?(this.$P(Au.y6),(new Nf(b,Nf.kj)).v(),this.Ada(b)):a!=Au.y6&&this.Jx(b))};z.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentMouseDown",{qa:Au.prototype.qa});
Au.prototype.cc=function(a){var b=a.getSource(),d=this.h();a=a.Q();d=U.W(b,d);a=a==Bu(b);!d.disabled&&a&&(this.Qa(b,Au.Ic)||a&&d.focus())};z.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentMouseUp",{cc:Au.prototype.cc});Au.prototype.Ha=function(a){Au.f.Ha.call(this,a);a=a.getSource();var b=this.h();a=U.W(a,b);H.n(a,Au.ii)};z.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentFocus",{Ha:Au.prototype.Ha});Au.prototype.Eb=function(a){a=a.getSource();var b=this.h();a=U.W(a,b);H.F(a,Au.ii)};
z.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentBlur",{Eb:Au.prototype.Eb});
Au.prototype.C=function(a){Au.f.C.call(this,a);var b=this.d(),d=this.h(),e=U.W(b,d);if(!e.disabled){var f=a.Q();if("INPUT"!=w.b.Ga(f))if((f=H.ca(f))&&(f=H.ca(f)),f&&"INPUT"==w.b.Ga(f)&&"checkbox"==f.type)f.disabled||(f.focus(),f.click());else return;if("checkbox"==f.type){var g=f.getAttribute("id"),h=Cu(this,b,d);f!=h&&(Du(f,h),g||a.L().shiftKey&&this.SE(b,d,f,h));g&&(d=this.h(),this.aF(b,d,f.checked));a=this.cb(b,f);this.xa(b,e,a)}}};
z.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentClick",{C:Au.prototype.C});Au.prototype.zb=function(a){this.Li(a)};z.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentKeyPress",{zb:Au.prototype.zb});
Au.prototype.ba=function(a){this.Li(a);var b=a.Q();if("INPUT"==b.tagName){var d=a.L(),e=w.b.ia(d),f=a.getSource();if(e==E.xh)this.Qa(f,Au.Ic)?this.ob(f,Au.Ic):this.Qa(f,Au.rt)&&this.ob(f,Au.rt);else if("text"==b.type)(e==E.Ja||e==E.Ja&&d.altKey)&&this.qa(a);else if("checkbox"==b.type)switch(b=this.h(),e){case E.$a:if(a=Cu(this,f,b))d=this.cb(f,a),this.xa(f,U.W(f,b),d);this.ob(f,Au.rt);this.ob(f,Au.Ic);break;case E.Df:this.ob(f,Au.rt);this.ob(f,Au.Ic);this.sm(f);f=U.W(f,b);d.shiftKey?O.Qh(f):O.Ud(f);
a.cancel();break;case E.oK:d.ctrlKey&&(this.aF(f,b,l),d=this.cb(f,b),this.xa(f,U.W(f,b),d),a.cancel());break;case E.Ya:case E.Ja:var g=Cu(this,f,b);if((e=e==E.Ya?this.yz(f,b,g,d.shiftKey):this.wz(f,b,g))&&e!=g)Du(e,g),d.shiftKey&&(g.checked=l,e.checked=l,d=this.cb(f,e),this.xa(f,U.W(f,b),d)),e.focus();a.cancel();break;case E.fi:case E.nm:d.shiftKey&&(a=Cu(this,f,b),e=e==E.fi?this.wz(f,b,n):this.yz(f,b,n,l),this.SE(f,b,a,e),d=this.cb(f,e),this.xa(f,U.W(f,b),d),Du(e,a),e.focus())}}};
z.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentKeyDown",{ba:Au.prototype.ba});Au.prototype.Ab=function(a,b){Au.f.Ab.call(this,a,b);if(this.gx()==Au.y6){var d=this.d(),e=U.W(d,a);if(e=this.Xd(d,e)){for(var f=0;f<e.length;f++)this.Ch(e[f]);e=this.jo(d);e!=n&&this.Ch(e)}this.$P(Au.x6);this.ob(d,Au.rt);this.Jx(d)}};z.a("AdfDhtmlSelectManyChoicePeer.prototype.ReplaceDomElement",{Ab:Au.prototype.Ab});Au.prototype.pm=function(a){a=M.g(a.e(),Au.rf);return w.b.getElementById(a)};
z.a("AdfDhtmlSelectManyChoicePeer.prototype.GetSelectItemsParentDomElement",{pm:Au.prototype.pm});
Au.prototype.xa=function(a,b,d){B.p(b);B.yc(d);this.O8a=p;var e=this.Xd(a,b);if(e){for(var f=l,g=n,h=0,m=0;m<e.length;m++){var q=e[m],s=ya.indexOf(d,q.value);q.checked=0<=s;this.Ch(q);q.checked?(q=q.getAttribute(Au.JPa),h++,g=g==n?q:g+("; "+q)):q.disabled||(f=p)}d=this.jo(a);d!=n&&(d.checked!=f&&(d.checked=f),this.Ch(d));f&&1<h&&(g=F.c.u().V("af_selectManyChoice.LABEL_TIP_SELECT_ALL"));a=U.W(a,b);g===n&&(g="");a.value=g;a.title=g}};z.a("AdfDhtmlSelectManyChoicePeer.prototype.SetDisplayValue",{xa:Au.prototype.xa});
Au.prototype.cb=function(a,b){if(this.gx()!=Au.x6){B.p(b);var d=F.c.u().V("af_selectManyChoice.LABEL_TIP_SELECT_ALL");if(U.W(a,b).value==d)return n}return Au.f.cb(a,b)};z.a("AdfDhtmlSelectManyChoicePeer.prototype.GetSubmittedValue",{cb:Au.prototype.cb});Au.prototype.Va=function(a,b,d){d==Au.Ic?(d=M.g(a.e(),Au.rA),d=w.b.getElementById(d),d.appendChild(b),b=this.h(),b=this.cb(a,b),this.Yb(a,b)):d==Au.rt&&(d=M.g(a.e(),Au.UJa),d=w.b.getElementById(d),d.appendChild(b))};
z.a("AdfDhtmlSelectManyChoicePeer.prototype.PopupClosed",{Va:Au.prototype.Va});Au.prototype.pd=function(a,b){var d=U.W(a,b);return F.c.Ma().Oa()&&w.b.G()==w.aa?d:d.parentNode};z.a("AdfDhtmlSelectManyChoicePeer.prototype.GetNoteWindowAlignmentNode",{pd:Au.prototype.pd});Au.prototype.Aa=function(){return mg.Hc()};z.a("AdfDhtmlSelectManyChoicePeer.prototype.GetInlineEditor",{Aa:Au.prototype.Aa});
Au.prototype.q=function(a,b){Au.f.q.call(this,a,b);var d=U.W(a,b);if(d=this.Xd(a,d)){for(var e=0;e<d.length;e++)this.Ch(d[e]);d=this.jo(a);d!=n&&this.Ch(d)}};z.a("AdfDhtmlSelectManyChoicePeer.prototype.InitDomElement",{q:Au.prototype.q});u=Au.prototype;
u.Jx=function(a){z.kb(AdfRichPopup);var b=a.e(),d=this.h();Eu(a,b,d,Au.y7);var e=Cu(this,a,d),f=this.jo(a);e!=f&&e&&H.ta(e.parentNode.parentNode,Au.tt)&&H.F(e.parentNode.parentNode,Au.tt);(e=f?f:Cu(this,a,d))&&!H.ta(e.parentNode.parentNode,Au.tt)&&H.n(e.parentNode.parentNode,Au.tt);b=M.g(b,Au.rf);b=w.b.getElementById(b);b.parentNode.removeChild(b);this.fe(a,b,this.nX(a,l),Au.Ic)};
u.Ada=function(a){z.kb(AdfRichPopup);var b=a.e(),d=this.h();Eu(a,b,d,Au.VJa);b=M.g(b,Au.TJa);b=w.b.getElementById(b);b.parentNode.removeChild(b);this.fe(a,b,this.nX(a,p),Au.rt)};function Eu(a,b,d,e){b=M.g(b,e);b=w.b.getElementById(b);a=U.W(a,d);b.style.width=a.parentNode.offsetWidth-7+"px"}u.nX=function(a,b){var d={type:"menu"};d[AdfRichPopup.fd]=AdfRichPopup.of;d[AdfRichPopup.pf]=U.eE(a);d.autodismiss="autodismissMenu";d.focus=b;return d};
function Bu(a){a=M.g(a.e(),Au.sU);return w.b.getElementById(a)}function Cu(a,b,d){var e=a.jo(b);a=a.Xd(b,d);b=n;if(a)for(d=0;d<a.length;d++)if(cb=a[d],!b&&!cb.disabled&&(b=cb),H.ta(cb.parentNode.parentNode,Au.tt)){e=cb;break}e==n&&(e=b);return e}
function Du(a,b){b&&H.ta(b.parentNode.parentNode,Au.tt)&&(H.F(b.parentNode.parentNode,Au.tt),b.parentNode.parentNode.removeAttribute("aria-selected"));a&&!H.ta(a.parentNode.parentNode,Au.tt)&&(H.n(a.parentNode.parentNode,Au.tt),a.parentNode.parentNode.setAttribute("aria-selected","true"))}u.gx=function(){var a=this.d();if(a.au==n){var b=M.g(a.e(),Au.VKa),b=w.b.getElementById(b);a.au=b!=n?Au.Roa:Au.x6}return a.au};u.$P=function(a){this.d().au=a};