var Di=I.ea(R,"AdfMultiSelectInputSearchPeer",!1);m("AdfMultiSelectInputSearchPeer",Di);Di.C=function(){r.bb(Ci);this.bBa=", ";this.yT="data-afr-sel";this.wT="p_AFHasSelections"};m("AdfMultiSelectInputSearchPeer.InitSubclass",Di.C);Di.prototype.G=function(a,b){Di.h.G.call(this,a,b);this.bpa=new Ci(this);var d=R.et(a);Di.DX(a,b,d.length)};r.a("AdfMultiSelectInputSearchPeer.prototype.InitDomElement",{G:Di.prototype.G});Di.prototype.Bj=function(){return this.g7?Di.h.Bj.call(this):G.tt};
r.a("AdfMultiSelectInputSearchPeer.prototype.GetReadyState",{Bj:Di.prototype.Bj});Di.prototype.Hf=function(a,b){var d=O.mC(a,b).trim();return d?d.split(Di.bBa):E.wD};r.a("AdfMultiSelectInputSearchPeer.prototype.GetDisplayValue",{Hf:Di.prototype.Hf});Di.prototype.nd=function(a){var b=ti(this.mr());0==b.length&&0==R.et(a).length&&this.Ba(a,this.i(),b);this.cc(a,b)};r.a("AdfMultiSelectInputSearchPeer.prototype.RunValidation",{nd:Di.prototype.nd});
Di.prototype.tD=function(a,b){Di.h.tD.call(this,a,b);this.sL(a,b)};r.a("AdfMultiSelectInputSearchPeer.prototype.DerivePropsFromPrefSuggestions",{tD:Di.prototype.tD});Di.prototype.Wv=function(a){return a.join(Di.bBa)};r.a("AdfMultiSelectInputSearchPeer.prototype.GetCombinedDisplayValue",{Wv:Di.prototype.Wv});Di.prototype.ew=function(a,b){for(var d={},e=0,f=b.length;e<f;e++)d[b[e]]=!0;for(var g=[],e=0,f=a.length;e<f;e++)d[a[e]]||g.push(a[e]);return g};
r.a("AdfMultiSelectInputSearchPeer.prototype.GetRealNewValues",{ew:Di.prototype.ew});Di.prototype.Ho=function(a){var b=this.mr();if(a&&!this.lm(ti(b),a)){for(var d=this.ye().Pp(),e=new Map,f=0,g=a.length;f<g;f++){var h=a[f];b&&b.has(h)?e.set(h,b.get(h)):d?e.set(h,d.get(h)):e.set(h,null)}b=this.c6=e;Di.U7(this.f(),this.i(),a.length)}return b};r.a("AdfMultiSelectInputSearchPeer.prototype.GetSuggestionMapContainingSelections",{Ho:Di.prototype.Ho});Di.prototype.ye=function(){return this.bpa};
r.a("AdfMultiSelectInputSearchPeer.prototype.GetSuggestionsPanel",{ye:Di.prototype.ye});Di.prototype.wt=function(a,b){C.sa(this.i(),Di.wT)&&(this.ow(a)||(this.So(b),this.Yz(a,"selections")),a.focus())};r.a("AdfMultiSelectInputSearchPeer.prototype.ShowSelectionsPopup",{wt:Di.prototype.wt});Di.prototype.pw=function(){return!1};r.a("AdfMultiSelectInputSearchPeer.prototype.IsUnderAutocompletion",{pw:Di.prototype.pw});Di.prototype.xw=function(){};
r.a("AdfMultiSelectInputSearchPeer.prototype.RestoreSelectionOnEscape",{xw:Di.prototype.xw});Di.prototype.Qq=function(a){if(!this.g7){var b=A.c;b.uq(a);b.jv(a)}var b=this.mr(),d;if(d=b)(d=this.g7)||(d=!(!this.mr()||0<VB(this,a).length));if(d)if(b=new $f(ui(b)),d=this.ye(),d.Pp())d.update(a,b,!0);else{var e={};e.source=pg(a);d.qc(a,b,e)}};r.a("AdfMultiSelectInputSearchPeer.prototype.RenderSelections",{Qq:Di.prototype.Qq});
Di.prototype.So=function(a,b){a.value=void 0!==b&&b!==w.uz&&b!==w.$I?String.fromCodePoint?String.fromCodePoint(b):String.fromCharCode(b):"";Di.h.So.call(this,a,b)};r.a("AdfMultiSelectInputSearchPeer.prototype.ToggleDisplayValueToFiltering",{So:Di.prototype.So});Di.prototype.Uq=function(a,b,d,e){for(var f=this.mr(),g=0,h=d.length;g<h;g++){var l=d[g],n=e.get(l);n&&f.set(l,n)}Di.h.Uq.call(this,a,b,d,e)};r.a("AdfMultiSelectInputSearchPeer.prototype.UpdateDisplayValueAndSelection",{Uq:Di.prototype.Uq});
Di.prototype.fE=function(a,b,d){this.sL(a,b);var e=!1,f=VB(this,a);d?0<f.length&&v.l.severe("There are values for which the suggestion objects are not available. Component: ",a.g(),". Values are ",f):0<f.length&&(e=!0,og.HRa(a,f));Di.h.fE.call(this,a,b,d,e);e||(this.g7=!0,A.c.uq(a),this.ow(a)&&this.Qq(a))};r.a("AdfMultiSelectInputSearchPeer.prototype.PrefetchComplete",{fE:Di.prototype.fE});
Di.prototype.hha=function(a,b){this.g7=!0;A.c.uq(a);this.sL(a,b);var d=VB(this,a);0<d.length&&v.l.severe("There are values for which the suggestion objects are not available. Component: ",a.g(),". Values are ",d);this.Wz(a,b,!1,!1);this.ow(a)&&this.Qq(a)};r.a("AdfMultiSelectInputSearchPeer.prototype.__fetchSpecificSuggestionsComplete",{hha:Di.prototype.hha});Di.prototype.mr=function(){return this.c6};r.a("AdfMultiSelectInputSearchPeer.prototype.__getLocalSelections",{mr:Di.prototype.mr});
function VB(a,b){for(var d=R.et(b),e=a.c6,f=[],g=0,h=d.length;g<h;g++)null==e.get(d[g])&&f.push(d[g]);return f}Di.prototype.sL=function(a,b){if(!this.mr()){u.assert(null!=R.L9(a));for(var d=R.et(a),e=a.getSelection()||[],f=new Map,g=0,h=d.length;g<h;g++)f.set(d[g],Di.bfb(d[g],e));this.c6=f}d=R.et(a);e=0;for(f=d.length;e<f;e++)(g=b.get(d[e]))&&this.c6.set(d[e],g)};r.a("AdfMultiSelectInputSearchPeer.prototype.__resolveLocalSelections",{sL:Di.prototype.sL});
Di.bfb=function(a,b){for(var d=0,e=b.length;d<e;d++)if(a==b[d].key)return b[d]};Di.DX=function(a,b,d){(a=Bi(a))&&0<d&&(a.setAttribute(Di.yT,d),C.w(b,Di.wT))};Di.U7=function(a,b,d){0===d?(C.O(b,Di.wT),Bi(a).removeAttribute(Di.yT)):Di.DX(a,b,d)};