Files
Nexus/web/app/assets/VTextarea-e3IBt4Ay.js
T
Your Name 51948469c2 build(frontend): track Vite output in Git for Gitea deploy
- Stop ignoring web/app/index.html and web/app/assets/
- Bundle index-DBKIQT7H.js from current vite build (~101MB assets)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 00:52:44 +08:00

1 line
5.1 KiB
JavaScript

import{$n as e,Gn as t,Jt as n,Kn as r,Nn as i,Or as a,Vn as o,Zt as s,_n as c,_r as l,a as u,ar as d,br as f,cr as p,d as m,en as h,f as g,g as _,gn as v,gt as y,hr as b,i as x,ir as S,mr as C,o as w,on as T,or as ee,p as E,pn as D,qn as O,r as k,s as A,un as j,xn as M,xr as N,y as P}from"./index-ngtHwr8t.js";var F=j({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...x(),...i(A(),[`direction`]),...g()},`VTextarea`),I=T()({name:`VTextarea`,directives:{vIntersect:y},inheritAttrs:!1,props:F(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(i,{attrs:g,emit:x,slots:T}){let A=s(i,`modelValue`),{isFocused:j,focus:F,blur:I}=E(i),{onIntersect:L}=k(i),R=r(()=>typeof i.counterValue==`function`?i.counterValue(A.value):(A.value||``).toString().length),z=r(()=>{if(g.maxlength)return g.maxlength;if(!(!i.counter||typeof i.counter!=`number`&&typeof i.counter!=`string`))return i.counter}),B=f(),V=f(),H=N(``),U=f(),W=f(0),{platform:G}=n(),K=u(i),q=r(()=>i.persistentPlaceholder||j.value||i.active);function J(){K.isSuppressing.value&&K.update(),U.value!==document.activeElement&&U.value?.focus(),j.value||F()}function te(e){J(),x(`click:control`,e)}function ne(e){x(`mousedown:control`,e)}function re(e){e.stopPropagation(),J(),d(()=>{A.value=``,D(i[`onClick:clear`],e)})}function ie(e){let t=e.target;if(!i.modelModifiers?.trim){A.value=t.value;return}let n=t.value,r=t.selectionStart,a=t.selectionEnd;A.value=n,d(()=>{let e=0;n.trimStart().length===t.value.length&&(e=n.length-t.value.length),r!=null&&(t.selectionStart=r-e),a!=null&&(t.selectionEnd=a-e)})}let Y=f(),X=f(Number(i.rows)),Z=r(()=>[`plain`,`underlined`].includes(i.variant));b(()=>{i.autoGrow||(X.value=Number(i.rows))});function Q(){d(()=>{if(!U.value)return;if(G.value.firefox){W.value=12;return}let{offsetWidth:e,clientWidth:t}=U.value;W.value=Math.max(0,e-t)}),i.autoGrow&&d(()=>{if(!Y.value||!V.value)return;let e=getComputedStyle(Y.value),t=getComputedStyle(V.value.$el),n=parseFloat(e.getPropertyValue(`--v-field-padding-top`))+parseFloat(e.getPropertyValue(`--v-input-padding-top`))+parseFloat(e.getPropertyValue(`--v-field-padding-bottom`)),r=Y.value.scrollHeight,a=parseFloat(e.lineHeight),o=Math.max(parseFloat(i.rows)*a+n,parseFloat(t.getPropertyValue(`--v-input-control-height`))),s=i.maxHeight?parseFloat(i.maxHeight):parseFloat(i.maxRows)*a+n||1/0,l=v(r??0,o,s);X.value=Math.floor((l-n)/a),H.value=c(l)})}p(Q),C(A,Q),C(()=>i.rows,Q),C(()=>i.maxHeight,Q),C(()=>i.maxRows,Q),C(()=>i.density,Q),C(X,e=>{x(`update:rows`,e)});let $;return C(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),ee(()=>{$?.disconnect()}),h(()=>{let n=!!(T.counter||i.counter||i.counterValue),r=!!(n||T.details),[s,u]=M(g),{modelValue:d,...f}=w.filterProps(i),p={...m.filterProps(i),"onClick:clear":re};return e(w,S({ref:B,modelValue:A.value,"onUpdate:modelValue":e=>A.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":i.prefix,"v-textarea--suffixed":i.suffix,"v-text-field--prefixed":i.prefix,"v-text-field--suffixed":i.suffix,"v-textarea--auto-grow":i.autoGrow,"v-textarea--no-resize":i.noResize||i.autoGrow,"v-input--plain-underlined":Z.value},i.class],style:[{"--v-textarea-max-height":i.maxHeight?c(i.maxHeight):void 0,"--v-textarea-scroll-bar-width":c(W.value)},i.style]},s,f,{centerAffix:X.value===1&&!Z.value,focused:j.value,indentDetails:i.indentDetails??!Z.value}),{...T,default:({id:n,isDisabled:r,isDirty:s,isReadonly:c,isValid:d,hasDetails:f})=>e(m,S({ref:V,style:{"--v-textarea-control-height":H.value},onClick:te,onMousedown:ne,"onClick:prependInner":i[`onClick:prependInner`],"onClick:appendInner":i[`onClick:appendInner`]},p,{id:n.value,active:q.value||s.value,labelId:`${n.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:s.value||i.dirty,disabled:r.value,focused:j.value,details:f.value,error:d.value===!1}),{...T,default:({props:{class:e,...s},controlRef:d})=>O(t,null,[i.prefix&&O(`span`,{class:`v-text-field__prefix`},[i.prefix]),l(O(`textarea`,S({ref:e=>U.value=d.value=e,class:e,value:A.value,onInput:ie,autofocus:i.autofocus,readonly:c.value,disabled:r.value,placeholder:i.placeholder,rows:i.rows,name:K.fieldName.value,autocomplete:K.fieldAutocomplete.value,onFocus:J,onBlur:I,"aria-labelledby":`${n.value}-label`},s,u),null),[[y,{handler:L},null,{once:!0}]]),i.autoGrow&&l(O(`textarea`,{class:a([e,`v-textarea__sizer`]),id:`${s.id}-sizer`,"onUpdate:modelValue":e=>A.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[o,A.value]]),i.suffix&&O(`span`,{class:`v-text-field__suffix`},[i.suffix])])}),details:r?r=>O(t,null,[T.details?.(r),n&&O(t,null,[O(`span`,null,null),e(_,{active:i.persistentCounter||j.value,value:R.value,max:z.value,disabled:i.disabled},T.counter)])]):void 0})}),P({},B,V,U)}});export{I as t};