Files
Nexus/web/app/assets/VTextarea-D3xpPDjq.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{$t as e,Bn as t,Gn as n,Kn as r,Mn as i,Or as a,Qn as o,Wn as s,Xt as c,_r as l,a as u,an as d,ar as f,bn as p,br as m,d as h,f as g,fn as _,g as v,gn as y,gt as b,hn as x,hr as ee,i as S,ir as C,ln as w,mr as T,o as E,p as te,qt as D,r as O,rr as k,s as A,sr as j,xr as M,y as N}from"./index-DViYxL_s.js";var P=w({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,...S(),...i(A(),[`direction`]),...g()},`VTextarea`),F=d()({name:`VTextarea`,directives:{vIntersect:b},inheritAttrs:!1,props:P(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(i,{attrs:d,emit:g,slots:S}){let w=c(i,`modelValue`),{isFocused:A,focus:P,blur:F}=te(i),{onIntersect:ne}=O(i),re=n(()=>typeof i.counterValue==`function`?i.counterValue(w.value):(w.value||``).toString().length),ie=n(()=>{if(d.maxlength)return d.maxlength;if(!(!i.counter||typeof i.counter!=`number`&&typeof i.counter!=`string`))return i.counter}),I=m(),L=m(),R=M(``),z=m(),B=m(0),{platform:V}=D(),H=u(i),U=n(()=>i.persistentPlaceholder||A.value||i.active);function W(){H.isSuppressing.value&&H.update(),z.value!==document.activeElement&&z.value?.focus(),A.value||P()}function G(e){W(),g(`click:control`,e)}function K(e){g(`mousedown:control`,e)}function q(e){e.stopPropagation(),W(),C(()=>{w.value=``,_(i[`onClick:clear`],e)})}function J(e){let t=e.target;if(!i.modelModifiers?.trim){w.value=t.value;return}let n=t.value,r=t.selectionStart,a=t.selectionEnd;w.value=n,C(()=>{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=m(),X=m(Number(i.rows)),Z=n(()=>[`plain`,`underlined`].includes(i.variant));ee(()=>{i.autoGrow||(X.value=Number(i.rows))});function Q(){C(()=>{if(!z.value)return;if(V.value.firefox){B.value=12;return}let{offsetWidth:e,clientWidth:t}=z.value;B.value=Math.max(0,e-t)}),i.autoGrow&&C(()=>{if(!Y.value||!L.value)return;let e=getComputedStyle(Y.value),t=getComputedStyle(L.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,c=x(r??0,o,s);X.value=Math.floor((c-n)/a),R.value=y(c)})}j(Q),T(w,Q),T(()=>i.rows,Q),T(()=>i.maxHeight,Q),T(()=>i.maxRows,Q),T(()=>i.density,Q),T(X,e=>{g(`update:rows`,e)});let $;return T(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),f(()=>{$?.disconnect()}),e(()=>{let e=!!(S.counter||i.counter||i.counterValue),n=!!(e||S.details),[c,u]=p(d),{modelValue:f,...m}=E.filterProps(i),g={...h.filterProps(i),"onClick:clear":q};return o(E,k({ref:I,modelValue:w.value,"onUpdate:modelValue":e=>w.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?y(i.maxHeight):void 0,"--v-textarea-scroll-bar-width":y(B.value)},i.style]},c,m,{centerAffix:X.value===1&&!Z.value,focused:A.value,indentDetails:i.indentDetails??!Z.value}),{...S,default:({id:e,isDisabled:n,isDirty:c,isReadonly:d,isValid:f,hasDetails:p})=>o(h,k({ref:L,style:{"--v-textarea-control-height":R.value},onClick:G,onMousedown:K,"onClick:prependInner":i[`onClick:prependInner`],"onClick:appendInner":i[`onClick:appendInner`]},g,{id:e.value,active:U.value||c.value,labelId:`${e.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:c.value||i.dirty,disabled:n.value,focused:A.value,details:p.value,error:f.value===!1}),{...S,default:({props:{class:o,...c},controlRef:f})=>r(s,null,[i.prefix&&r(`span`,{class:`v-text-field__prefix`},[i.prefix]),l(r(`textarea`,k({ref:e=>z.value=f.value=e,class:o,value:w.value,onInput:J,autofocus:i.autofocus,readonly:d.value,disabled:n.value,placeholder:i.placeholder,rows:i.rows,name:H.fieldName.value,autocomplete:H.fieldAutocomplete.value,onFocus:W,onBlur:F,"aria-labelledby":`${e.value}-label`},c,u),null),[[b,{handler:ne},null,{once:!0}]]),i.autoGrow&&l(r(`textarea`,{class:a([o,`v-textarea__sizer`]),id:`${c.id}-sizer`,"onUpdate:modelValue":e=>w.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[t,w.value]]),i.suffix&&r(`span`,{class:`v-text-field__suffix`},[i.suffix])])}),details:n?t=>r(s,null,[S.details?.(t),e&&r(s,null,[r(`span`,null,null),o(v,{active:i.persistentCounter||A.value,value:re.value,max:ie.value,disabled:i.disabled},S.counter)])]):void 0})}),N({},I,L,z)}});export{F as t};