1import{p as y,$ as g,j as v,Z as x,r as h,a0 as d,P as B,X as b,y as k,s as E,a2 as D,v as I,_ as S}from"./chunk-ui-components-ChoiTxfw.js";const C=()=>({setCaretAtEnd:o=>{const l=o.value.length;typeof o.selectionStart=="number"&&typeof o.selectionEnd=="number"&&(o.selectionStart=l,o.selectionEnd=l,o.focus())}}),K=["disabled","placeholder","type","name","autocomplete","inputmode","maxlength"],M=y({__name:"input-text",props:g({disabled:{type:Boolean},placeholder:{},sm:{type:Boolean},m:{type:Boolean},l:{type:Boolean},type:{default:"text"},digitsOnly:{type:Boolean},maxlength:{},name:{},autocomplete:{}},{value:{required:!0},valueModifiers:{},focused:{type:Boolean,default:!1},focusedModifiers:{}}),emits:["update:value","update:focused"],setup(t,{expose:o}){const l=t,{setCaretAtEnd:r}=C(),m=v(()=>l.autocomplete||x(l.name)),s=h(null),u=d(t,"value"),i=d(t,"focused"),c=n=>{let e=String(n);l.digitsOnly&&(e=e.replace(/\D/g,"")),l.maxlength&&e.length>l.maxlength&&(e=e.slice(0,l.maxlength)),e!==String(n)&&(u.value=e)},f=()=>{},p=n=>{if(n.key.length!==1||n.ctrlKey||n.metaKey)return;if(l.digitsOnly&&!/\d/.test(n.key)){n.preventDefault();return}const e=n.target;l.maxlength&&String(u.value??"").length>=l.maxlength&&e.selectionStart===e.selectionEnd&&n.preventDefault()};return o({focus:n=>{s.value&&s.value.focus&&(n&&n.end?r(s.value):s.value.focus())}}),(n,e)=>B((E(),k("input",{class:I({_sm:t.sm,_m:t.m,_l:t.l}),ref_key:"input",ref:s,"onUpdate:modelValue":e[0]||(e[0]=a=>u.value=a),disabled:t.disabled,placeholder:t.placeholder,type:t.type,name:t.name,autocomplete:m.value,inputmode:t.digitsOnly?"numeric":void 0,maxlength:t.digitsOnly?void 0:t.maxlength,onInput:e[1]||(e[1]=a=>c(u.value)),onFocus:e[2]||(e[2]=a=>i.value=!0),onBlur:e[3]||(e[3]=a=>i.value=!1),onKeydown:[e[4]||(e[4]=a=>p(a)),e[5]||(e[5]=D(a=>f(),["delete"]))]},null,42,K)),[[b,u.value]])}}),A=S(M,[["__scopeId","data-v-6a913b21"]]);export{A as I};
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.