import{o as e}from"./request-DWqS4XYU.js";import{Ct as t,Hn as n,Pr as r,Q as i,Wn as a,Z as o,at as s,mr as c,p as ee,u as te,wt as l,yt as u}from"./jsx-runtime-Dk2XcqH2.js";import{f as d,m as f,p}from"./tooltip-Up9y7xD6.js";import{a as m,o as h}from"./style-DRVsp3wL.js";import{r as g,t as _}from"./es-Hs1QDgUQ.js";var v=e(r());function y(e,t){let n=(0,v.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,v.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[t]),r}function ne(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var b=(0,v.forwardRef)((e,r)=>{let{prefixCls:b,bordered:re=!0,status:ie,size:ae,disabled:oe,onBlur:se,onFocus:ce,suffix:x,allowClear:S,addonAfter:C,addonBefore:w,className:T,style:E,styles:D,rootClassName:O,onChange:k,classNames:A,variant:j,...M}=e,{getPrefixCls:N,direction:P,allowClear:F,autoComplete:I,className:L,style:R,classNames:z,styles:B}=n(`input`),V=N(`input`,b),H=(0,v.useRef)(null),U=u(V),[W,le]=h(V,O);m(V,U);let{compactSize:ue,compactItemClassnames:de}=o(V,P),G=i(e=>ae??ue??e),fe=v.useContext(s),K=oe??fe,pe={...e,size:G,disabled:K},me=l(R),he=l(E),[q,J]=t([z,A],[B,me,D,he],{props:pe}),{status:ge,hasFeedback:Y,feedbackIcon:_e}=(0,v.useContext)(ee),X=d(ge,ie),ve=ne(e)||!!Y;(0,v.useRef)(ve);let Z=y(H,!0),ye=e=>{Z(),se?.(e)},be=e=>{Z(),ce?.(e)},xe=e=>{Z(),k?.(e)},Se=(Y||x)&&v.createElement(v.Fragment,null,x,Y&&_e),Ce=g({allowClear:S,contextAllowClear:F,componentName:`Input`}),[Q,$]=te(`input`,j,re);return v.createElement(_,{ref:c(r,H),prefixCls:V,autoComplete:I,...M,disabled:K,onBlur:ye,onFocus:be,style:J.root,styles:J,suffix:Se,allowClear:Ce,className:a(T,O,le,U,de,L,q.root),onChange:xe,addonBefore:w&&v.createElement(f,{form:!0,space:!0},w),addonAfter:C&&v.createElement(f,{form:!0,space:!0},C),classNames:{...q,input:a({[`${V}-sm`]:G===`small`,[`${V}-lg`]:G===`large`,[`${V}-rtl`]:P===`rtl`},q.input,W),variant:a({[`${V}-${Q}`]:$},p(V,X)),affixWrapper:a({[`${V}-affix-wrapper-sm`]:G===`small`,[`${V}-affix-wrapper-lg`]:G===`large`,[`${V}-affix-wrapper-rtl`]:P===`rtl`},W),wrapper:a({[`${V}-group-rtl`]:P===`rtl`},W),groupWrapper:a({[`${V}-group-wrapper-sm`]:G===`small`,[`${V}-group-wrapper-lg`]:G===`large`,[`${V}-group-wrapper-rtl`]:P===`rtl`,[`${V}-group-wrapper-${Q}`]:$},p(`${V}-group-wrapper`,X,Y),W)}})});export{y as n,b as t};