51948469c2
- 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>
1 line
5.1 KiB
JavaScript
1 line
5.1 KiB
JavaScript
import{Er as e,Hn as t,Jn as n,Kn as r,Nr as i,Pn as a,Qt as o,Sn as s,Tr as c,Yn as l,Yt as u,_n as d,a as f,cr as p,d as m,dn as h,f as g,g as _,ht as v,i as y,mn as b,o as x,or as S,p as ee,r as te,s as C,sn as w,sr as T,tn as E,tr as D,ur as O,v as k,vn as A,vr as j,xr as M,yr as N}from"./index-D0zhrQxI.js";var P=h({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,...y(),...a(C(),[`direction`]),...g()},`VTextarea`),F=w()({name:`VTextarea`,directives:{vIntersect:v},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(a,{attrs:h,emit:g,slots:y}){let C=o(a,`modelValue`),{isFocused:w,focus:P,blur:F}=ee(a),{onIntersect:I}=te(a),L=n(()=>typeof a.counterValue==`function`?a.counterValue(C.value):(C.value||``).toString().length),R=n(()=>{if(h.maxlength)return h.maxlength;if(!(!a.counter||typeof a.counter!=`number`&&typeof a.counter!=`string`))return a.counter}),z=c(),B=c(),V=e(``),H=c(),U=c(0),{platform:W}=u(),G=f(a),K=n(()=>a.persistentPlaceholder||w.value||a.active);function q(){G.isSuppressing.value&&G.update(),H.value!==document.activeElement&&H.value?.focus(),w.value||P()}function J(e){q(),g(`click:control`,e)}function ne(e){g(`mousedown:control`,e)}function re(e){e.stopPropagation(),q(),T(()=>{C.value=``,b(a[`onClick:clear`],e)})}function ie(e){let t=e.target;if(!a.modelModifiers?.trim){C.value=t.value;return}let n=t.value,r=t.selectionStart,i=t.selectionEnd;C.value=n,T(()=>{let e=0;n.trimStart().length===t.value.length&&(e=n.length-t.value.length),r!=null&&(t.selectionStart=r-e),i!=null&&(t.selectionEnd=i-e)})}let Y=c(),X=c(Number(a.rows)),Z=n(()=>[`plain`,`underlined`].includes(a.variant));N(()=>{a.autoGrow||(X.value=Number(a.rows))});function Q(){T(()=>{if(!H.value)return;if(W.value.firefox){U.value=12;return}let{offsetWidth:e,clientWidth:t}=H.value;U.value=Math.max(0,e-t)}),a.autoGrow&&T(()=>{if(!Y.value||!B.value)return;let e=getComputedStyle(Y.value),t=getComputedStyle(B.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,i=parseFloat(e.lineHeight),o=Math.max(parseFloat(a.rows)*i+n,parseFloat(t.getPropertyValue(`--v-input-control-height`))),s=a.maxHeight?parseFloat(a.maxHeight):parseFloat(a.maxRows)*i+n||1/0,c=d(r??0,o,s);X.value=Math.floor((c-n)/i),V.value=A(c)})}O(Q),j(C,Q),j(()=>a.rows,Q),j(()=>a.maxHeight,Q),j(()=>a.maxRows,Q),j(()=>a.density,Q),j(X,e=>{g(`update:rows`,e)});let $;return j(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),p(()=>{$?.disconnect()}),E(()=>{let e=!!(y.counter||a.counter||a.counterValue),n=!!(e||y.details),[o,c]=s(h),{modelValue:u,...d}=x.filterProps(a),f={...m.filterProps(a),"onClick:clear":re};return D(x,S({ref:z,modelValue:C.value,"onUpdate:modelValue":e=>C.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":a.prefix,"v-textarea--suffixed":a.suffix,"v-text-field--prefixed":a.prefix,"v-text-field--suffixed":a.suffix,"v-textarea--auto-grow":a.autoGrow,"v-textarea--no-resize":a.noResize||a.autoGrow,"v-input--plain-underlined":Z.value},a.class],style:[{"--v-textarea-max-height":a.maxHeight?A(a.maxHeight):void 0,"--v-textarea-scroll-bar-width":A(U.value)},a.style]},o,d,{centerAffix:X.value===1&&!Z.value,focused:w.value,indentDetails:a.indentDetails??!Z.value}),{...y,default:({id:e,isDisabled:n,isDirty:o,isReadonly:s,isValid:u,hasDetails:d})=>D(m,S({ref:B,style:{"--v-textarea-control-height":V.value},onClick:J,onMousedown:ne,"onClick:prependInner":a[`onClick:prependInner`],"onClick:appendInner":a[`onClick:appendInner`]},f,{id:e.value,active:K.value||o.value,labelId:`${e.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:o.value||a.dirty,disabled:n.value,focused:w.value,details:d.value,error:u.value===!1}),{...y,default:({props:{class:o,...u},controlRef:d})=>l(r,null,[a.prefix&&l(`span`,{class:`v-text-field__prefix`},[a.prefix]),M(l(`textarea`,S({ref:e=>H.value=d.value=e,class:o,value:C.value,onInput:ie,autofocus:a.autofocus,readonly:s.value,disabled:n.value,placeholder:a.placeholder,rows:a.rows,name:G.fieldName.value,autocomplete:G.fieldAutocomplete.value,onFocus:q,onBlur:F,"aria-labelledby":`${e.value}-label`},u,c),null),[[v,{handler:I},null,{once:!0}]]),a.autoGrow&&M(l(`textarea`,{class:i([o,`v-textarea__sizer`]),id:`${u.id}-sizer`,"onUpdate:modelValue":e=>C.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[t,C.value]]),a.suffix&&l(`span`,{class:`v-text-field__suffix`},[a.suffix])])}),details:n?t=>l(r,null,[y.details?.(t),e&&l(r,null,[l(`span`,null,null),D(_,{active:a.persistentCounter||w.value,value:L.value,max:R.value,disabled:a.disabled},y.counter)])]):void 0})}),k({},z,B,H)}});export{F as t}; |