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