1import{ak as Ie,a0 as p,Z as Ke,a2 as he,J,e as Ee,bE as je,ao as Ue,M as ge,_ as Z,r as _,bu as We,j as q,U as F,i as Ye,bg as Xe,o as c,c as b,y as f,F as G,n as m,k as t,N as D,a as N,q as S,w as M,X as K,O as ye,b as Je,Y as Ze,am as _e,t as j,x as be,K as xe}from"./BGlDKhZQ.js";import{A as qe,U as ee,B as Ge,p as Qe,C as et,l as we}from"./BFHqjCO8.js";import{H as tt,g as ot,u as at,h as Q,i as Se,J as nt,K as st,I as lt,M as it,V as rt,N as ut,O as dt,a as B,F as ct,_ as pt,w as ft}from"./Cj7yihxl.js";import{m as vt}from"./Bp3YSIOJ.js";const mt=()=>Ie&&/firefox/i.test(window.navigator.userAgent),ht=["class","style"],gt=/^on[A-Z]/,yt=(a={})=>{const{excludeListeners:v=!1,excludeKeys:r}=a,o=p(()=>((r==null?void 0:r.value)||[]).concat(ht)),i=Ke();return i?p(()=>{var u;return tt(Object.entries((u=i.proxy)==null?void 0:u.$attrs).filter(([s])=>!o.value.includes(s)&&!(v&>.test(s))))}):p(()=>({}))};function bt(a){let v;function r(){if(a.value==null)return;const{selectionStart:i,selectionEnd:u,value:s}=a.value;if(i==null||u==null)return;const x=s.slice(0,Math.max(0,i)),d=s.slice(Math.max(0,u));v={selectionStart:i,selectionEnd:u,value:s,beforeTxt:x,afterTxt:d}}function o(){if(a.value==null||v==null)return;const{value:i}=a.value,{beforeTxt:u,afterTxt:s,selectionStart:x}=v;if(u==null||s==null||x==null)return;let d=i.length;if(i.endsWith(s))d=i.length-s.length;else if(i.startsWith(u))d=u.length;else{const C=u[x-1],h=i.indexOf(C,x-1);h!==-1&&(d=h+1)}a.value.setSelectionRange(d,d)}return[r,o]}let y;const xt=` 2 height:0 !important; 3 visibility:hidden !important; 4 ${mt()?"":"overflow:hidden !important;"} 5 position:absolute !important; 6 z-index:-1000 !important; 7 top:0 !important; 8 right:0 !important; 9`,wt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function St(a){const v=window.getComputedStyle(a),r=v.getPropertyValue("box-sizing"),o=Number.parseFloat(v.getPropertyValue("padding-bottom"))+Number.parseFloat(v.getPropertyValue("padding-top")),i=Number.parseFloat(v.getPropertyValue("border-bottom-width"))+Number.parseFloat(v.getPropertyValue("border-top-width"));return{contextStyle:wt.map(s=>`${s}:${v.getPropertyValue(s)}`).join(";"),paddingSize:o,borderSize:i,boxSizing:r}}function Ce(a,v=1,r){var o;y||(y=document.createElement("textarea"),document.body.appendChild(y));const{paddingSize:i,borderSize:u,boxSizing:s,contextStyle:x}=St(a);y.setAttribute("style",`${x};${xt}`),y.value=a.value||a.placeholder||"";let d=y.scrollHeight;const C={};s==="border-box"?d=d+u:s==="content-box"&&(d=d-i),y.value="";const h=y.scrollHeight-i;if(he(v)){let g=h*v;s==="border-box"&&(g=g+i+u),d=Math.max(g,d),C.minHeight=`${g}px`}if(he(r)){let g=h*r;s==="border-box"&&(g=g+i+u),d=Math.min(g,d)}return C.height=`${d}px`,(o=y.parentNode)==null||o.removeChild(y),y=void 0,C}const Ct=ot({id:{type:String,default:void 0},size:at,disabled:Boolean,modelValue:{type:Q([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Q([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:Se},prefixIcon:{type:Se},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Q([Object,Array,String]),default:()=>vt({})},autofocus:Boolean,rows:{type:Number,default:2},...qe(["ariaLabel"])}),It={[ee]:a=>J(a),input:a=>J(a),change:a=>J(a),focus:a=>a instanceof FocusEvent,blur:a=>a instanceof FocusEvent,clear:()=>!0,mouseleave:a=>a instanceof MouseEvent,mouseenter:a=>a instanceof MouseEvent,keydown:a=>a instanceof Event,compositionstart:a=>a instanceof CompositionEvent,compositionupdate:a=>a instanceof CompositionEvent,compositionend:a=>a instanceof CompositionEvent},Et=Ee({name:"ElInput",inheritAttrs:!1}),zt=Ee({...Et,props:Ct,emits:It,setup(a,{expose:v,emit:r}){const o=a,i=je(),u=yt(),s=Ue(),x=p(()=>[o.type==="textarea"?te.b():n.b(),n.m(ze.value),n.is("disabled",E.value),n.is("exceed",Te.value),{[n.b("group")]:s.prepend||s.append,[n.m("prefix")]:s.prefix||o.prefixIcon,[n.m("suffix")]:s.suffix||o.suffixIcon||o.clearable||o.showPassword,[n.bm("suffix","password-clear")]:A.value&&W.value,[n.b("hidden")]:o.type==="hidden"},i.class]),d=p(()=>[n.e("wrapper"),n.is("focus",H.value)]),{form:C,formItem:h}
9=nt(),{inputId:g}=st(o,{formItemContext:h}),ze=lt(),E=it(),n=ge("input"),te=ge("textarea"),R=Z(),w=Z(),U=_(!1),L=_(!1),oe=_(),O=Z(o.inputStyle),z=p(()=>R.value||w.value),{wrapperRef:Pe,isFocused:H,handleFocus:ke,handleBlur:Fe}=Ge(z,{beforeFocus(){return E.value},afterBlur(){var e;o.validateEvent&&((e=h==null?void 0:h.validate)==null||e.call(h,"blur").catch(l=>we()))}}),ae=p(()=>{var e;return(e=C==null?void 0:C.statusIcon)!=null?e:!1}),V=p(()=>(h==null?void 0:h.validateState)||""),ne=p(()=>V.value&&rt[V.value]),Ne=p(()=>L.value?ut:dt),Ve=p(()=>[i.style]),se=p(()=>[o.inputStyle,O.value,{resize:o.resize}]),I=p(()=>We(o.modelValue)?"":String(o.modelValue)),A=p(()=>o.clearable&&!E.value&&!o.readonly&&!!I.value&&(H.value||U.value)),W=p(()=>o.showPassword&&!E.value&&!!I.value&&(!!I.value||H.value)),P=p(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!E.value&&!o.readonly&&!o.showPassword),Y=p(()=>I.value.length),Te=p(()=>!!P.value&&Y.value>Number(o.maxlength)),$e=p(()=>!!s.suffix||!!o.suffixIcon||A.value||o.showPassword||P.value||!!V.value&&ae.value),[Me,Be]=bt(R);Qe(w,e=>{if(Re(),!P.value||o.resize!=="both")return;const l=e[0],{width:k}=l.contentRect;oe.value={right:`calc(100% - ${k+15+6}px)`}});const T=()=>{const{type:e,autosize:l}=o;if(!(!Ie||e!=="textarea"||!w.value))if(l){const k=xe(l)?l.minRows:void 0,ve=xe(l)?l.maxRows:void 0,me=Ce(w.value,k,ve);O.value={overflowY:"hidden",...me},F(()=>{w.value.offsetHeight,O.value=me})}else O.value={minHeight:Ce(w.value).minHeight}},Re=(e=>{let l=!1;return()=>{var k;if(l||!o.autosize)return;((k=w.value)==null?void 0:k.offsetParent)===null||(e(),l=!0)}})(T),$=()=>{const e=z.value,l=o.formatter?o.formatter(I.value):I.value;!e||e.value===l||(e.value=l)},X=async e=>{Me();let{value:l}=e.target;if(o.formatter&&(l=o.parser?o.parser(l):l),!ie.value){if(l===I.value){$();return}r(ee,l),r("input",l),await F(),$(),Be()}},le=e=>{r("change",e.target.value)},{isComposing:ie,handleCompositionStart:re,handleCompositionUpdate:ue,handleCompositionEnd:de}=et({emit:r,afterComposition:X}),Le=()=>{L.value=!L.value,ce()},ce=async()=>{var e;await F(),(e=z.value)==null||e.focus()},Oe=()=>{var e;return(e=z.value)==null?void 0:e.blur()},He=e=>{U.value=!1,r("mouseleave",e)},Ae=e=>{U.value=!0,r("mouseenter",e)},pe=e=>{r("keydown",e)},De=()=>{var e;(e=z.value)==null||e.select()},fe=()=>{r(ee,""),r("change",""),r("clear"),r("input","")};return q(()=>o.modelValue,()=>{var e;F(()=>T()),o.validateEvent&&((e=h==null?void 0:h.validate)==null||e.call(h,"change").catch(l=>we()))}),q(I,()=>$()),q(()=>o.type,async()=>{await F(),$(),T()}),Ye(()=>{!o.formatter&&o.parser,$(),F(T)}),v({input:R,textarea:w,ref:z,textareaStyle:se,autosize:Xe(o,"autosize"),isComposing:ie,focus:ce,blur:Oe,select:De,clear:fe,resizeTextarea:T}),(e,l)=>(c(),b("div",{class:m([t(x),{[t(n).bm("group","append")]:e.$slots.append,[t(n).bm("group","prepend")]:e.$slots.prepend}]),style:be(t(Ve)),onMouseenter:Ae,onMouseleave:He},[f(" input "),e.type!=="textarea"?(c(),b(G,{key:0},[f(" prepend slot "),e.$slots.prepend?(c(),b("div",{key:0,class:m(t(n).be("group","prepend"))},[D(e.$slots,"prepend")],2)):f("v-if",!0),N("div",{ref_key:"wrapperRef",ref:Pe,class:m(t(d))},[f(" prefix slot "),e.$slots.prefix||e.prefixIcon?(c(),b("span",{key:0,class:m(t(n).e("prefix"))},[N("span",{class:m(t(n).e("prefix-inner"))},[D(e.$slots,"prefix"),e.prefixIcon?(c(),S(t(B),{key:0,class:m(t(n).e("icon"))},{default:M(()=>[(c(),S(K(e.prefixIcon)))]),_:1},8,["class"])):f("v-if",!0)],2)],2)):f("v-if",!0),N("input",ye({id:t(g),ref_key:"input",ref:R,class:t(n).e("inner")},t(u),{minlength:e.minlength,maxlength:e.maxlength,type:e.showPassword?L.value?"text":"password":e.type,disabled:t(E),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-label":e.ariaLabel,placeholder:e.placeholder,style:e.inputStyle,form:e.form,autofocus:e.autofocus,role:e.containerRole,onCompositionstart:t(re),onCompositionupdate:t(ue),onCompositionend:t(de),onInput:X,onChange:le,onKeydown:pe}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),f(" suffix slot "),t($e)?(c(),b("span",{key:1,class:m(t(n).e("suffix"))},[N("span",{class:m(t(n).e("suffix-inner"))},[!t(A)||!t(W)||!t(P)?(c(),b(G,{key:0},[D(e.$slots,"suffix"),e.suffixIcon?(c(),S(t(B),{key:0,class:m(t(n).e("icon"))},{default:M(()=>[(c(),S(K(e.suffixIcon)))]),_:1},8,["class"])):f("v-if",!0)],64)):f("v-if",!0),t(A)?(c(),S(t(B),{key:1,class:m([t(n).e("icon"),t(n).e("clear")]),onMousedown:Ze(t(_e),["prevent"]),onClick:fe},{default:M(()=>[Je(t(ct))]),_:1},8,["class","onMousedown"])):f("v-if",!0),t(W)?(c(),S(t(B),{key:2,class:m([t(n).e("icon"),t(n).e("password")]),onClick:Le},{default:M(()=>[(c(),S(K(t(Ne))))]),_:1},8,["class"])):f("v-if",!0),t(P)?(c(),b("span",{key:3,class:m(t(n).e("count"))},[N("span",{class:m(t(n).e("count-inner"))},j(t(Y))+" / "+j(e.maxlength),3)],2)):f("v-if",!0),t(V)&&t(ne)&&t(ae)?(c(),S(t(B),{key:4,class:m([t(n).e("icon"),t(n).e("validateIcon"),t(n).is("loading",t(V)==="validating")])},{default:M(()=>[(c(),S(K(t(ne))))]),_:1},8,["class"])):f("v-if",!0)],2)],2)):f("v-if",!0)],2),f(" append slot "),e.$slots.append?(c(),b("div",{key:1,class:m(t(n).be("group","append"))},[D(e.$slots,"append")],2)):f("v-if",!0)],64)):(c(),b(G,{key:1},[f(" textarea "),N("textarea",ye({id:t(g),ref_key:"textarea",ref:w,class:[t(te).e("inner"),t(n).is("focus",t(H))]},t(u),{minlength:e.minlength,maxlength:e.maxlength,tabindex:e.tabindex,disabled:t(E),readonly:e.readonly,autocomplete:e.autocomplete,style:t(se),"aria-label":e.ariaLabel,placeholder:e.placeholder,form:e.form,autofocus:e.autofocus,rows:e.rows,role:e.containerRole,onCompositionstart:t(re),onCompositionupdate:t(ue),onCompositionend:t(de),onInput:X,onFocus:t(ke),onBlur:t(Fe),onChange:le,onKeydown:pe}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),t(P)?(c(),b("span",{key:0,style:be(oe.value),class:m(t(n).e("count"))},j(t(Y))+" / "+j(e.maxlength),7)):f("v-if",!0)],64))],38))}});var Pt=pt(zt,[["__file","input.vue"]]);const $t=ft(Pt);export{$t as E};
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.