1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6220],{6220:function(e,t,n){n.r(t),n.d(t,{ResizableTextArea:function(){return C},default:function(){return E}});var a,o=n(45929),r=n(75621),i=n(17816),l=n(12686),u=n(50155),s=n(17039),d=n(82187),c=n.n(d),f=n(29418),p=n(89976),m=n(44713),g=n(93954),v=n(75271),h=n(79869),b=n(68050),x=n(92076),y=n(49975),w=["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","white-space"],z={},Z=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],C=v.forwardRef(function(e,t){var n=e.prefixCls,l=e.defaultValue,d=e.value,f=e.autoSize,p=e.onResize,m=e.className,C=e.style,S=e.disabled,E=e.onChange,A=(e.onInternalAutoSize,(0,s.Z)(e,Z)),R=(0,g.Z)(l,{value:d,postState:function(e){return null!=e?e:""}}),N=(0,u.Z)(R,2),V=N[0],F=N[1],P=v.useRef();v.useImperativeHandle(t,function(){return{textArea:P.current}});var k=v.useMemo(function(){return f&&"object"===(0,h.Z)(f)?[f.minRows,f.maxRows]:[]},[f]),H=(0,u.Z)(k,2),I=H[0],T=H[1],B=!!f,L=v.useState(2),O=(0,u.Z)(L,2),_=O[0],D=O[1],K=v.useState(),M=(0,u.Z)(K,2),W=M[0],j=M[1],J=function(){D(0)};(0,x.Z)(function(){B&&J()},[d,I,T,B]),(0,x.Z)(function(){if(0===_)D(1);else if(1===_){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;a||((a=document.createElement("textarea")).setAttribute("tab-index","-1"),a.setAttribute("aria-hidden","true"),a.setAttribute("name","hiddenTextarea"),document.body.appendChild(a)),e.getAttribute("wrap")?a.setAttribute("wrap",e.getAttribute("wrap")):a.removeAttribute("wrap");var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&z[n])return z[n];var a=window.getComputedStyle(e),o=a.getPropertyValue("box-sizing")||a.getPropertyValue("-moz-box-sizing")||a.getPropertyValue("-webkit-box-sizing"),r=parseFloat(a.getPropertyValue("padding-bottom"))+parseFloat(a.getPropertyValue("padding-top")),i=parseFloat(a.getPropertyValue("border-bottom-width"))+parseFloat(a.getPropertyValue("border-top-width")),l={sizingStyle:w.map(function(e){return"".concat(e,":").concat(a.getPropertyValue(e))}).join(";"),paddingSize:r,borderSize:i,boxSizing:o};return t&&n&&(z[n]=l),l}(e,n),l=i.paddingSize,u=i.borderSize,s=i.boxSizing,d=i.sizingStyle;a.setAttribute("style","".concat(d,";").concat("\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n")),a.value=e.value||e.placeholder||"";var c=void 0,f=void 0,p=a.scrollHeight;if("border-box"===s?p+=u:"content-box"===s&&(p-=l),null!==o||null!==r){a.value=" ";var m=a.scrollHeight-l;null!==o&&(c=m*o,"border-box"===s&&(c=c+l+u),p=Math.max(c,p)),null!==r&&(f=m*r,"border-box"===s&&(f=f+l+u),t=p>f?"":"hidden",p=Math.min(f,p))}var g={height:p,overflowY:t,resize:"none"};return c&&(g.minHeight=c),f&&(g.maxHeight=f),g}(P.current,!1,I,T);D(2),j(e)}},[_]);var Y=v.useRef(),X=function(){y.Z.cancel(Y.current)};v.useEffect(function(){return X},[]);var q=(0,i.Z)((0,i.Z)({},C),B?W:null);return(0===_||1===_)&&(q.overflowY="hidden",q.overflowX="hidden"),v.createElement(b.default,{onResize:function(e){2===_&&(null==p||p(e),f&&(X(),Y.current=(0,y.Z)(function(){J()})))},disabled:!(f||p)},v.createElement("textarea",(0,o.Z)({},A,{ref:P,style:q,className:c()(n,m,(0,r.Z)({},"".concat(n,"-disabled"),S)),disabled:S,value:V,onChange:function(e){F(e.target.value),null==E||E(e)}})))}),S=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],E=v.forwardRef(function(e,t){var n,a,d=e.defaultValue,h=e.value,b=e.onFocus,x=e.onBlur,y=e.onCh
1ange,w=e.allowClear,z=e.maxLength,Z=e.onCompositionStart,E=e.onCompositionEnd,A=e.suffix,R=e.prefixCls,N=void 0===R?"rc-textarea":R,V=e.showCount,F=e.count,P=e.className,k=e.style,H=e.disabled,I=e.hidden,T=e.classNames,B=e.styles,L=e.onResize,O=e.onClear,_=e.onPressEnter,D=e.readOnly,K=e.autoSize,M=e.onKeyDown,W=(0,s.Z)(e,S),j=(0,g.Z)(d,{value:h,defaultValue:d}),J=(0,u.Z)(j,2),Y=J[0],X=J[1],q=null==Y?"":String(Y),G=v.useState(!1),Q=(0,u.Z)(G,2),U=Q[0],$=Q[1],ee=v.useRef(!1),et=v.useState(null),en=(0,u.Z)(et,2),ea=en[0],eo=en[1],er=(0,v.useRef)(null),ei=(0,v.useRef)(null),el=function(){var e;return null===(e=ei.current)||void 0===e?void 0:e.textArea},eu=function(){el().focus()};(0,v.useImperativeHandle)(t,function(){var e;return{resizableTextArea:ei.current,focus:eu,blur:function(){el().blur()},nativeElement:(null===(e=er.current)||void 0===e?void 0:e.nativeElement)||el()}}),(0,v.useEffect)(function(){$(function(e){return!H&&e})},[H]);var es=v.useState(null),ed=(0,u.Z)(es,2),ec=ed[0],ef=ed[1];v.useEffect(function(){if(ec){var e;(e=el()).setSelectionRange.apply(e,(0,l.Z)(ec))}},[ec]);var ep=(0,p.Z)(F,V),em=null!==(n=ep.max)&&void 0!==n?n:z,eg=Number(em)>0,ev=ep.strategy(q),eh=!!em&&ev>em,eb=function(e,t){var n=t;!ee.current&&ep.exceedFormatter&&ep.max&&ep.strategy(t)>ep.max&&(n=ep.exceedFormatter(t,{max:ep.max}),t!==n&&ef([el().selectionStart||0,el().selectionEnd||0])),X(n),(0,m.rJ)(e.currentTarget,e,y,n)},ex=A;ep.show&&(a=ep.showFormatter?ep.showFormatter({value:q,count:ev,maxLength:em}):"".concat(ev).concat(eg?" / ".concat(em):""),ex=v.createElement(v.Fragment,null,ex,v.createElement("span",{className:c()("".concat(N,"-data-count"),null==T?void 0:T.count),style:null==B?void 0:B.count},a)));var ey=!K&&!V&&!w;return v.createElement(f.BaseInput,{ref:er,value:q,allowClear:w,handleReset:function(e){X(""),eu(),(0,m.rJ)(el(),e,y)},suffix:ex,prefixCls:N,classNames:(0,i.Z)((0,i.Z)({},T),{},{affixWrapper:c()(null==T?void 0:T.affixWrapper,(0,r.Z)((0,r.Z)({},"".concat(N,"-show-count"),V),"".concat(N,"-textarea-allow-clear"),w))}),disabled:H,focused:U,className:c()(P,eh&&"".concat(N,"-out-of-range")),style:(0,i.Z)((0,i.Z)({},k),ea&&!ey?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"==typeof a?a:void 0}},hidden:I,readOnly:D,onClear:O},v.createElement(C,(0,o.Z)({},W,{autoSize:K,maxLength:z,onKeyDown:function(e){"Enter"===e.key&&_&&_(e),null==M||M(e)},onChange:function(e){eb(e,e.target.value)},onFocus:function(e){$(!0),null==b||b(e)},onBlur:function(e){$(!1),null==x||x(e)},onCompositionStart:function(e){ee.current=!0,null==Z||Z(e)},onCompositionEnd:function(e){ee.current=!1,eb(e,e.currentTarget.value),null==E||E(e)},className:c()(null==T?void 0:T.textarea),style:(0,i.Z)((0,i.Z)({},null==B?void 0:B.textarea),{},{resize:null==k?void 0:k.resize}),disabled:H,prefixCls:N,onResize:function(e){var t;null==L||L(e),null!==(t=el())&&void 0!==t&&t.style.height&&eo(!0)},ref:ei,readOnly:D})))})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.