Liferay.Loader.define("frontend-js-web@5.0.45/liferay/autosize/autosize.es",["module","exports","require"],(function(t,e,i){window;{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;const t="&nbsp;&nbsp;";class i{constructor(t){var e,i,s;s=t=>{requestAnimationFrame((()=>{this._resizeInput(t.target)}))},(i="handleInput")in(e=this)?Object.defineProperty(e,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[i]=s,this.inputElement=t,this.computedStyle=getComputedStyle(this.inputElement),this.minHeight=parseInt(this.computedStyle.height.replace("px",""),10),this.paddingHeight=parseInt(this.computedStyle.paddingTop.replace("px",""),10)+parseInt(this.computedStyle.paddingBottom.replace("px",""),10),this.template=this.createTemplate(this.computedStyle),document.body.appendChild(this.template),this.inputElement.addEventListener("input",this.handleInput),this._resizeInput(this.inputElement)}createTemplate(e){const i=document.createElement("pre");return i.style.clip="rect(0, 0, 0, 0) !important",i.style.left="0",i.style.overflowWrap="break-word",i.style.position="absolute",i.style.top="0",i.style.transform="scale(0)",i.style.whiteSpace="pre-wrap",i.style.wordBreak="break-word",i.style.fontFamily=e.fontFamily,i.style.fontSize=e.fontSize,i.style.fontStyle=e.fontStyle,i.style.fontWeight=e.fontWeight,i.style.lineHeight=e.lineHeight,i.style.letterSpacing=e.letterSpacing,i.style.textTransform=e.textTransform,i.style.width=e.width,i.textContent=t,i}_resizeInput(e){this.template.style.width!==this.computedStyle.width&&(this.template.style.width=this.computedStyle.width),this.template.innerHTML=Liferay.Util.escapeHTML(e.value)+t,e.style.height="".concat(this.template.scrollHeight+this.paddingHeight<this.minHeight?this.minHeight:this.template.scrollHeight+this.paddingHeight,"px")}}var s=i;e.default=s}}));
//# sourceMappingURL=autosize.es.js.map