System.register(["./vendor-legacy.046e8265.js"],(function(e){"use strict";var t,r,n;return{setters:[function(e){t=e.r,r=e.a6,n=e.a7}],execute:function(){var o=t.exports.useLayoutEffect,i=function(e,t){"function"!=typeof e?e.current=t:e(t)},a={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},u=function(e){Object.keys(a).forEach((function(t){e.style.setProperty(t,a[t],"important")}))},d=null,s=function(){},c=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],l=!!document.documentElement.currentStyle,f=function(e){var r,n,i=(r=e,n=t.exports.useRef(r),o((function(){n.current=r})),n);t.exports.useLayoutEffect((function(){var e=function(e){i.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[])},p=function(e,o){var a=e.cacheMeasurements,p=e.maxRows,h=e.minRows,g=e.onChange,x=void 0===g?s:g,b=e.onHeightChange,v=void 0===b?s:b,m=r(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),y=void 0!==m.value,S=t.exports.useRef(null),z=function(e,r){var n=t.exports.useRef();return t.exports.useCallback((function(t){e.current=t,n.current&&i(n.current,null),n.current=r,r&&i(r,t)}),[r])}(S,o),w=t.exports.useRef(0),R=t.exports.useRef(),E=function(){var e=S.current,t=a&&R.current?R.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var r,n=(r=t,c.reduce((function(e,t){return e[t]=r[t],e}),{})),o=n.boxSizing;return""===o?null:(l&&"border-box"===o&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px"),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})}(e);if(t){R.current=t;var r=function(e,t,r,n){void 0===r&&(r=1),void 0===n&&(n=1/0),d||((d=document.createElement("textarea")).setAttribute("tabindex","-1"),d.setAttribute("aria-hidden","true"),u(d)),null===d.parentNode&&document.body.appendChild(d);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach((function(e){var t=e;d.style[t]=a[t]})),u(d),d.value=t;var c=function(e,t){var r=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?r+t.borderSize:r-t.paddingSize}(d,e);d.value="x";var l=d.scrollHeight-o,f=l*r;"border-box"===s&&(f=f+o+i),c=Math.max(f,c);var p=l*n;return"border-box"===s&&(p=p+o+i),[c=Math.min(p,c),l]}(t,e.value||e.placeholder||"x",h,p),n=r[0],o=r[1];w.current!==n&&(w.current=n,e.style.setProperty("height",n+"px","important"),v(n,{rowHeight:o}))}};return t.exports.useLayoutEffect(E),f(E),t.exports.createElement("textarea",n({},m,{onChange:function(e){y||E(),x(e)},ref:z}))};e("T",t.exports.forwardRef(p))}}}));
