var bf=I.ea(O,"AdfDhtmlInputBasePeer");m("AdfDhtmlInputBasePeer",bf);bf.C=function(){I.hc(this,AdfUIEditableValue.SUBMITTED_VALUE);I.ra(this,D.Pc,D.Nd);this.NK="data-afr-lastvalue"};m("AdfDhtmlInputBasePeer.InitSubclass",bf.C);bf.prototype.Qa=function(a){bf.h.Qa.call(this,a);this.Pna=!1};r.a("AdfDhtmlInputBasePeer.prototype.initialize",{Qa:bf.prototype.Qa});bf.prototype.jq=function(){return!0};r.a("AdfDhtmlInputBasePeer.prototype.needsFocusTargetStyleClass",{jq:bf.prototype.jq});
bf.prototype.jv=function(){var a=document.activeElement,b=O.da(this.f());a==b&&(this.Pna=!0)};r.a("AdfDhtmlInputBasePeer.prototype.preventNextValueSubmission",{jv:bf.prototype.jv});bf.prototype.Ta=function(a){if(a.Wd()==Qa.Ef&&(bf.h.Ta.call(this,a),a=a.X(),!this.Xq())){var b=this.f(),b=O.da(b);a==b&&bf.wl(b)}};r.a("AdfDhtmlInputBasePeer.prototype.HandleComponentFocus",{Ta:bf.prototype.Ta});bf.prototype.Bza=function(a){a=O.da(a);bf.wl(a)};r.a("AdfDhtmlInputBasePeer.prototype.UpdateLastValue",{Bza:bf.prototype.Bza});
bf.ls=function(a){return(a=q.b.zh(a,bf.NK))?a:""};m("AdfDhtmlInputBasePeer.getLastValue",bf.ls);bf.wl=function(a,b){void 0===b&&(b=a.value);q.b.tg(a,bf.NK,b)};m("AdfDhtmlInputBasePeer.setLastValue",bf.wl);bf.prototype.Lb=function(a){if(a.Wd()==Qa.Ef){var b=this.f();a=a.X();this.Xq()||this.nd(b,a,!0)}};r.a("AdfDhtmlInputBasePeer.prototype.HandleComponentBlur",{Lb:bf.prototype.Lb});bf.prototype.d3=function(a){this.Xq()||this.nd(a,O.da(a),!0)};r.a("AdfDhtmlInputBasePeer.prototype.__simulateBlur",{d3:bf.prototype.d3});
bf.prototype.nd=function(a,b,d){if(this.Ll(a)){var e=O.da(a);if(b==e){b=bf.ls(e);var f=e.value;if(void 0===d){d=this.zc(f);var g=a.getRequired();d=d&&(g||A.c.gY)?!1:!0}d&&f==b||(bf.wl(e,f),this.cc(a,f))}}};r.a("AdfDhtmlInputBasePeer.prototype.RunValidation",{nd:bf.prototype.nd});bf.prototype.Xq=function(){return!1};r.a("AdfDhtmlInputBasePeer.prototype.VetoBlurValidation",{Xq:bf.prototype.Xq});bf.prototype.Wa=function(a,b){var d=O.da(a,b);return a.getReadOnly()?q.b.mc(d):d.value};
r.a("AdfDhtmlInputBasePeer.prototype.GetSubmittedValue",{Wa:bf.prototype.Wa});bf.prototype.Qo=function(){return!0};r.a("AdfDhtmlInputBasePeer.prototype.ShouldShowHint",{Qo:bf.prototype.Qo});bf.prototype.Pq=function(){return!0};r.a("AdfDhtmlInputBasePeer.prototype.NeedsSpuriousDirtyValueTracking",{Pq:bf.prototype.Pq});bf.prototype.Ll=function(a){return this.Pna?this.Pna=!1:bf.h.Ll.call(this,a)};r.a("AdfDhtmlInputBasePeer.prototype.WasSubmitted",{Ll:bf.prototype.Ll});
bf.prototype.OQ=function(a,b){if(a&&a.getMaximumLength){var d=a.getMaximumLength();if(null==d||1>d)return!1;var e;if(b.value){e=b.value;var f=a.getCharacterCountBy();null!=f&&(f=f.toLowerCase());var g=e.length,h=0;switch(f){case "codepoint":for(f=0;f<g;f++)55296===(e.charCodeAt(f)&63488)&&h++;u.assert(0===h%2,"the number of surrogate chars must be an even number.");e=g-h/2;break;default:e=g}}else e=0;if(e>=d){if(e>d){e=O.da(a);var g=e.selectionStart,h=e.selectionEnd,f=b.value,l=a.getCharacterCountBy();
null!=l&&(l=l.toLowerCase());var n=f.length,t=0,y,z;switch(l){case "codepoint":for(y=0;y<n&&0>t;y++)55296===(f.charCodeAt(y)&63488)&&(y++,u.assert(55296===(f.charCodeAt(y)&63488),"Skipped over a non-surrogate pair character.")),t++;l=y;t=0;for(z=y;z<n&&t<d;z++)55296===(f.charCodeAt(z)&63488)&&(z++,u.assert(55296===(f.charCodeAt(z)&63488),"Skipped over a non-surrogate pair character.")),t++;d=f.substr(l,z-y);break;default:d=f.substr(0,d)}b.value=d;e.selectionStart=g;e.selectionEnd=h}return!0}}return!1};
r.a("AdfDhtmlInputBasePeer.prototype.CheckLength",{OQ:bf.prototype.OQ});