import{f as l}from"./chunk-EMGAXJ6U.js";import{Fa as n,Fb as s,qc as u,tb as o}from"./chunk-DZ62WUBN.js";var h=(()=>{class e{constructor(t){this.ngControl=t,this.trimmed=new n}onBlur(){let t=this.ngControl.control;if(t&&typeof t.value=="string"){let i=t.value.trim();i!==t.value&&(t.setValue(i),this.trimmed.emit())}}onInput(t){let i=t.target;i.value.startsWith(" ")&&(i.value=i.value.trimStart(),this.ngControl.control?.setValue(i.value))}static{this.\u0275fac=function(i){return new(i||e)(o(l))}}static{this.\u0275dir=s({type:e,selectors:[["","appTrimEdges",""]],hostBindings:function(i,r){i&1&&u("blur",function(){return r.onBlur()})("input",function(m){return r.onInput(m)})},outputs:{trimmed:"trimmed"}})}}return e})();export{h as a};
