"use strict";const t=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"];let e;exports.calculateNodeHeight=function(i,r=null,n=null){e||(e=document.createElement("textarea"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),document.body.appendChild(e)),i.getAttribute("wrap")?e.setAttribute("wrap",i.getAttribute("wrap")):e.removeAttribute("wrap");const{paddingSize:o,borderSize:a,boxSizing:l,sizingStyle:p}=function(e){const i=window.getComputedStyle(e),r=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),n=(parseFloat(i.getPropertyValue("padding-top"))||0)+(parseFloat(i.getPropertyValue("padding-bottom"))||0),o=(parseFloat(i.getPropertyValue("border-bottom-width"))||0)+(parseFloat(i.getPropertyValue("border-top-width"))||0);return{sizingStyle:t.map(t=>`${t}:${i.getPropertyValue(t)}`).join(";"),paddingSize:n,borderSize:o,boxSizing:r}}(i);e.setAttribute("style",`${p};\n    min-height:0 !important;\n    max-height:none !important;\n    height:0 !important;\n    visibility:hidden !important;\n    position:absolute !important;\n    overflow:hidden !important;\n    z-index:-1000 !important;\n    top:0 !important;\n    right:0 !important;\n`),e.value=i.value||i.placeholder||"";let d=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,g=parseFloat(e.scrollHeight);if("border-box"===l?g+=a:"content-box"===l&&(g-=o),null!==r||null!==n){e.value=" ";const t=e.scrollHeight-o;null!==r&&(d=t*r,"border-box"===l&&(d=d+o+a),g=d>g?d:g),null!==n&&(u=t*n,"border-box"===l&&(u=u+o+a),g=u<g?u:g)}return`height: ${g}px; min-height: ${d}px; max-height: ${u}px; overflow-y: ${g<u?"hidden":"unset"}`},exports.isEmptyObject=function(t){if(null==t||"object"!=typeof t)return!1;for(const e in t)return!1;return!0},exports.isEmptyString=function(t){return null==t||"string"==typeof t&&""===t.trim()};
