var Iw=I.ea(Gw,"AdfDhtmlSelectManyChoicePeer");m("AdfDhtmlSelectManyChoicePeer",Iw);
Iw.C=function(){I.hc(this,AdfUIEditableValue.SUBMITTED_VALUE,AdfUISelectMany.st,AdfRichSelectManyChoice.LABEL);I.sb(this,AdfRichSelectManyChoice.LABEL);I.ra(this,D.wb,D.Bd,D.Rg,D.Bc,D.hh);q.b.S()==q.ia&&I.ra(this,D.Pc,D.Nd);this.nA="drop";this.Mf="pop";this.LE="popWrap";this.zga="sp";this.D1a="lazy";this.ad="_afrSelectManyPopupPanel";this.cj="_afrItemValue";this.F7a="_adfTrueVal";this.Jw="p_AFHighlighted";this.Mj="p_AFSelected";this.l0a="fetchWrap";this.k0a="fetchPop";this.m0a="fetchSp";this.Hw="_afrSelectManyFetchingPopupPanel";
this.kfa="contentLoaded";this.qCa="noContent";this.lfa="fetching"};m("AdfDhtmlSelectManyChoicePeer.InitSubclass",Iw.C);Iw.prototype.jq=function(){return!0};r.a("AdfDhtmlSelectManyChoicePeer.prototype.needsFocusTargetStyleClass",{jq:Iw.prototype.jq});
Iw.prototype.Fa=function(a){var b=a.getSource(),d=this.i();a=a.X();var d=O.da(b,d),e=a==Jw(b),f=Jw(b);d.disabled||!e&&a!=d||(f.parentNode.parentNode.setAttribute("aria-expanded","true"),this.Za(b,Iw.Hw)?this.Jb(b,Iw.Hw):this.Za(b,Iw.ad)?(this.Jb(b,Iw.ad),f.parentNode.parentNode.setAttribute("aria-expanded","false"),this.Vm(b)):(a=this.eB(),a==Iw.qCa?(this.BX(Iw.lfa),(new gh(b,gh.rk)).F(),this.Qoa(b)):a!=Iw.lfa&&this.MB(b)))};r.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentMouseDown",{Fa:Iw.prototype.Fa});
Iw.prototype.Ac=function(a){var b=a.getSource(),d=this.i();a=a.X();d=O.da(b,d);a=a==Jw(b);!d.disabled&&a&&(this.Za(b,Iw.ad)||a&&d.focus())};r.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentMouseUp",{Ac:Iw.prototype.Ac});Iw.prototype.Ta=function(a){Iw.h.Ta.call(this,a);a=a.getSource();var b=this.i();a=O.da(a,b);C.w(a,Iw.Mj)};r.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentFocus",{Ta:Iw.prototype.Ta});
Iw.prototype.Lb=function(a){a=a.getSource();var b=this.i();a=O.da(a,b);C.O(a,Iw.Mj)};r.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentBlur",{Lb:Iw.prototype.Lb});
Iw.prototype.M=function(a){Iw.h.M.call(this,a);var b=this.f(),d=this.i(),e=O.da(b,d);if(!e.disabled){var f=a.X();if("INPUT"!=q.b.Na(f))if((f=C.pa(f))&&(f=C.pa(f)),f&&"INPUT"==q.b.Na(f)&&"checkbox"==f.type)f.disabled||(f.focus(),f.click());else return;if("checkbox"==f.type){var g=f.getAttribute("id"),h=Kw(this,b,d);f!=h&&(Lw(f,h),g||a.U().shiftKey&&this.kK(b,d,f,h));g&&(d=this.i(),this.uK(b,d,f.checked));a=this.Wa(b,f);this.Ba(b,e,a)}}};
r.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentClick",{M:Iw.prototype.M});Iw.prototype.Yb=function(a){this.Il(a)};r.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentKeyPress",{Yb:Iw.prototype.Yb});
Iw.prototype.ma=function(a){this.Il(a);var b=a.X();if("INPUT"==b.tagName){var d=a.U(),e=q.b.na(d),f=a.getSource();if(e==w.Ih)this.Za(f,Iw.ad)?this.Jb(f,Iw.ad):this.Za(f,Iw.Hw)&&this.Jb(f,Iw.Hw);else if("text"==b.type)(e==w.Ra||e==w.Ra&&d.altKey)&&this.Fa(a);else if("checkbox"==b.type)switch(b=this.i(),e){case w.jb:if(a=Kw(this,f,b))d=this.Wa(f,a),this.Ba(f,O.da(f,b),d);this.Jb(f,Iw.Hw);this.Jb(f,Iw.ad);break;case w.tf:this.Jb(f,Iw.Hw);this.Jb(f,Iw.ad);this.Vm(f);f=O.da(f,b);d.shiftKey?J.ni(f):J.ce(f);
a.cancel();break;case w.GQ:d.ctrlKey&&(this.uK(f,b,!0),d=this.Wa(f,b),this.Ba(f,O.da(f,b),d),a.cancel());break;case w.ab:case w.Ra:var g=Kw(this,f,b);(e=e==w.ab?this.FD(f,b,g,d.shiftKey):this.Ho(f,b,g))&&e!=g&&(Lw(e,g),d.shiftKey&&(g.checked=!0,e.checked=!0,d=this.Wa(f,e),this.Ba(f,O.da(f,b),d)),e.focus());a.cancel();break;case w.$i:case w.Fo:d.shiftKey&&(a=Kw(this,f,b),e=e==w.$i?this.Ho(f,b,null):this.FD(f,b,null,!0),this.kK(f,b,a,e),d=this.Wa(f,e),this.Ba(f,O.da(f,b),d),Lw(e,a),e.focus())}}};
r.a("AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentKeyDown",{ma:Iw.prototype.ma});Iw.prototype.Zb=function(a,b){Iw.h.Zb.call(this,a,b);if(this.eB()==Iw.lfa){var d=this.f(),e=O.da(d,a);if(e=this.kd(d,e)){for(var f=0;f<e.length;f++)this.xi(e[f]);e=this.Jq(d);null!=e&&this.xi(e)}this.BX(Iw.kfa);this.Jb(d,Iw.Hw);this.MB(d)}};r.a("AdfDhtmlSelectManyChoicePeer.prototype.ReplaceDomElement",{Zb:Iw.prototype.Zb});Iw.prototype.dt=function(a){a=I.j(a.g(),Iw.Mf);return q.b.getElementById(a)};
r.a("AdfDhtmlSelectManyChoicePeer.prototype.GetSelectItemsParentDomElement",{dt:Iw.prototype.dt});
Iw.prototype.Ba=function(a,b,d){u.u(b);u.Mb(d);var e=this.kd(a,b);if(e){for(var f=!0,g=null,h=0,l=0;l<e.length;l++){var n=e[l],t=E.indexOf(d,n.value);n.checked=0<=t;this.xi(n);n.checked?(n=n.getAttribute(Iw.F7a),h++,g=null==g?n:g+("; "+n)):n.disabled||(f=!1)}d=this.Jq(a);null!=d&&(d.checked!=f&&(d.checked=f),this.xi(d));f&&1<h&&(g=A.c.H().Z("af_selectManyChoice.LABEL_TIP_SELECT_ALL"));a=O.da(a,b);null===g&&(g="");a.value=g;a.title=g}};r.a("AdfDhtmlSelectManyChoicePeer.prototype.SetDisplayValue",{Ba:Iw.prototype.Ba});
Iw.prototype.Wa=function(a,b){if(this.eB()!=Iw.kfa){u.u(b);var d=A.c.H().Z("af_selectManyChoice.LABEL_TIP_SELECT_ALL");if(O.da(a,b).value==d)return null}return Iw.h.Wa(a,b)};r.a("AdfDhtmlSelectManyChoicePeer.prototype.GetSubmittedValue",{Wa:Iw.prototype.Wa});Iw.prototype.ob=function(a,b,d){d==Iw.ad?(d=I.j(a.g(),Iw.LE),d=q.b.getElementById(d),d.appendChild(b),b=this.i(),b=this.Wa(a,b),this.cc(a,b),this.Y$(a,!1)):d==Iw.Hw&&(d=I.j(a.g(),Iw.l0a),d=q.b.getElementById(d),d.appendChild(b))};
r.a("AdfDhtmlSelectManyChoicePeer.prototype.PopupClosed",{ob:Iw.prototype.ob});Iw.prototype.Yd=function(a,b){var d=O.da(a,b);return A.c.Ka().La()&&q.b.S()==q.ia?d:d.parentNode};r.a("AdfDhtmlSelectManyChoicePeer.prototype.GetNoteWindowAlignmentNode",{Yd:Iw.prototype.Yd});Iw.prototype.Oa=function(){return ii.jd()};r.a("AdfDhtmlSelectManyChoicePeer.prototype.GetInlineEditor",{Oa:Iw.prototype.Oa});
Iw.prototype.G=function(a,b){Iw.h.G.call(this,a,b);var d=O.da(a,b);if(d=this.kd(a,d)){for(var e=0;e<d.length;e++)this.xi(d[e]);d=this.Jq(a);null!=d&&this.xi(d)}};r.a("AdfDhtmlSelectManyChoicePeer.prototype.InitDomElement",{G:Iw.prototype.G});
Iw.prototype.MB=function(a){r.bb(AdfRichPopup);var b=a.g(),d=this.i();Mw(a,b,d,Iw.zga);var e=Kw(this,a,d),f=this.Jq(a);e!=f&&e&&C.sa(e.parentNode.parentNode,Iw.Jw)&&C.O(e.parentNode.parentNode,Iw.Jw);(e=f?f:Kw(this,a,d))&&!C.sa(e.parentNode.parentNode,Iw.Jw)&&C.w(e.parentNode.parentNode,Iw.Jw);b=I.j(b,Iw.Mf);b=q.b.getElementById(b);b.parentNode.removeChild(b);this.Y$(a,!0);this.He(a,b,this.Y4(a,!0),Iw.ad)};Iw.prototype.Y$=function(a,b){var d=O.da(a);q.b.setAttribute(d,"aria-expanded",b)};
r.a("AdfDhtmlSelectManyChoicePeer.prototype.setAriaExpanded",{Y$:Iw.prototype.Y$});Iw.prototype.Qoa=function(a){r.bb(AdfRichPopup);var b=a.g(),d=this.i();Mw(a,b,d,Iw.m0a);b=I.j(b,Iw.k0a);b=q.b.getElementById(b);b.parentNode.removeChild(b);this.He(a,b,this.Y4(a,!1),Iw.Hw)};function Mw(a,b,d,e){b=I.j(b,e);b=q.b.getElementById(b);a=O.da(a,d);b.style.width=a.parentNode.offsetWidth-7+"px"}
Iw.prototype.Y4=function(a,b){var d={type:"menu"};d[AdfRichPopup.Ed]=AdfRichPopup.qf;d[AdfRichPopup.Jf]=O.zD(a);d.autodismiss="autodismissMenu";d.focus=b;return d};function Jw(a){a=I.j(a.g(),Iw.nA);return q.b.getElementById(a)}function Kw(a,b,d){var e=a.Jq(b);a=a.kd(b,d);b=null;if(a)for(d=0;d<a.length;d++)if(cb=a[d],b||cb.disabled||(b=cb),C.sa(cb.parentNode.parentNode,Iw.Jw)){e=cb;break}null==e&&(e=b);return e}
function Lw(a,b){b&&C.sa(b.parentNode.parentNode,Iw.Jw)&&(C.O(b.parentNode.parentNode,Iw.Jw),b.parentNode.parentNode.removeAttribute("aria-selected"));a&&!C.sa(a.parentNode.parentNode,Iw.Jw)&&(C.w(a.parentNode.parentNode,Iw.Jw),a.parentNode.parentNode.setAttribute("aria-selected","true"))}Iw.prototype.eB=function(){var a=this.f();if(null==a.Bx){var b=I.j(a.g(),Iw.D1a),b=q.b.getElementById(b);a.Bx=null!=b?Iw.qCa:Iw.kfa}return a.Bx};Iw.prototype.BX=function(a){this.f().Bx=a};